407 Posted Topics
Re: Here is an example how to use the module pickle: # use module pickle to save/dump and load a dictionary object # or just about any other intact object # use binary file modes "wb" and "rb" to make it work with # Python2 and Python3 import pickle # create … | |
Re: I can't find file turtleDemo.py in the Python32 installation. If you have it from older installations you might try to change import Tkinter to import tkinter In your file manager double click on one of the python source files (have extension .py) in directory C:\Python32\Lib\turtledemo for instance yinyang.py You can … | |
Re: Something like this will do: def hide_word(word): """hide word as whitespace like tabs""" temps = "" tab = '\t' new_line = '\n' for letter in word: # 'A' would be 1 tab, 'B' 2 tabs etc. temps += tab * (ord(letter) - 64) + new_line return temps text = "My … | |
Re: About the only place you could get wxPython for Python24 is to get movable Python: http://code.google.com/p/movable-python/downloads/detail?name=movpy-2.0.0-py2.4.4.zip&can=2&q= See also: http://www.voidspace.org.uk/python/movpy/introduction.html | |
Re: The GUI kit for the C++ folks is wxWindows, entirely written in C++. The Pythonistas made a wrapper of it for Python and called it wxPython. Looks like nobody wanted to get into changing the manual. | |
Re: Why don't you put a few test printf's in to see what's going on. | |
Re: Never knew you even existed. You latest avatar sound a bit childish, how old are you? | |
Re: Another reference to Python games using AI: [url]http://inventwithpython.com/chapter16.html[/url] | |
Re: For the basics of a Koch snowflake see: [url]http://ecademy.agnesscott.edu/~lriddle/ifs/ksnow/ksnow.htm[/url] | |
Re: Rich folks make tons of money the easy way by investing with insider information from their CEO buddies. | |
Re: [B]All people are equal but some are more equal than others.[/B] [QUOTE]The universe is a pretty big space. It's bigger than anything anyone has ever dreamed of before. So, if it's just us, seems like an awful waste of space, right? -- Carl Sagan [/QUOTE] | |
Re: Lis travel faster because they are easier to generate. To establish the truth to confront these lies takes longer. A fact often abused in politics. | |
Re: [QUOTE=Ene Uran;504710]There is no excuse for pircay, none whatsoever. There is also no excuse for speeding, driving through a stop sign, pestering folks in the airport men's room, homo preachers pointing their dirty finger, going to a silly war etc. etc. Software is sold as a "buyer beware" item and … | |
Re: A new teacher was trying to make use of her psychology courses. She started her class by saying, "Everyone who thinks they are stupid, stand up!" After a few seconds, Little Johnny stood up. "Do you think you're stupid, Little Johnny?" "No, ma'am, but I hate to see you standing … | |
Re: To be able to run eric4 you should have the following installed first: Python 2.4.0 or better Qt 4.2.0 or better (from Trolltech) PyQt 4.1.0 or better (from Riverbank) QScintilla 2.1 or better (from Riverbank) Do have all of these installed? | |
| |
Re: You need to use one of the GUI toolkits for Python. The simplest one is Tkinter that normally comes with Python. You simply add an if statement that does something when your x,y matches the mouse's x,y coordinates (or range): [code=python]# show mouse position as mouse is moved and create … | |
Re: Well, Sarah Palin is much like Ronald Reagan, who was an actor too! He made a wonderful super conservative president. | |
Re: Take a look at: [url]http://www.lvr.com/usb.htm[/url] | |
Re: Most governments keep tab of their underlings already in secret, why not make it official and be honest about it! I agree with the Republicans, no (new or old) taxes, borrow the money and let the damn kids pay for it. Also, lower the value of the Dollar to screw … | |
Re: jbennet: The real computer genius here. Never gives you an old and stale idea or opinion. His only challenge is the English language, probably because he is Scottish. I don't know what the native language of Scottland is? | |
Re: I have met Luca Toni in person in Italy, and now the 'golden shoe' will play for Munich. | |
Re: [QUOTE=jbennet;514948]because then inflation will go mad. Thats what lead to hyperinflation in germany, which contribited to the wall street crash and the rise of naziism[/QUOTE]The hyperinflation in Germany was caused by the accumulated cost (mostly debt) of WW1, and the huge reparations they had to pay when they lost. Let's … | |
Re: The simplest way, but maybe not the most efficient for large files, is this: [code=python]# sample text for testing # could come from a text file read like this: """ infile = open("my_text.txt","r") text = infile.read() infile.close() """ text = """\ My name is Fred Flintstone and I am a … | |
Re: When a person assists a criminal in breaking the law before the criminal gets arrested, we call him an accomplice. When a person assists a criminal in breaking the law after the criminal gets arrested, we call him a defense lawyer. | |
Re: [QUOTE=Lardmeister;525615]American football is a bunch of overweight yahoos in expensive padded gear running into each other, chasing an almond shaped ball. Hardly a game of strategy and, as long as you run into the right direction, no need for brains.[/QUOTE]Come on, I have dated a couple of football players, and … | |
Re: I don't think pyqt can handle animated gifs. You could use wxPython's wx.animate.GIFAnimationCtrl widget. | |
Re: [QUOTE=vmanes;598330]And just which variant of Cole's Law would that be?[/QUOTE]I know only one variant, Cole's Law: "Thinly Sliced Cabbage" I think women live longer than men because we were an upgraded model of the human being. | |
Re: [QUOTE=Lardmeister;700923]Spiritual healing using some form of art has its place. There is alot more to healing than the usual "take three aspirins and go to bed" and here is my bill for $147.[/QUOTE]Marshal Art is very Spiritual too: [url]http://www.metacafe.com/watch/739631/marshal_art/[/url] | |
Re: You can use Tkinter running in the background: [code=python]# respond to a key without the need to press enter import Tkinter as tk def keypress(event): if event.keysym == 'Escape': root.destroy() x = event.char if x == "w": print "blaw blaw blaw" elif x == "a": print "blaha blaha blaha" elif … | |
Re: [QUOTE=Lardmeister;710151]The 'neocons' are the heart, soul and brain of the conservative movement in the US. After all, they are the ones that picked the ultimate perfect Conservatiive Sarah Palin.[/QUOTE]Very well said, I simply adore Sarah! You have defined the heart, soul and brain of the conservative party, but the bread … | |
Ever stumbled over silly instructions? Open Packet, Eat Nuts To avoid breakage, keep bottom on top. Top marked bottom to avoid confusion. | |
Re: I love Jon Steward's approach to all that spin in the news. This one is a already a classic: [url]http://www.thedailyshow.com/video/index.jhtml?videoId=186056&title=awkward-loan-interview[/url] Many people here at the hospital have pulled their money out of WaMu bank. Not quite sure were they are going to put it? Maybe bury it in the backyard? … | |
Re: Help, I am stuck in LA, but sometimes I feel like I live in Hell, Michigan. Actually, I think that the air is clean there! | |
Re: The US government is sending you 1 Billion Dollars, the check is in the mail. :) | |
Re: [QUOTE=vmanes;624107]Where's Pat Paulsen when we need him?[/QUOTE]Patrick Layton Paulsen (July 6, 1927 – April 24, 1997) was an American comedian notable for his campaigns for President of the United States in 1968, 1972, 1980, 1988, 1992, and 1996. Presidential Campaign Slogan: "If elected, I will win." Well, Pat is gone, … | |
Re: Every year the sun burns up 360 million tons of its mass to keep us globally warm. | |
Re: [QUOTE=Dave Sinkula;710010]Take the kids to a range. Let 'em shoot.[/QUOTE]I agree, this great country needs soldiers. | |
Eureka, I have reached my number 666 post at glorious Daniweb! It's exactly 666 now, but will of course increase as I post more! | |
Re: That is a pretty old book. The BOA IDE and wxPython have changed quite a bit since then. Without your code, help would be hard to give. | |
Re: We have a lot of wind farms here in California. Is that a good alternative? I assume we can attribute that energy to the sun's fusion energy. | |
Re: As this long and difficult war ends, I would like to address a few special words to the American people: Your steadfastness in supporting our insistence on peace with honor has made peace with honor possible. -- Richard M. Nixon | |
Re: It is just as important that business keep out of government, as that government keep out of business. -- Herbert Hoover | |
Re: Well, happy scary Halloween to everyone! I usually take my sister's kids to collect large amounts of candy in one of the filthy rich LA neighborhoods. |
The End.