904 Posted Topics
Re: Why waste a perfectly fine computer on scum like that? I say heads off with a rather dull guillotine! | |
Re: [QUOTE=jwenting;542941]Take me to your lizzard![/QUOTE]Very funny! Could be: "Where is the head computer?" | |
Re: Here is the competition: [QUOTE]NOTICE: PLEASE NOTICE!!!!! You may have noticed the increased amount of notices for you to notice. And, we have noticed that some of our notices have not been noticed. This is very noticeable. It has been noticed that the responses to the notices have been noticeably … | |
Re: On Google map the whole place is simply blank! Why is this place so important? | |
Re: Simply use this: [code=python] # list all the modules Python currently knows about ... help("modules") [/code] | |
Re: Thanks for answer, for complete pyhthon n00b , this is pretty complex coding!!! | |
![]() | Re: At first blush i would say this might do: [code=python]# compare these two list set and convert # w_b into [0.5, 0, 0.5, 0] a = ['a', 'b', 'c', 'd'] w_a = [0.25, 0.25, 0.25, 0.25] b = ['a', 'c'] w_b = [0.5, 0.5] for ix, aa in enumerate(a): if … ![]() |
Re: The closest thing would be jython: [url]http://www.jython.org/[/url] | |
![]() | Re: Just taking hasty look, I would say no because py2app needs to include some files specific to the MAC OS. You don't have those on your Windows PC. |
Re: For small country France did pretty well! Would have done better, but the Chinese food is not rich enough! | |
Re: A wonderful achievement Ene! The drinks are on the house! --- 966 for me right now --- | |
Re: Like to see tennis, everything else is too boring! So what if they can swim, walk, run, jump, throw, bike, spit, row the distance of 50 meters, 100 meters, 200 meters, 500 meters, 1000 meters, 10000 meters and so on. Also, what is this thing separating the boys from the … | |
Re: For me it would be the "Remote Control Spitfire Mk IIB" so I could bomb some of the folks in my neighborhood, that I suspect of producing WMDs, into long lasting submission. | |
Re: [QUOTE=R0bb0b;668437]Yes, all the stupid laws that are passed and little by little everything is taken away. Can't smoke here, can't drink there, can't cook your burgers like that, this is the meat section and that section is for vegetarians only, your meat is rare so you need to eat outside. … | |
Re: Proof that [::-1] works for spelling string in reverse: [code=python]s1 = "racecar" s2 = "kayak" print s1, s1[::-1] print s2, s2[::-1] [/code] :) | |
Re: Functions sort() and sorted() reside in the core of the Python interpreter which is written in C and compiled. On Windows the Python core is for instance in the dynamic link library called python25.dll which the Python installer put into directory C:\WINDOWS\system32 Here is example of the rather slow but … | |
Re: I eat good helping of quiche Lorraine every day, it keeps me from programming. | |
| |
Re: Congratulations Snee! God willing, I should reach this important milestone by year's end. | |
Re: I agree, Other's avatars are pretty artistic in their own right. The en brosse styling is cool. Colour discretion could be one bit more together. | |
Re: If at first you don't succeed, destroy all evidence that you tried. | |
Re: Hard to believe that the history of Windows is that complex. | |
Re: This Python code snippet will show you how to do this: [url]http://www.daniweb.com/code/snippet390.html[/url] | |
Re: If you know in which windows dll the function SetCursorPos(x, y) is situated, then you can use module ctypes to get access to it. | |
Re: Once k gets past the number of available elements in your list you will get an IndexError. You can put in series of if statements making sure that k does not exceed the length of your list, or simply trap the error to break out of the while loop: [code=python]list2 … | |
Re: It is only a duck if it acts, looks and sounds like one. Processed duck is not a duck. | |
Re: Paint.NET (good features and you pick the price) Open Office (beats MS Office new and old, donate if you like it) wrar (beats winzip, pay if you like it) | |
Re: If MyClass1.py is in the working directory, you shouldn't need to worry, since the first entry in PYTHONPATH is the present directory. Your problem is the import MyClass1: Python now looks for the file MyClass1:.py and of course can't find it. Want to take a look at PYTHONPATH? Here it … | |
Re: The way you are importing to need to use Object1.Object1.printDamnIT() to give the namespace too. | |
Re: I think the Pythonic approach is the use of powerful, optimized modules. So yeah, wxPython uses powerful, optimized widgets. Python has clearly borrowed the best of several earlier languages. | |
Re: Only the class instance is pickled, the class structure needs to be coded in the new program again: [code=python]import pickle # this class structure also has to be coded in another # program, if you want to load the pickle file there class authorObj(): class authors(): pass q = authorObj() … | |
Re: Change [code]while [(t1.arm==0) or (t2.arm==0)]: [/code]to [code]while (t1.arm > 0) or (t2.arm > 0): [/code] | |
Re: The Python interpreter is used for simple stuff, mostly one liners. You have to press the Enter key after every line you write, so the interpreter display would look something like this: [code=python]>>> def add(a, b): ... return a + b ... >>> add(1, 3) 4 >>> [/code]Ugly stuff to … | |
Re: Write your major algorithms and test them thoroughly. Now design the GUI and bring in the algorithms. If you are familiar with QT use PyQt, otherwise you better start with the more popular wxPython GUI toolkit. You can get drag and drop frame builder for wxPython called Boa Constructor. Using … | |
Re: What is your operating system? Did you use binary installer package? For instance, in your C:\Python25\Lib\site-packages\pygame directory you should find SDL_ttf.dll for fonts and SDL_mixer.dll for sound and video. If you don't have those, your installation went bad. | |
Re: Running out of integer space in series of scientific calculations in C. The results get really goofy at times without any warning, depending on the data input. | |
Re: To avoid the flicker, use .bmp file for your button image to reduce the palette problem (.jpg files bring in too many colors). | |
Re: Here is example how you could approach this project: [code=python]# exploring recursion def average(qq=[]): """ using empty list as default will make the list static recursion forms its own loop, break out with return """ try: x = float(raw_input("Enter number (q to quit): ")) qq.append(x) print "data list =", qq … | |
Re: You need to get involved in parsing, here is example: [code=python]data = '''\ "returns=int", "operationName=doComplexStuff", var1="integer", var2="(a="integer", b="integer")", var3="(a="string", b="integer")" ''' q = data.split(',') m = [] t = "" con = False for k in range(len(q)): s = q[k].strip() # parse for () pairs and concatenate # before appending … | |
Re: [QUOTE=paulthom12345;613806]HI I was having a look into classes and i noticed i saw a lot of things like [code] class fruitcake(object): pass [/code] my question is what is the point of the "object" being in the class arguments as it is a Built In Function and i couldn't work out … | |
Re: Python also has HTMLParser module that can help you muchly: [code=python]# extract a specified text from web page HTML source code import urllib2 import HTMLParser import cStringIO # acts like file in memory class HTML2Text(HTMLParser.HTMLParser): """ extract text from HTML code basically using inherited class HTMLParser and some additional custom … | |
Re: Some editors like DrPython, UliPad, PyScripter, IDLE have internal output window that will stay open without the use of console wait line like raw_input("Press <Enter> to exit.") | |
Re: There are many icon libraries on the internet, for instance: [url]http://www.aha-soft.com/iconlibs.htm[/url] They have a fair number of free ones to download. | |
Re: Anyone know good drug that fights senility? One of the presidential candidates is interested in cutting back his senior moments. | |
Re: Actually Snee made mistake in his code. Do not write your additional code in the __init__ctrls() method, boa tells you not to edit this part. If you do, the Frame Designer frowns on it, if you want to use it later to add additional widgets. So in the frame designer … | |
Re: Maybe I should start selling tickets to heaven. I think there are enough fools who would buy one. |
The End.