15,180 Topics
| |
Well, I actually succesfully completed my first complete program in python, and I didn't use the forum for help, I stuck it out and figured it out on my own. After spending about two and a half hours getting all these make shifts loops right, I feel pretty darn good … | |
When using the Py2exe program snippet given in [URL="http://www.daniweb.com/code/snippet499.html"][COLOR=#800080]http://www.daniweb.com/code/snippet499.html[/COLOR][/URL] I get the following error message: Traceback (most recent call last): File "C:/Python24/hate me/p2e_test1.pyw", line 29, in -toplevel- console = [{"script": 'hateme2.pyw'}] ) File "C:\PYTHON24\lib\distutils\core.py", line 166, in setup raise SystemExit, "error: " + str(msg) SystemExit: error: command 'C:\PYTHON24\PYTHONW.EXE' failed with … | |
Hi, I have created the following code to check a list and then determine which is true then update the variables associated with the correct if else statement. My problem is it doesn't update any of the variable even if true. As you can see, the var ch should be … | |
I like to create a structure in Python, something like: [code]solvent_name boiling_point melting_point flash_point [/code]I need to search and sort this structure. How can I best do that? | |
I have created a project using Jython (there was no bug in compling it by my IDE) I also have read the topic named [B]Py2exe help [/B](Ene Uran---Oct 23rd 2006 6:43 pm) and I can tell you that it really helped me so much. But in this project, I cannot … | |
Hi, I've just installed python & wxpython on my university computer. I went to run a script that was working just fine on my computer at home last night and i am greeted with this message: [quote] Traceback (most recent call last): File "C:\Documents and Settings\d22601\My Documents\Project_4\Python Files\Sequence Driven Controller.py", … | |
So I wanted to write some code to provide a framework for math quizzes. Among other things, I wanted to be able to show LaTeX-like output on a canvas. But first, I just wanted to get the canvas showing simple text. Part of the code: [php] def get_level_string(self): return self.f1.level_text.get() … | |
Now I am looking for the best way to reverse the digits in an integer. For instance x = 12345 should become y = 54321. | |
My fiance is having a birthday in less than 20 days. I am therefore trying to create a program for her (trust me, it is not intended to be the only gift) to play around with, and hopefully enjoy. The only problem I am having so far, is that when … | |
Hi, I have a card class and deck class. The cards are in suitList rankList. I call the cards from a file cards.txt and split them into the above. I need to import the cards.txt and then shuffle them. I have the following code: def shuffle(self): import random nCards = … | |
I am trying Vegaseat's suggestion in one of my threads to use shuffled lists for combat in my text adventure. He suggested creating two lists, myhit_list[1, 0, 2, 0, 3, 0, 0, 1] and monsterhit_list[1, 0, 2, 0, 3, 0, 0, 1] and using random.shuffle(myhit_list) and random.shuffle(monsterhit_list) iterated with "I … | |
Hi, I finding difficult to execute this program. The wx.Notebook i created is coming on the splitted frame(self.p2). How do I that. I am started to learn wxPython, and when I run the code, the code doesnot close gracefully, it throughs me an error. "pythonw.exe has encountered a problem and … | |
Hey guys, I'm making a CMS for my website with python. I was wondering if anybody could give me some insight on (perhaps) an OS function that will copy a file from one folder and 'paste' it in another. thanks!:cheesy: Alright...I couldn't find anything as far as the os module … | |
Hi guys! Im new to this forum so go easy on me :-) I've got a background in C programming and have recently moved to Python for a GUI project im working on. So far im loving it - compared to VC++ wxPython is pure bliss. Im having a slight … | |
| I'd like to flip the keys and the values in a dictionary. Say I have this dictionary: [php] positions = {'secretary' : 'Jessica', 'IT manager' : 'Matt', 'sales worker' : 'Linda', 'boss' : 'Chris'} [/php] and I want this: [php] employees = {'Jessica' : 'secretary', 'Matt' : 'IT manager', 'Linda' … |
Okay, I just learned that in order to call a program I made in python, say, myfile.pyw, into a seperate program (say, other.pyw) I would use [code]execfile('myfile.pyw')[/code] instead of [code]import myfile.pyw[/code]. I did that, and get one of those ever so helpful traceback errors saying that 'start', the user input … | |
hi, i am making a gui, which looks like excel sheets. i want to give the user the facility of adding rows/columns at the run time. there is some initial size, but that can be increased any time during the executation of the code. what i have tried, is that … | |
Hi, I have a class for Cards, that the suits and ranks are placed in suitList = ("Hearts","Diamonds"... rankList = ("","Ace","2"... however I need to read these values from a file instead. Once I read the file I need to be able to sort the suits and ranks then print … | |
Hi, I need some help on how to read a file 2 h 3 s 6 d Ace s ... Importing this into Python and then sorting and printing in order. I have done some work, yet I can never seem to get the data to Python and split it … | |
Hi, I have the following code working fine. What I would like to try is when n cards are randomly selected, to print the cards in a graphics window. I want to add a new class draw(self,win,center) that displays the card. I have a set of bmp cards. [php]# Import … | |
Hey, I am trying to create my text adventure geared towards all of the frequent posters on daniweb's python forum, just alittle something to have fun with. But, it isn't going as planned. I used vegaseat's suggestion for combat, shuffling lists randomly to randomize hit/miss results. I think I did … | |
What is the most efficient way to spell a string in reverse, for instance s = "banana". | |
i get this error when trying to run my program. Traceback (most recent call last): File "C:\Python24\secretgarden.pyw", line 12, in -toplevel- denaystart() File "C:\Python24\secretgarden.pyw", line 7, in denaystart prompt_login() NameError: global name 'prompt_login' is not defined | |
Hey guys Just joined up the forum, I've been looking for a good community of python users! I'm 17 and I'm in colleg right now getting my transfer degree so I can go major in software development. I've worked with mostly web based langauges for the last couple of years … | |
If I have an integer like x = 12345, how do I separate that into individual integers 1, 2, 3, 4, 5? | |
I hope this thread does not offend anyone. I get the impression that most of us are college age prog5rammers, so this might be easily solved. I am attempting to make a menstrual cycle calculator for my fiance. To begin with, I thought about going about it in the following … | |
| So if I want to store a list of items (such as a bunch of instances of a class), what's better to use: tuples or lists? I understand that lists are mutable, so what are the advantages to tuples? |
Hey guys, I'm just about done with a program and I need to know how to launch an IE window (or any browser I suppose) from the command prompt. Can anybody help me? thanks!:cheesy: | |
| I was looking through the "beginner projects" looking for a way to use dictionaries so I could understand them better. I saw the caesar cipher suggestion and decided to run with that. I created a working one, but (as I saw in the "If...else") just because something works doesn't mean … |
Hello everybody I have develop a python script who can send message via MSMQ Queing. I use Python 2.2.1 and WIN32all-146 as library. Everything work fine on a W2k station, but if we try to use it on WinXP station it crash. The error message I got is " File … |
The End.