904 Posted Topics
Re: I thought VB was hard to read, this almost impossible! | |
Re: What compiler is that? Can't find dos.h anywhere! | |
Re: These looks very much like the code VegaSeat wrote earlier? | |
Re: Right from the example code! Come on, you can do better! | |
Re: Mr. Omen, your code samples a plane riboff from the examples that come with the download. Can't you apply a little imagination? | |
Re: Dave, you are correct here, there is difference between representation and conversion. | |
Re: I think FunsterStil is Danish for WindowStyle. | |
Re: Even my professor of mathematics couldn't believe this easy algorithm. | |
Re: Extension .pyd is used for C compiled library files for Python. | |
What is more efficient? 1) import math 2) from math import * 3) from math import sin, cos | |
Re: [QUOTE=mediachicken;954985]Is there a way to use a similar method with images instead of pixels? [B][COLOR="Red"]I know about all of that[/COLOR][/B], but I need to load multiple images into PIL and tile them in a square... Is it possible?[/QUOTE]Looks like Sneekula wasted his time on you then. I assume you also … | |
Re: [QUOTE=thr;957787]please help me to choose best progranmming language between java, python, php, c#,... that cover above features[/QUOTE]Since you are already used to C++ I would say use Java. | |
Re: If you are familiar with C++, Java would be the way to go. Python is simply too uncomplicated. | |
Re: niek_e is correct, successful compression depends on the source and the compression algorithm. Here is one example of large repeating text that the zip algorithm fails with, but bz2 compression works great: [code=python]# exploring Python file compression/decompression module bz2 # .bz2 files can be decompressed with WinRAR utility # uncompressed … | |
Re: Swaroop C.H. has rewritten his excellent beginning Python tutorial for Python3: [url]http://www.swaroopch.com/notes/Python_en:Table_of_Contents[/url] | |
Re: [QUOTE=mahela007;954989]Is the RAM used as the buffer?[/QUOTE] I would say yes, unless your Operating System uses disk space as virtual memory. | |
Re: The Tkinter GUI toolkit has data input dialogs that will validate your input, as shown here: [code=python]# Python GUI toolkit Tkinter has three different data input dialogs: # tkSimpleDialog.askstring(title, prompt [,options]) # tkSimpleDialog.askinteger(title, prompt [,options]) # tkSimpleDialog.askfloat(title, prompt [,options]) # does error trapping with int and float, also optional max/min … | |
Re: Nice project! Why don't you at least test-print self.raw and self.raw_read to see what you got. | |
Re: There is example at: [url]http://www.daniweb.com/forums/showpost.php?p=947978&postcount=46[/url] that might work. | |
![]() | Re: You really should read at least one tutorial on OOP and classes. |
Re: It's best to test the module first with something like this: [code=python]from math import pow from math import log10 def get_entropy(d, t): """ where d is the element's data dictionary and t is temperature """ t = t/1000.0 ent = (d['A']*log10(t) + d['B']*t + d['C']*pow(t,2.)/2. + d['D']*pow(t,3.)/3. - d['E']/(2.*(pow(t,2.))) + … | |
Re: [QUOTE=iamthwee;295301]I could do the same in assembly, wow assembly look how powerful it is![/QUOTE] If you had used assembly language you would now be 10% done! | |
Re: I like wxPython. However, if you use the newer Python 3.1, it could take long time for wxPython to be available. So now I am learning PyQT. Again, Tkinter isn't bad to learn in the beginning, just to get used to GUI programming concepts. To me PyGT is really complex, … | |
Is there a good way to access browser like IE and run an HTML file from within Python code? | |
Re: Don't you need the label identifier for the layout manager? You could go to three character identifier that is somewhat recognizable like 'emz' for email label or 'adz' for address label. | |
Re: You can use 32x32 Windows .bmp file instead of .ico file. | |
Re: Function raw_input() would force the user to type in the entire XML code. I don't think you want this. Normally the XML code would come from file, something like this: [code=python]fin = open("Myxml.xml", "r") xml_string = fin.read() fin.close() # now the xml code is represented by xml_string for you to … | |
Re: Check into: wx.lib.filebrowsebutton.FileBrowseButton(parent, labelText, fileMask) | |
![]() | Re: Hint, in while loop turn the number string into list of individual digits and sum the list until the sum is less than 10, then break. Careful here, you are using strings(characters) and integers. So you have to use str() and int() to convert at the appropriate time. For example: … |
Re: Maybe something like wx.ScrolledWindow will do, see: [url]http://www.daniweb.com/forums/showpost.php?p=933440&postcount=116[/url] | |
Re: I have Python2.5.4 and Python3.1 working on the same XP machine. Programming editors (IDE) like IDLE may have to be convinced with batch file to use the correct Python version. Here is example: [code]REM batch file to force IDLE to run with Python 3.1 REM save as IDLE31.bat C:\Python31\Pythonw.exe -u … | |
| |
Re: [QUOTE=sravan953;930169]Replying to your second question: [CODE] l=['apple','orange','mango','pear','strawberry'] for a in l: if(l=='pear'): l.remove(i)[/CODE] That ought to work! :P[/QUOTE]Why not simpply: [code=python]mylist = ['apple','orange','mango','pear','strawberry'] mylist.remove('pear') print(mylist) # ['apple', 'orange', 'mango', 'strawberry'] [/code] | |
Re: Note that module os calls do not allow your Python program to run in the background, whereas module subprocess calls do. | |
Re: For some odd reason that question has come up and has been solved several times in the past. One quick search will certainly help you. | |
Re: Yes, instead of using geometry manager pack() or grid(), use place(x, y) for layouts. Note that place(x, y) is absolute, and coordinates x or y can go negative to shift the widget out off the window. One nice trick! Care should be taken not to mix the different geometry managers!!! | |
Re: For the somewhat simple program you are writing, you don't need class objects. Those things are not too enjoyable for beginners. With Java you would be stuck with them, but Python offers you the freedom to do procedural programming too. Each room would get one name/identifier like this: [code=python]room1 = … | |
Re: [QUOTE=fallopiano;922160]hi all. I know that when you create a class, you put all arguements for that class in a __init__ functions, but what about for actaully making classes? confused? this is what I mean: [CODE=python]class Aclass(Object): insert code here...[/CODE] what is the purpose of 'Object'?[/QUOTE]This is the newer class writing … | |
Re: You can use this: [code=python]mylist = [ [1, 9, 22, 28, 0.69887889000000003, 0.98993399999999998, 2], [4, 27, 6, 22, 0.81186093999999998, 1.1221458099999999, 2], [4, 27, 100, 30, 0.74796748000000002, 1.0448537600000001, 2], [4, 1, 30, 45, 0.48522300000000002, 0.77061900999999999, 2], [4, 27, 1, 51, 0.54467741999999997, 0.83013524999999999, 2], [4, 28, 22, 4, 0.77556899999999995, 1.0917697900000001, 2], [5, … | |
Re: You have to convert your data string to list of lists and then sort the sublists by item index: [code=python]s = """\ 27 4 220 16 0.76151102 1.06059456 27 4 220 17 0.61465055 0.90107796 27 4 221 22 0.81186094 1.12214581 27 4 223 28 0.69887889 0.98993400 27 4 225 30 … | |
Re: Thinking about the way it's done with C on Windows, and that you have to create an certain .exe file and then rename to .scr This might be not doable in Python since it does not make .exe file. Also looks like it might be highly specific to the operating … | |
Re: In France we have the problem too. I only wish we could get Mexican workers. At least they are christians. The first generation of guest or illegal workers work very hard, but their numerous offspring is not. I am not very sure, if a hate inspiring thread like that belongs … | |
Re: My choice of female who thinks she is smart and bitches all the time, or women with a good body and I can tell to be quiet is obvious! There is nothing more deflating to man than excessive bitchig. | |
Re: The Brits have a stiff upper lip, the Yanks have ED. | |
Re: [QUOTE=Dave Sinkula;614007][url]http://atheism.about.com/od/isatheismdangerous/a/AtheismKilled.htm[/url][/QUOTE]Errors on the page! Divine intervention? | |
Re: To follow up on the paulthom12345 information: [code=python]""" win32api.GetVolumeInformation(path) returns tuple containing ... string - name of volume/disk/drive long - serial number of volume/disk/drive long - maximum component length of a file name long - flags specific to the file system string - file system name """ import win32api path … | |
Re: If Easter is holiday, then 'Happy Easter' everyone! If Easter is religious history, then 'Sad and Sorry Easter' to small group! | |
Re: Spain has unemployment rate of 14%. Most African coutries are much higher than this, like Zimbabwe shows 80% in the CIA's World Factbook. So the US has a long way to go! |
The End.