15,175 Topics

Member Avatar for
Member Avatar for Andy_Ballard

Hello, I would like to import and call a c++ library from python. The library is the freely available (c++) LAMMPS Molecular dynamics code, and on the website, the following advice is given: "[one can]...build LAMMPS as a library. Once this is done, you can interface with LAMMPS either via …

Member Avatar for Andy_Ballard
0
3K
Member Avatar for AnnetteM

Hello, I am in the process of importing and reading data, reshaping the data, adding a header file on top (of the new data array or matrix), and writing a new file. I do this in a loop for many files. I'm using python 2.5 since that is the version …

Member Avatar for AnnetteM
0
183
Member Avatar for shyami

Hello there, I wrote a code for reading xml datas from one url, the code is working fine, but if data contains "-" it throw error message. Here is my code [CODE] h = httplib2.Http('.cache') response, content = h.request(dataurl) data = content.decode('utf-8') elem = etree.fromstring(data) [/CODE] i am getting error …

Member Avatar for Stefano Mtangoo
0
80
Member Avatar for Lolalola

Hi, i creates this program: [CODE=python] import wmi c = wmi.WMI() for i in c.Win32_Processor (): cputype = i.Name print cputype for i in c.Win32_ComputerSystem(): mem = int(i.TotalPhysicalMemory) print mem/1000000, "mb" [/CODE] I make exe file with py2exe. When i run program, i see this error: [CODE] D:\py\dist>cpu.exe Traceback (most …

Member Avatar for Lolalola
0
174
Member Avatar for shyami

Hi, I am working with pylon framework, just i want to redirect a user to my another php script, if session expired. The below one is redirecting to another controller. i need to redirect to another php script. redirect_to(controller='test', action='index', _code=303) Any idea? Thanks -Shyami

Member Avatar for shyami
0
119
Member Avatar for gringofandingo

Please help me finish my project. I am a novice and completely new to python and hopelessly lost. I hope somebody will be able to help me. Here is my problem, I am working on a project for class and I am stuck. My program is supposed to be simple, …

Member Avatar for redyugi
0
132
Member Avatar for Tops

How do i make the grid on Turtle Canvas in python visible? Canvas size is 800 by 600

0
53
Member Avatar for Feenix45

Can someone guide me how to make menu in python please? [url]http://www.daniweb.com/forums/post693793.html#post693793[/url] This is a previous post of what sort of menu i need. Can someone just give me a start please. Cheers

Member Avatar for Bart_uam
0
2K
Member Avatar for marcux

Hi all! I have an app using pygtk and in a separate thread I have a server responding to specific calls on port 1120. Everything works fine except one thing: When I exit my app, everything shuts own properly but if I start up my app again right after (and …

Member Avatar for marcux
0
2K
Member Avatar for Jexius

Has anyone got any ideas on how to do this? Here's an example: I want to find: [url]http://img692.imageshack.us/img692/1341/asdtva.png[/url] In this: [url]http://img294.imageshack.us/img294/5714/asdp.png[/url] That's just an example, it's not the real thing ;P Any help would be greately appreciated. EDIT: Sorry, IMG tags aren't on this forum ;P

0
33
Member Avatar for Lala2010

I have written a Python program that takes information from the user at the command line, and then saves this data in a PostgreSQL database. Now I want to wrap a GUI around my program. I am just starting with wxPython and have completed a few tutorials, but still can't …

Member Avatar for vegaseat
0
124
Member Avatar for smithy40000

I am doing my major work for SDD and i am making checkers, i have searched and tried many differnt solutions but nothing has worked, i am trying to make the window size set to 800x800 and have "Checkers" as a title and 4 buttons down the bottom, i would …

Member Avatar for jimothy
-1
227
Member Avatar for hsyuen

I am new to python and I am trying to write a simple program that would cd from my home directory to another directory, run an ls command and then return to my home directory. The OS is Redhead linux 5.4. I am using python 2.4.3. I tried this first: …

Member Avatar for hsyuen
0
107
Member Avatar for SoulMazer

EDIT: Hello, I need to figure out how I would download email from a Linux-based Postfix/Dovecot mail server. Is there a library that makes this relatively simple that good documentation/examples? Thanks in advance.

Member Avatar for SoulMazer
0
86
Member Avatar for Compy

So, I'm still a beginner at python and OOP in general. But I had a question about the order of operations. Basically what I have is a module that contains a class that will reset all self variables for the object and give the object a card. The script I'm …

Member Avatar for Compy
0
145
Member Avatar for cedrikkk

I have the problem that pygame.image.save won't save a transparency channel. With one .png image, it simply doesn't save the transparency channel. With plenty of other .png images, it gives me an error when I call pygame.surfarray.pixels_alpha(newSurface). It tells me: ValueError: unsupported colormasks for alpha reference array. Anyone have experience …

0
109
Member Avatar for new_horizon

Hi All, Apologies for my naivity in advance, but I am very new to the Python programming world - with experience mainly in Basic and Matlab. I am studying my PhD and am currently trying to program using Python in the Vizard environment to create stimuli for experiments. The purpose …

Member Avatar for new_horizon
0
122
Member Avatar for davegball

Hi I have two python lists. list1 is a \n delimited web proxy log file. list2 is a list of domain names. I want to cycle through the list of domain names and for every log file entry check if the domain name exists anywhere in the log entry. If …

Member Avatar for davegball
0
175
Member Avatar for Whoever90

I need to code a program that input will be any random string and the the output will include processes, unprocessed string. EX: Input String : XYZZXXYYXYZZXYZ Unique Prefixes : ['', 'X', 'Y', 'Z', 'ZX', 'XY', 'YX', 'YZ', 'ZXY'] Encode List : [(0, 'X'), (0, 'Y'), (0, 'Z'), (3, 'X'), …

Member Avatar for Whoever90
0
185
Member Avatar for Tech B

I've been working on facial recognition and have obtained a dll that can recognize faces in an image, and gives cordinates aswell. It came with an example program written in C++ and I'm trying to port it to python. Here is the C++ code [CODE] #include "windows.h" #include "loadbmp.h" // …

Member Avatar for Tech B
0
456
Member Avatar for ChargrO

Hello, im currently working on my major work and im up to the stage where i want to implement a cascade menu into my window. i have differnt buttons on my window but i want the food options to pop down in a cascade menu and not a check menu, …

0
122
Member Avatar for __qwerty__

I need to check if a float number has decimals or not. This is what I've tried to do this far but it doesn't seem to work. What am i doing wrong, is there a better way? [CODE] n =[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0] a = [1.5,2] b = a[0] for i in range(len(n)): …

Member Avatar for __qwerty__
0
147
Member Avatar for nevets04

Can someone give me an example using tkinter's canvas and bind fetures to make a circle that you can move by using either WASD or the arrow keys?

Member Avatar for vegaseat
0
60
Member Avatar for persianprez

I have something like 5 lists all containing different data. I have the user input into a list like so: [CODE]for i in range (0,completed): print 'Class: ', course = raw_input() course = course.upper() allcourses.append(course)[/CODE] now the list cmsc has as many courses in it as the user defined before …

Member Avatar for vegaseat
0
89
Member Avatar for Gribouillis

This snippet defines a class LebsegueSet which instances represent sets of real numbers, namely finite unions of intervals. Set theoretical, topological and measure theoretical operations are implemented in pure python. Use freely and enjoy !

1
248
Member Avatar for playonlcd

I have read some documentation about python, but no examples on how could you can extract Keys from a double dictionary. To understand better here is an example: Let's say we have the following dictionary: {'AAA': {'KEY1':'text1', 'KEY2':'text2', 'KEY3:' 'text3', 'KEY4': 'text4'}, 'BBB': {'BBB1':{'KEY1':'text1', 'KEY2':'text2', 'KEY3:' 'text3', 'KEY4': 'text4'}, 'BBB2':{'KEY1':'text1', …

Member Avatar for playonlcd
0
487
Member Avatar for playonlcd

Hi, I am a little newbie with python, more use of C++ The goal is to search a specifed filename e trought multiple directories. After finding the file, search trough it's content some description on some strings and write out the description on a xml file. So far i manage …

Member Avatar for playonlcd
0
173
Member Avatar for craigus12

Hi all, I am reading through the Non-Programmer's Tutorial and I would like to make a program with Python in which is similar to the one in the example. The difference with the program in this example is that you can only assign a number to a name, whereas in …

Member Avatar for SoulMazer
0
137
Member Avatar for SoulMazer

Hi, so I'm currently porting one of my applications (it's a media player) from Tkinter to wxPython and I am having some trouble as this is the first wx application I have attempted. I am trying to create something similar to [URL="http://i189.photobucket.com/albums/z266/Capn_Soul/DesiredLook.jpg"]this[/URL]. However, I can't figure out the wxPython code …

Member Avatar for SoulMazer
0
168
Member Avatar for slmsatish

hi guys i am a beginner to python. Just now completed a few sets of lessons and i'm trying out the exercises given at the end of each chapter. I have learned till the stage of basics in defining a function. But still i am confused. [code] ##This program runs …

Member Avatar for snippsat
0
195

The End.