904 Posted Topics

Member Avatar for soumyajit_c`
Member Avatar for anurag_pareek
Member Avatar for Dave Sinkula
Member Avatar for eagleeye
Member Avatar for Dark_Omen
Member Avatar for bumsfeld
0
146
Member Avatar for Dark_Omen

Mr. Omen, your code samples a plane riboff from the examples that come with the download. Can't you apply a little imagination?

Member Avatar for bumsfeld
0
333
Member Avatar for Dave Sinkula

Dave, you are correct here, there is difference between representation and conversion.

Member Avatar for al3x748769
0
542
Member Avatar for 1o0oBhP
Member Avatar for vegaseat
Member Avatar for bumsfeld
2
193
Member Avatar for chound
Member Avatar for tarun02kumar
Member Avatar for tarun02kumar
0
435
Member Avatar for bumsfeld

What is more efficient? 1) import math 2) from math import * 3) from math import sin, cos

Member Avatar for Stefano Mtangoo
0
117
Member Avatar for mediachicken

[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 …

Member Avatar for Ene Uran
0
2K
Member Avatar for thr

[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.

Member Avatar for John A
0
100
Member Avatar for thr

If you are familiar with C++, Java would be the way to go. Python is simply too uncomplicated.

Member Avatar for tomleo
0
247
Member Avatar for rajivgupta1107

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 …

Member Avatar for bumsfeld
0
185
Member Avatar for Lingson

Swaroop C.H. has rewritten his excellent beginning Python tutorial for Python3: [url]http://www.swaroopch.com/notes/Python_en:Table_of_Contents[/url]

Member Avatar for Lingson
0
262
Member Avatar for mahela007

[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.

Member Avatar for bumsfeld
0
349
Member Avatar for Dan08

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 …

Member Avatar for Dan08
0
589
Member Avatar for chrischavez

Nice project! Why don't you at least test-print self.raw and self.raw_read to see what you got.

Member Avatar for woooee
0
202
Member Avatar for darangho

There is example at: [url]http://www.daniweb.com/forums/showpost.php?p=947978&postcount=46[/url] that might work.

Member Avatar for bumsfeld
0
130
Member Avatar for sravan953
Member Avatar for bumsfeld
0
93
Member Avatar for princessotes

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.))) + …

Member Avatar for bumsfeld
0
125
Member Avatar for WoBinator

[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!

Member Avatar for Zacadx15
0
503
Member Avatar for funfullson

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, …

Member Avatar for funfullson
0
142
Member Avatar for bumsfeld

Is there a good way to access browser like IE and run an HTML file from within Python code?

Member Avatar for you2
0
216
Member Avatar for zachabesh

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.

Member Avatar for bumsfeld
0
93
Member Avatar for Stefano Mtangoo
Member Avatar for zanst

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 …

Member Avatar for zanst
0
175
Member Avatar for kalyan mohan
Member Avatar for kalyan mohan
0
106
Member Avatar for sravan953

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: …

Member Avatar for bumsfeld
0
132
Member Avatar for jcmeyer

Maybe something like wx.ScrolledWindow will do, see: [url]http://www.daniweb.com/forums/showpost.php?p=933440&postcount=116[/url]

Member Avatar for jcmeyer
0
102
Member Avatar for foosion

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 …

Member Avatar for foosion
0
180
Member Avatar for mathijs
Member Avatar for abhigyan91

[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]

Member Avatar for shadwickman
0
143
Member Avatar for Aiban

Note that module os calls do not allow your Python program to run in the background, whereas module subprocess calls do.

Member Avatar for shadwickman
0
111
Member Avatar for Alex!

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.

Member Avatar for vegaseat
0
117
Member Avatar for foosion

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!!!

Member Avatar for Aiban
0
151
Member Avatar for arinlares

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 = …

Member Avatar for bumsfeld
0
103
Member Avatar for fallopiano

[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 …

Member Avatar for fallopiano
0
116
Member Avatar for sab786

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, …

Member Avatar for sab786
0
129
Member Avatar for sab786

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 …

Member Avatar for bumsfeld
0
89
Member Avatar for a1eio

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 …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for joshSCH

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 …

Member Avatar for GrimJack
1
1K
Member Avatar for ndeniche

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.

Member Avatar for ditz
0
1K
Member Avatar for scru
Member Avatar for GrimJack

[QUOTE=Dave Sinkula;614007][url]http://atheism.about.com/od/isatheismdangerous/a/AtheismKilled.htm[/url][/QUOTE]Errors on the page! Divine intervention?

Member Avatar for GrimJack
0
718
Member Avatar for xeo

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 …

Member Avatar for EAnder
0
6K
Member Avatar for Ancient Dragon

If Easter is holiday, then 'Happy Easter' everyone! If Easter is religious history, then 'Sad and Sorry Easter' to small group!

Member Avatar for ddanbe
0
533
Member Avatar for sneekula

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!

Member Avatar for GrimJack
0
478

The End.