1,175 Posted Topics
Re: wxPython is much simpler to distribute than PyGTK/GTK (which is a bear for Windows customers). The other important thing is that the users of PyGTK/GTK are much smaller in number than the users of Tkinter or wxPython. So, if you need PyGTK help, good luck!? | |
Re: I assume that you installed PyGame with: pygame-1.8.1release.win32-py2.6.msi The missing DLL seems to be base.pyd and it should be in your directory C:\Python26\Lib\site-packages\pygame Vista on occasion does screwy things when installing, depending on your security settings. It does not like DLLs and sometimes does not install them, but also does … | |
Re: Welcome to the wonderful world of Python programming. Just a note, avoid using function and module names for variable names. There are times when it will bite you. | |
Re: [QUOTE=Jhun Phil;816427]We all know that Obama has made it clear that he is going to make restrictions on outsourcing businesses. If implemented then that means trouble for many countries that relies on outsource businesses like call centers and other businesses. Do you think it’s a sound decision made by him?[/QUOTE]Judging … | |
Re: Just a question, what is your operating system? Vista sometimes gets on a silly security trip and simply does not install certain .dll and .pyd files. The nasty thing about it, it doesn't tell you! | |
Re: Just a note, the RS232 serial port is quickly disappearing on most newer computers. Has anyone worked with a USB port? | |
Re: Interesting assignment, with an excellent explanation by the teacher. Would be nice to know what table.csv roughly looks like. Should be relatively simple yet challenging to solve. Just a note, don't use l1, l2, l3 ... for variable names, they look too much like the numbers 11, 12, 13 ... | |
Re: Just a note, since count() is a builtin Python function, avoid using it for your own function name. Use something like mycount(). | |
Re: [QUOTE=The Dude;799916]Interesting stats,etc on many different things :) [url]http://www.worldometers.info[/url][/QUOTE]Fantastic real time info! Thanks Dude! | |
Re: Looks like the book made a mild error to confuse the student, the output will be in the hash order of the dictionary, so don't worry. | |
Re: I am not sure why you make it so complicated. Anybody with a basic knowledge of Python would code it this way: [code=python]while True: print "Hello, how are you?" language=raw_input("Pick a language: french, german, hungarian, dutch: ") if language == "french": print"Bonjour, comment allez-vous?" elif language == "german": print"Hallo, wie … | |
Re: Generally you use a while loop you can break out of when done. I would use functions and pass arguments to streamline your code: [code=python]# random_game.py import random def dieroll(): randomnumber = random.randrange(10)+1 return randomnumber def get_spouse(spouse): print "Enter the name of three people you could marry: " name1 = … | |
Re: Using sys.stdout.writelines() or sys.stdout.write() is kind of cumbersome and on Linux you also need a sys.stdout.flush() to make it work. I think internally [B]print(s), [/B]translates to [B]sys.stdout.write(s)[/B] | |
Re: A small function that will check if an integer is odd or even: [code=python]def is_odd(n): """return True if n is an odd integer, else False""" if n & 1: return True else: return False [/code] | |
Re: Numpy handles only numeric arrays, not object arrays. I think VPython actually uses numpy/numeric internally. | |
Re: [QUOTE=jbennet;806903]ijn south korea they have like 1gb a second internet[/QUOTE]Would that be just within that particular country? | |
Re: Makes you sort of wonder which countries are targeted by British nuclear missiles? | |
Re: [QUOTE=Ene Uran;801279]If you remember, there was a claim by McCain's election staff that he invented the Blackberry thing. That would make him a pretty old geek.[/QUOTE]He might have invented the Blackberry, but I don't think he ever was a geek. | |
Re: Iron antimatter the size of a pinhead would do. You would have to suspend it in an absolute vacuum with a magentic field. If it reacts with matter, it would create twice the energy predicted by Einstein's famous formula. | |
Re: [QUOTE=Lardmeister;805891]Like the poet says, love is a mutual thing. If it's one sided, then it quickly turns into agony. A couple that truly loves each other doesn't need to exchange many words. I look at my mom and dad, and see love every day.[/QUOTE]Lardmeister, God bless you, you are a … | |
Re: Generally you write a function for that, something like this: [code=python]# check the input of an integer between given limits def check_input(low, high): """ check the input to be an integer number within a given range """ prompt = "Enter an integer number between %d and %d: " % (low, … | |
Re: [QUOTE=Ezzaral;610247]It was a conspiracy by the folks who make plastic tamper-proof seals :P[/QUOTE]Right on! They are also called 'senior proof seals'. | |
Re: Actually, Portable Python comes also with IDLE that will use the portable version. | |
Re: When is the bird going to drop something on the guy or bring down an airplane? | |
Re: I would avoid using Python26 with wxPython. I had problems and went back to Python25. | |
Re: My question is, how do you determine the values for f.seek() in such a large file? | |
Re: My semi-educated guess is that a primitive GUI toolkit like Tkinter does not have a superscripting option. For that you need wxPython, it has widgets like wx.lib.fancytext or wx.html.HtmlWindow that use simplified xml or html code. For an example see: [url]http://www.daniweb.com/forums/post782156-106.html[/url] | |
Re: I didn't know that 'Stars and Stripes' is printed in Germany. Good find there Dude! | |
Re: It is very obvious that I am from Mars. Everybody looks like this --> | |
Re: I just happen to have it handy: [code=python]# convert all .tif file in a directory to .gif files # needs Python Image Library (PIL) free from: # http://www.pythonware.com/products/pil/index.htm import os from PIL import Image # give the directory the TIF files are in path = 'C:/temp/test/' # make it the … | |
Re: Thanks for the lead AD, there are a whole slew of other rather funny banned commercials! I like the girl on the copier. [url]http://www.youtube.com/watch?v=nI2y4s3vzgk&NR=1[/url] | |
Re: [QUOTE=mn_kthompson;779457]I was looking over some code for an open source project and I saw some strange whitespace stuff that I didn't even think would run. The thing is, it runs just fine. I was wondering if someone could explain what I'm missing. I don't want to copy the exact code, … | |
Re: There is a very good free online book "A Byte Of Python" by C.H. Swaroop at: [url]http://www.swaroopch.com/notes/Python_en:Table_of_Contents[/url] | |
Re: [QUOTE=evstevemd;777929]I would like to learn regular expressions. I have no Idea what it is (I always see people here using). Can someone explain a litle and suggest good tutorial? Didn't mean to deviate the thread, so keep your first focus on the thread, then you can answer my question[/QUOTE] There … | |
Re: [QUOTE=san245;777003]Yeap I knw hw beautfl it looks bt thng is I dnt knw much abt progmng...ie y I askd help...[/QUOTE]Pretty goofy English there! At first you need to help yourself by studying the manual a little. | |
Re: Without the __init__() class constructor this class would behave strange: [code=python]class DoesNothing(): print 'I have been initialized' [/code] | |
Re: Wow, the Fatso patrol! Would it lower the cost of healthcare? Of course Japan has a lot of rather crowded puplic transport, too many fat folks would just make it worse. The last flight I took, the guy next to me was so fat that he literally overflowed into my … | |
Re: If you are just interested to extract the text of a PDF formatted page, then take a close look at: [url]http://code.activestate.com/recipes/511465/[/url] | |
Re: Installing python 2.5.4 over version 2.5.2 should not bother any third party modules like wxPython. Version 2.5.4 is simply a bug upgrade within the 2.5 series. Don't uninstal version 2.5.2, the new version will simply overwrite it. | |
Re: The stock market is full of bears right now, enough to scare everyone. | |
Re: [QUOTE=Dave Sinkula;762071][URL="http://directorblue.blogspot.com/2008/11/bailing-out-uaw-for-bargain-price-of.html"]Bail out the UAW for the bargain price of only $500 billion![/URL][/QUOTE]Some blogger didn't do the required homework again. The $75 attributed to the UAW autoworker includes all the benefits and the retiree burden. The actual wage of a UAW worker is $28. I have many friends that work … | |
Re: I thought CO2 was good for the growth of plants. We need more CO2 to encourage the growth of plants that are used for food and materials of construction. Again, Google is on the leading edge! | |
Re: You might get further if class Thing inherits class FuncObj. | |
Re: I am happy if my old Chevy Malibu makes it to school without breaking down. | |
Re: You may want to look at "Starting Python" right here: [url]http://www.daniweb.com/forums/thread20774.html[/url] |
The End.