15,180 Topics

Member Avatar for
Member Avatar for ber

Hi, I'm very new to programming and Python. I need to process two separate files, one containing words, the other frquencies of these words. What is the best way to process these files and obtain a new file with frequencies*words in there? Btw i'm afraid the files cannot be read …

Member Avatar for vegaseat
0
94
Member Avatar for flybob

I have developed software a long time, but am new to GUI. For the last 6 weeks, I have been developing a database in MySQL, with mysqldb and controlling it with wxPython GUI code developed in Boa Constructor. Now that I have stuff IN the database, and screens to view …

0
57
Member Avatar for Confucius

Ive looked many places but the answer to this question has eluded me, once a script is executed how can you make it so that it re-starts. Oh, and what is the meaning of life?:cheesy:

Member Avatar for Confucius
0
101
Member Avatar for Ene Uran

I read somewhere that you should avoid using a leading underline in a variable name. It is supposed to have a special meaning in Python. I can't find anything more detailed. Does anybody know?

Member Avatar for vegaseat
0
280
Member Avatar for Ene Uran

Does Python have a static variable like C has? I like to avoid a global variable for the usual reasons. Note: A static variable in a C function will retain its last value.

Member Avatar for vegaseat
0
145
Member Avatar for girish_sahani

I need to map one list onto another.l1 is a list of lists of lists and l2 is a list of numbers.I want elements of l1 to be the keys and elements of l2 as the values.I tried to convert l1 into a tuple and then mapping but it doesnt …

Member Avatar for girish_sahani
0
234
Member Avatar for Blujacker

I have an problem with Python, i am trying to create a game. I did mapeditor for this game. I create map by creating a lot of pictures, like 2000 or more. But if i want to create moore i get an RunTimeError:( [IMG]http://blujacker.wz.cz/omg!.PNG[/IMG]

Member Avatar for Blujacker
0
121
Member Avatar for girish_sahani

When i tried the following in python interpreter,i got a syntax error: [code] d = {[[['a': 1,'b': 2],['a': 4,'b': 3]][['a': 2,'c': 2],['a': 1,'c': 3]]] : 0.4} [/code] Pleeeez help :sad:

Member Avatar for bumsfeld
0
79
Member Avatar for gbs

I was trying to write a simple python script to enable web users to upload files. Here is html [code] <HTML> <HEAD></HEAD> <BODY> <FORM ACTION="[URL="http://some-server.com/test.cgi"]http://some-server.com/test.cgi[/URL]" METHOD="POST" enctype="multipart/form-data"> <INPUT TYPE="text" NAME="words" SIZE=30><br> <INPUT TYPE="file" NAME="infile" SIZE=30><br> <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form"> </FORM> </BODY> </HTML> [/code] Here is the python script [code] …

0
79
Member Avatar for ejai

I am working on an assignment that involves simulating a volley ball game and I have NO idea. Can anyone help. Here is the question Thanks

Member Avatar for ejai
0
110
Member Avatar for girish_sahani

If i have a list (or list of lists) with elements of size k and i want to generate all higher level elements (of size k + 1) from it,what should i do??Any pointers would be of a great help I tried the following for lists...for list of lists i …

Member Avatar for girish_sahani
0
207
Member Avatar for girish_sahani

this doesnt work when the file is in the same directory as the .py file. [code] def get_colocations(filename): sentences = open(filename).read().split("\n") colocations = [] for sent in sentences: colocations.append(sent) return colocations def main(): get_colocations("colocations.txt") print "Colocations are",colocations [/code] Can anyone help????????

Member Avatar for girish_sahani
0
125
Member Avatar for gbs

Hi, I am having the problem of running ps2pdf from a python script. From the command line, ps2pdf works just fine. However, when I tried the following code: os.chdir("/tmp/test") # file.ps resides in this dir os.system("ps2pdf file.ps file.pdf") The script generated an empty file.pdf with no pages. Does anyone know …

Member Avatar for G-Do
0
2K
Member Avatar for madloch

Hi All I'm new to Python and have created the below little program but would like to be able to print the loop final count (eg. 8 years) rather than every loop. Any hints on how to do this? def main(): print "This program calculates how long it takes for …

Member Avatar for madloch
0
3K
Member Avatar for NumNut

Hello, I am using fedora 5 and installed wxpython in an effort to program in python/wxpython (installed wxPython-2.6.3.2-1.fc5.i386.rpm, wxGTK-2.6.3-2.6.3.2.1.fc5.i386.rpm and wxGTK-gl-2.6.3-2.6.3.2.1.fc5.i386.rpm). When I run my test script to create a frame, a notebook and an image on one of the pages of the notebook, I get a GDK error when …

Member Avatar for NumNut
0
217
Member Avatar for Ene Uran
Member Avatar for bumsfeld
0
5K
Member Avatar for rajashreeshinde

Hello All, I am developing a GUI application in wxPython on linux. I have to provide help menu describing tool's usage. I am not able to get any modules realated to this.Can anybody know how to develope help in wxPython? Thx, rajashree

Member Avatar for rajashreeshinde
0
375
Member Avatar for watrygl

Help, please, I need to configure IIS to use python I have tried the the microsoft link [URL="http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B276494"]http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B276494[/URL] and the netfirms [URL="http://urbanware.netfirms.com/python/pythonIIS.html"]http://urbanware.netfirms.com/python/pythonIIS.html[/URL]. I am running IIS6 on Windows serfver 2003 The site is [URL="http://gw102.coaps.fsu/httpdocs/example.php"]http://gw102.coaps.fsu/httpdocs/example.php[/URL] any help or thoughts

0
63
Member Avatar for whoru

I need to make a high scores list to a game, for class, and it has to be stored using a pickled object. I can only get it to where it stores and prints one score, and then every time you play it the score gets overwritten. How can I …

Member Avatar for G-Do
0
247
Member Avatar for Ene Uran

What is the best way to establish a wxPython event handler for a mouse click, button and so on? I have looked at a number of sample codes and the event handlers differ all over the place.

Member Avatar for Ene Uran
0
365
Member Avatar for EriCartman13

Ok I am confused. I just started python and when I save my program that I edited in the IDE editor as for example helloworld.py I cannot run it when I click it. All it does it come up with a black box, like cmd, and dissappears. Also do you …

Member Avatar for EriCartman13
0
204
Member Avatar for Confucius

Im sort of new to python, and I have been looking at some tutorials, manuals, etc. and I saw how to find prime numbers, so I thought it would be a good place to start, so I added some stuff to hopefully allow for user input, and it doesnt work. …

Member Avatar for Ene Uran
0
307
Member Avatar for swapnamishra

How can we execute the commands on one file in a such a way that the results will get saved in another file? Do we have any such built in method which we can use?

Member Avatar for pythonguy
0
119
Member Avatar for pythonguy

I am using automnation desk to run my python scripts. It supports interpreter ver 2.2 I have some script common for almost all other script files of my application. this common script is saved as CommonCalls.py and is on python search path. I am using some ref. to a file …

Member Avatar for pythonguy
0
136
Member Avatar for Avner .H.

hello everybody, I've started to learn pyGTK and glade for a program i'm doing, and i've run into some problems: 1. Is there no way to change the size of a specific text when using glade? for example, a window title, a label text etc. 2. In the Gnome widgets, …

Member Avatar for JoeM
0
178
Member Avatar for G.Host

Hello to all of you. My name is Greg. I am currently running Mac OS X ( my homeschooling computer). Anyways, I'm having trouble downloading Python to my Mac. Every python file I've downloaded and decompressed with StuffIt Expander, just seems to be nothing but files that I don't know …

Member Avatar for G.Host
0
149
Member Avatar for JoeM

Hello!! I'm really new to python and pygtk and Glade, I'm sorry I'm still on the dark side using Windows 2000 :-( What I'm trying to do is a simple Testing Program Simulator, that means that I will press a button and then I'm supposed to show a cross or …

Member Avatar for vegaseat
0
300
Member Avatar for swapnamishra

Hi, I need to test soem DCOM APIs using python script. I just wanted to know how to go about it? What all s/w would I need to do this testing? And do I need to install visual studio on my machine to check the dcom APIs?

0
101
Member Avatar for bucodi

Hi, I would like to configure my wxcombox in a way that when it gets the focus, it automaticly opens his listpart. Any ideas ? tia Rony

Member Avatar for bucodi
0
116
Member Avatar for swapnamishra

Hi, I have a file named demo.py.The contents of the file are: [code] class a: name="swapna" def show(self): print a.name s=a() s.show() [/code] When I execute the file it gives me the following error: "<bound method a.show of <__main__.a instance at 0x009D58C8>>" Kindly advice on how to proceed with it.

Member Avatar for bumsfeld
0
148

The End.