15,175 Topics
| |
I want all of those objects to be check boxes (trade, bonus, soldiers, etc) [CODE] self.box = wxCheckListBox ( self.panel, 100, size = ( 250, 200 ), choices = self.trade, style = wxLB_HSCROLL )[/CODE] In this line where I define the choices, I can only put one (self.trade) if I … | |
Hi, I have been writing a program that simulates the behaviour of a system of hard disks using the monte carlo method. I ran the program upto around 2 million steps and it's really slow(takes around 3 1/2 to 4 hours). I first wrote it in vpython as I'm a … | |
My error is ">>> Traceback (most recent call last): File "C:\Python25\Books_per_month1AP.py", line 203, in <module> Window() File "C:\Python25\Books_per_month1AP.py", line 7, in __init__ wxFrame.__init__ ( self, None, -1, 'Audit', size = ( 300, 300 ) ) File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 505, in __init__ _windows_.Frame_swiginit(self,_windows_.new_Frame(*args, **kwargs)) PyNoAppError: The wx.App object must be created … | |
HI. What are the modules I would need if I wanted to do some basic operations regarding sending files to other computers on my own network? Just being able to copy files to another computer is sufficient. Does such an operation require a lot of expertise in programming and networking … | |
I was a little bored today and I started to google how the Python Virtual Machine works. I found a bunch of helpfull articles and kind of understand at least some of the very basic PVM code using the modules py_compile and dis. I was wondering how to write the … | |
Why do I get different values for the f.readline() statement in this bit of code? I entered it in the interactive mode of IDLE [CODE]>>> f=open('F:\\Documents and Settings\\folder1\\flder2\\t.txt','r') >>> f.readlines() ['1\n', '2\n', '3\n', '4\n', '5\n', '6\n', '7\n', '8\n', '9\n', '10'] >>> f.readlines() [][/CODE] | |
I want to store two variables in an array or list in a loop to collect all my x an y, something like the append function in python, can anyone help me. | |
I'm using Python 2.5.2 on a Ubuntu box for a research project based on data from the Fatality Analysis Reporting System (FARS) database (1975-), available at [url]http://www-fars.nhtsa.dot.gov/Main/index.aspx[/url]. I found 115 characters of the form "\xzz" -- possibly hex? -- in 4+ card-image records on about 300k incidents from 1975-1981 so … | |
Hey, I just started learning Python yesterday and I got to the end of a chapter on Branching and While Loops...which lead me to a "challenge"...basically it gives me the description of a program and I have to write it. This program flips a coin 100 times and then gives … | |
Hi folks, Just hoping someone can show me where I'm going wrong here. I've been given a tutorial question to count the number of times a particular character (char) appears in a string. The only catch is that you need to use a for loop, as the online checker won't … | |
Hi. I've read the documentation but I can't quite work out how i create an object and give it attributes. I'm trying to create a disk object that has attributes disk.x and disk.y which i can then identify with a line, [code=python] disk.id = (x,y) [/code] | |
Hi, Making good progress with a script that collects rss feeds from a news website and emails headlines but wondering whether I can alter what I have to email only the new headlines. My idea is that the new headlines would be compared with the previous ones using something like … | |
How do I create a Python egg that will properly pick up all the files and directories in a Python package :?: I have tried to do this with a "setup.py" file (created outside the Python package). Listed below are its contents: [CODE] from setuptools import setup, find_packages setup(name = … | |
hello friends...started to learn python and have covered the basic stuff and some silly gui stuff...i currently have some time so i thought why not prepare a app in python with some killer gui..now java has swing which can be modified to make such GUI...so is there anything which can … | |
Hi, Have adapted some code I found on the net to get a rss feed from a news site. I would like to email the output of this script using smtplib - after a couple of frustrating hours I have got that working as a separate element with my gmail … | |
name = caffé print name Python gave me an error on print: ascii' codec can't encode character u'\xe9' in position 5: ordinal not in range(128) | |
Hi everyone! I am currently creating somewhat of a platformer/puzzle game in pygame and ran into a problem with creating levels. I really don't want to take the time to program collisions with the player and each platform on the game, because that would obviously take forever. I was thinking … | |
I have been using python since the last few months. I am trying to telnet into one router and then telnet into another router from the first router. I know how to use telnetlib to telnet into a router but I have no clue on how I should proceed if … | |
Hi, Im doing this memory game where im supposed to randomize 18 words from a file, duplicate them and shuffle and then place in a matrix 6 x 6. Ive gotten quite far, but im not sure what the best way is to place the words in the matrix, and … | |
Hello i Just learned about the Exec statement, so i trying to make a flash card program that saves your cards. The way that i wanna keep the cards persistent is to save a dictionary to a text file and then just use the exec statement to call forth the … | |
I've nearly finished my python project, and plan to maybe distribute it. But I don't want users to have to go to command prompt and type python foo.py. I don't mind having the user install python, but is there a way I can make an exe that just runs the … | |
Hi all! I wonder, is a "standard" way to make help contents in pygtk? I was thinking about making a simple html page for my help on my application put as I understand there is no widget that natuarly shows html, so there is where my question comes up. Is … | |
I've been trying to solve this problem for a few hours now. I'm new to Python but I have programming experience in other languages. Description of my problem: 1) I'm writing a script that will run as a cron job to verify if data transfer is occurring on some legacy … | |
[B][COLOR="Red"]if param[0:4]<>'ini=': print ' %s ini='%sys.argv[0] sys.exit(1) inifile=param[4:] [/COLOR][/B] Hi All, Can u explain wht actually above code work? Thanks in Advance. | |
Okay I don't get this problem at all: [code=python]import random def chance(number): number = input for each in xrange(number): n = random.randrange(100)+1 return n def extreme(x): z = x + 5 y = z - 3 return z, y #main repeat = 0 while repeat != 2: x = input("Enter … | |
I'm currently doing a projecteuler problem, which requires finding the sum of all the primes below two million. I have a primitive function which determines whether or not a number is prime. This function is incorporated into the below function to produce a list with all the primes below the … | |
Hi I'm wondering how I would go about creating a program that will input data from about 1,000 files containing data such as this: [code] 2.825 1.00697992588 2.875 0.952989176901 2.925 0.91428970229 2.975 0.890110513425 3.025 0.879731596138 3.075 0.959217137445 3.125 1.07391392796 3.175 1.04874407027 3.225 0.857693793906 [/code] I'm wanting to generate an average … | |
Is there any way I can get an image to play in python with a function? Like I link the Python Code to the site with the picture on it or link it to my documents? I've tried researching it but I've gotten no results and I thought one of … | |
Does anybody know a good way place to find developers for an open source project? | |
Ok, so I have a project that I've written in Python(Actually it's not done yet), its the card game "Cheat" that you play in the command prompt with (until I learn wxPython -- GUI for Python) with computer players (or other people with you). I want to distribute it later, … |
The End.