14,945 Topics

Member Avatar for
Member Avatar for HLA91

Hi Ive got this word count script when i check it there is no probs but when i run it it says Traceback (most recent call last): File "H:\Scripts\count.py", line 9, in <module> infile = file(data, 'r') NameError: name 'data' is not defined This is my script #The number of …

Member Avatar for bumsfeld
0
178
Member Avatar for cancer10

Hello Friends, I am willing to learn python, so can someone please guide me how do I get started? I mean wot compiler would I need and which editor etc Also tell me wot is the scope of python in web programming? Thanx

Member Avatar for HLA91
0
214
Member Avatar for HLA91

Hi The info "joeprogrammer's" gave me to place the python directory at the end of my path but im confused. My path at the moment looks like this %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\Adobe\AGL Python on my pc is in my H:\ drive under a folder called python. …

Member Avatar for vegaseat
0
194
Member Avatar for HLA91

Hi i Made a shell script like this [code] name = raw_input ("Please enter your name: ") if name == Harry: print "Welcome" else: print "you smell" [/code] What i want it to do is ask for my name and if i dont enter Harry it says "YOU Smell" But …

Member Avatar for vegaseat
0
158
Member Avatar for sneekula
Member Avatar for vegaseat
0
272
Member Avatar for mruane

Hey all. I was hoping somebody on here, preferably vegaseat or any other long time and reputable poster and/or moderater would have any Ideas for a program that I should write. Basically, I fear I am trying to push myself to hard and to fast with python. I really want …

Member Avatar for Ene Uran
0
112
Member Avatar for sneekula

I have played with Python code just a little and like it so far. I am using a Windows XP machine and have downloaded Python 2.5. As recommended in the "Starting Python" thread, I am saving my test files in the directory C:\Python25\Atest\. When I bring up the IDLE editor, …

Member Avatar for sneekula
0
107
Member Avatar for HLA91

Hi Im interested in downloading pythhon and i was looking through the first steps to making a python script. This was in the tutorial " [B]Setting the path[/B] You will need to cause the directory containing the file named [B]python.exe[/B] to be listed in your system environment variable named [B]path[/B]. …

Member Avatar for ~s.o.s~
0
95
Member Avatar for sneekula

I thought function xrange would give me a list of integers, but I got a string instead: [code]x = "xrange(1, 5)" print x # xrange(1, 5) x = xrange(1, 5) print x # xrange(1, 5) same result as string above!? [/code]

Member Avatar for sneekula
0
91
Member Avatar for katharnakh

Hi, i am facing some problems with opening an excel file. I am using XLRD module. I am getting XLRDError: Can't find workbook in OLE2 compound document and CompDocError: Not a whole number of sectors exceptions in seperate try on different files. 1.Does any one know anout these exceptions? what …

Member Avatar for vegaseat
0
321
Member Avatar for mruane

hi, first off I want to say that I was helped immensely by the other posts, especially the one where the one person was talking about classes. From veiwing his coding i was able to get my text adventure started. My basic questions are: 1) how do I learn the …

Member Avatar for bumsfeld
0
98
Member Avatar for akadri

Folks, I want to know how to check whether a file exists for not?? One more thing: If we open an existing file in a write mode, then it gets truncated to zero length, so what the way out of this?? Should I use open('filename','w+') Regards, Asrar

Member Avatar for katharnakh
0
84
Member Avatar for Mouche

I wasn't able to find anything on this... well, I wasn't sure what to search for. But I'm curious what the advantage of this: age = 3 print "Hello, I am %d years old." % age ...is over this: age = 3 print "Hello, I am", age, "years old."

Member Avatar for Mouche
0
146
Member Avatar for Matt Tacular

I want to make a program that can do two things really: 1) Detect the beat of a song 2) Output through a port, preferably the paralell port. 1) I was thinking the easiest way to do this, would be to use windows media players bars visualization, but then i …

Member Avatar for vegaseat
0
127
Member Avatar for Mouche

I'm working on a text adventure game just for fun. I am not planning to complete it, but I decided to try it just to learn classes. Seeing the text game in another post using functions, I realize that that is a very nice way to make a simple game, …

Member Avatar for jrcagle
1
3K
Member Avatar for chris99

How would I manipulate an entry widget so that it hides the entered characters behind asterisks? like this: Typed: PassWord Displayed as typing occurs: ******** I'm trying to make a dialog box module, for use in some future programs. I want the user to be the only one to know …

Member Avatar for Ene Uran
0
126
Member Avatar for Matt Tacular

I know this is VERY off topic, but I am sure that a bunch of people here are experienced with computer building. I am building a computer off of tigerdirect canada and I was just wondering if I could get someone to check and see if all of these parts …

Member Avatar for Ene Uran
0
132
Member Avatar for chris99

The attached program uses buttons to take you to a set of links. The links that the three buttons point to are here, gamefaqs and toontown. You can customise by altering the links and button names within the code, this is just practice. What do you think?

Member Avatar for chris99
0
126
Member Avatar for briggs1987

I need help. I have my program set up except for a graphWin and I don;t know how to set that up

Member Avatar for Ene Uran
0
85
Member Avatar for pfunix

Greetings All! I would like to get some feedback to all ya good python folks here at daniweb regarding some implementations that you guys doing with Python and using MySQL db. I'm looking for some mysql plugin for python. I've tried sourceforge 's mysql-python but with no luck(installing) .. maybe …

Member Avatar for ghostdog74
0
157
Member Avatar for Matt Tacular

I am taking grade 12 programing and in the course, you can make any program in any language for a final project, and I want to do one in python, but I dont know what to make, I need help to come up with an idea for a rather useful …

Member Avatar for Ene Uran
0
129
Member Avatar for dunderhead

Hi, I am having a problem with function and class syntax. I have one class (MakePanel1) that creates a button and label. The button-click event of the button is linked to a function (daclick1) that changes the text of the label. This works well. I have another class (MakePanel2) that …

Member Avatar for dunderhead
0
2K
Member Avatar for FireSBurnsmuP

Okay, I know that Python is a programming language (it comes with some Linux installs), but what are its stats? I mean, how efficient is its build? How much larger or smaller are the programs than C++? How much faster are the programs than those created by C++? What are …

Member Avatar for vegaseat
0
173
Member Avatar for JyotiC

Hi, i am using Pygtk to make GUI . I have a frame in which i have added a VBox.. I want to add scrollbar in that VBox.. but couldn't figure out how to add it. [code] vscrollbar = gtk.VSscrollbar(adjustment=None) AttributeError: 'module' object has no attribute 'VSscrollbar' [/code] it's giving …

Member Avatar for JyotiC
0
289
Member Avatar for bumsfeld

I read in the news that Python in going from version 2.4 to version 2.5 fixed 450 bugs. That seems to be lots of bugs! I used Python a lot and never found a single one of those bugs. What is your experience?

Member Avatar for nytrokiss
0
264
Member Avatar for jrcagle

Hi, I've written a nifty projectile simulator using pygames with the livewires wrapper for physic class: rocket on launch pad has assignable speed and direction, launching causes rocket to move under influence of gravity. Currently, the user can use the mouse to change the initial direction of the rocket, but …

Member Avatar for vegaseat
0
140
Member Avatar for etxulid

Hi, is there any built in function for converting an int to a byte? Thanks

Member Avatar for vegaseat
0
210
Member Avatar for etxulid

Hi, got a hex string 3E 65 72 3D 65 which first needs to be reversed to C7 6A E4 CB 6A then I need to move the 4 LSB in each byte to the 4 LSB in the next byte, need also to include 4 new bits (x) in …

Member Avatar for ghostdog74
0
193
Member Avatar for reRanger

Greetings: I have been working with code examples (from the good people on this site) and I have been learning quite a bit about Python and becoming more comfortable with. The program I am working on is being done in pieces, the GUI being really the primary area of problems …

Member Avatar for vegaseat
0
134
Member Avatar for swapnamishra

Hi, I have a function in Vc++ called Execute. I pass arguments to the function in hex and it returns the value in hex. >>> p.Execute(s1) The return value is handled in unicode format by python. u'\u1211\u2b08' I am supposed to convert the hex return value to BCD. Since python …

Member Avatar for Ene Uran
0
150

The End.