904 Posted Topics

Member Avatar for Serunson
Member Avatar for The Dude

[QUOTE=Lardmeister;455658]Yes I do, the K is too German for my taste.[/QUOTE]Lardmeister, a few words of advice: Hate only spreads hate!

Member Avatar for Lardmeister
0
177
Member Avatar for Lardmeister

I think the Dutch suffer from the same mistake that France made, they ignore their growing younger muslim population.

Member Avatar for Lardmeister
0
113
Member Avatar for arkad

Note that argList[1] does not give list as result. Try: os.execv(mpathTotest, ["argument 2"]) or: os.execv(self.mpathTotest, [argList[1]])

Member Avatar for arkad
0
1K
Member Avatar for The Dude
Member Avatar for Lardmeister
0
193
Member Avatar for bumsfeld

Is there a way to limit size of a list in Python, so it does not use all memory?

Member Avatar for vegaseat
0
13K
Member Avatar for Eclipse77

Jeff, if you want to know how he did it, just click temporarily on "REPLY W/QUOTE" and look at the text shown.

Member Avatar for jrcagle
0
174
Member Avatar for dt2611

You should start your wxPython program with something like that: [code=python]app = wx.App(0) MyFrame(None, -1, 'frame title') app.MainLoop() [/code] or that: [code=python]class MyApp(wx.App): def OnInit(self): frame = MyFrame(None, -1, 'frame title') frame.Show(True) self.SetTopWindow(frame) return True app = MyApp(0) app.MainLoop() [/code]

Member Avatar for bumsfeld
0
84
Member Avatar for Taffd

Digital picture of the right hand (palm) so you can see the line pattern.

Member Avatar for Lardmeister
0
114
Member Avatar for Bmarkusrowe

Easily done by not putting the recursive call into the return function, use temporary variable, something like this: [code=python]def factorialp(n): if n < 1: return 1 q = n*factorialp(n-1) print "%d! = %d" % (n, q) return q factorialp(5) """ result --> 1! = 1 2! = 2 3! = …

Member Avatar for bumsfeld
0
74
Member Avatar for jobs

You mean something like that: [code=python]try: fin = open("missing.txt", 'r') # optional error value what_error except IOError, what_error: print what_error """ result --> [Errno 2] No such file or directory: 'missing.txt' """ [/code]

Member Avatar for bumsfeld
0
83
Member Avatar for Dave Sinkula

The English have survived wars with the Scotts, the Danish, the Germans, the Spanish, the French, also rebellious Irish, and Dutch settlers. They have been kicked out of America, the Middle East, India, and Africa. Yet they are resilient, proud, smart and capable people! Despite Cal Thoma and his negativism, …

Member Avatar for EnderX
0
331
Member Avatar for corolaron

[QUOTE=jwenting]well, if I were a teacher having to grade that I'd fail it immediately anyway. Ugliest mix of C and C++ I've ever seen, global variables, very bad variable naming, etc. etc.[/QUOTE] Looks like our friend brahle uses cstdio rather than iostream because of the much smaller executable it produces. …

Member Avatar for gkmishr1
0
2K
Member Avatar for The Dude
Member Avatar for John A
0
105
Member Avatar for The Dude

If the pilot's fate is to die, do the passengers come along? What is your fate as a coal-miner, if the owner has bought politicians to bypass safety?

Member Avatar for hbk619
1
125
Member Avatar for Ancient Dragon

[QUOTE=Brent.tc;424735]The video has been removed by the user... :([/QUOTE] It's called freedom of speech! I was once in Indiana and wondered why the people in the market place carried submachine guns and drove armored personnel carriers!

Member Avatar for MidiMagic
0
66
Member Avatar for katharnakh

If you want to do that sort of thing, you might as well download the console module from: [url]http://effbot.org/downloads/[/url] Console interface for Windows only (versions up to Python25 available): console-1.1a1-20011229.win32-py2.5.exe Look at documentation at: [url]http://effbot.org/zone/console-handbook.htm[/url]

Member Avatar for StrikerX11
0
359
Member Avatar for flaerpen

Wouldn't it be simpler to create a polygon with coordinates x0,y0 and x,y and x1,y1 back to x0,y0 and fill it with the color to match?

Member Avatar for flaerpen
0
129
Member Avatar for Dave Sinkula

Why only punish the corporals? How about the sergeants and lieutenants?

Member Avatar for jbennet
0
320
Member Avatar for freddypyther

You can create and save a module of your favorite class collection this way: [code=python]# put number of your favorite classes into one module # save it as MyClassCollection.py (preserve filename case) somewhere # on the PYTHONPATH so Python's import can find it class ClassA(object): def __init__(self, color='blue'): self.color = …

Member Avatar for jrcagle
0
137
Member Avatar for fredzik

The problem with time.sleep(sec) is that your whole program sleeps unless you thread the background action. So BearofNH's use of time.time() is more appropriate.

Member Avatar for fredzik
0
96
Member Avatar for dcc

Honest politicians would annoy me, if there were any. I am so used to the fact that they all lie.

Member Avatar for UrbanKhoja
1
619
Member Avatar for sharma_vivek82

Can you tell us what you mean under synchronization. You may be using the wrong terminology.

Member Avatar for bumsfeld
0
80
Member Avatar for Serunson

Unquestionably one of the squirrels left over from Hitler's Killer Squirrel experiment. After all this murderous fellow grew up somewhere near there.

Member Avatar for nieves22
0
94
Member Avatar for fredzik

Sorry, I don't really know what you are talking about. I have never seen those purple thingies.

Member Avatar for fredzik
0
186
Member Avatar for Serunson

Call me strange, but I like the stink of it! The noice is exciting too! Best of all, I like when they throw sparks. Beats ice hockey anytime.

Member Avatar for MidiMagic
0
160
Member Avatar for hbk619

[QUOTE=linux;389357]I play guitar... I have a Gibson Les Paul and a Fender Stratocaster. Hear some of my stuff: [url]http://www.soundclick.com/alexglasser[/url] It's not much, but I like it.[/QUOTE] Alex, thanks for the link, neat site!

Member Avatar for linux
0
109
Member Avatar for hbweb500
Member Avatar for hbweb500
0
253
Member Avatar for christina>you
Member Avatar for Prahaai
Member Avatar for darkfuria

I think that computer programming can be made exciting even with old languages like Qbasic. It's the dullfugg of a teacher that can bore the students out of their mind.

Member Avatar for bumsfeld
0
238
Member Avatar for Serunson

[QUOTE=WaltP;389241]Dinosaurs are extinct. There can't be new ones. Only old, dead ones... :icon_razz:[/QUOTE]I have seen plenty of Hollywood movies were the dinos where very much alive!

Member Avatar for joshSCH
0
95
Member Avatar for Ruso1636
Member Avatar for ThePATRIOT

Just one small hint: Your title "find way out !!!" is not conducive to get help. should have been something like "help with GSM/GPIO". This way anyone with knowledge of the subject will look further.

Member Avatar for ThePATRIOT
0
86
Member Avatar for scru

Python is glue language for all sorts of other computer languages. Might be possible to use C# dlls. All you really need to do is to figure out how to relate Python argument types and C# argument types. Similar to the ctypes module.

Member Avatar for bumsfeld
0
109
Member Avatar for pyapplico

I was forced to learn it in school. Kind of one unsightly language, and lots of things to trip over, but you get used to that! We used Dev-Cpp (GNU CPP) and I still use that.

Member Avatar for hinduengg
0
164
Member Avatar for Matt Tacular

[QUOTE=a1eio;307902]yea, ditch the printing and append it to a list and it'll be almost instant. :)[/QUOTE]Even with ditching print and returning list of primes, this algorithm is not like speed demon. It takes 6,000ms for primes up to 10,000 compared to 4ms with standard sieve algorithm.

Member Avatar for vegaseat
0
288
Member Avatar for dummies2

I keep reading that MySQL is hard to program with, no matter what computer language you use. Hope you find someone familiar with MySQL.

Member Avatar for BearofNH
0
152
Member Avatar for iamthwee

[QUOTE=pyarticles;367806]Try [URL]http://pyarticles.blogspot.com[/URL][/QUOTE] Where is the meat?

Member Avatar for Ene Uran
0
697
Member Avatar for Mouche

[QUOTE=LaMouche;310092]I know printing primes isn't anything new, but (like always) I'd love to hear some feedback on how I can make my code more efficient and other constructive criticism. [php] def print_primes(r=10): primes = [ ] for i in range(2,r+1): prime = 1 for divisor in range(2,i): if i % …

Member Avatar for arsham
0
141
Member Avatar for bumsfeld
Member Avatar for vegaseat
0
2K
Member Avatar for 7even

This might help: [code=python]import wx class DemoFrame(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, 'Demo', size=(600, 400), pos=(300,300)) # make the widgets ... self.panel1=wx.Panel (self, -1) self.panel1.SetBackgroundColour ("white") # create splitter windows self.splitter = wx.SplitterWindow(self, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D) self.splitter2 = wx.SplitterWindow(self.splitter, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D) self.mainpanel …

Member Avatar for vegaseat
0
223
Member Avatar for jwjazz

I am scratching my head on this one! However, this modifiecation seems to work correctly ... [code=python]num = 32 b2 = 2 x = 1 def increasex3(num, b2, x): while num%(b2**x) < num: x = x+1 increasex3(num, b2, x) #print x # test return x result = increasex3(num, b2, x) …

Member Avatar for jrcagle
0
137
Member Avatar for qwerty__123

I think you are using wrong word here, list is like an array. You simply want each element of list displayed on separate line, right? [code=python]# for instance this is list cards = ['4 c', '12 h', '2 s', '6 s', '8 s'] # one list item per line display …

Member Avatar for bumsfeld
0
104
Member Avatar for thian_seng

If you don't have any arguments to pass you can import the C function directly from msvcrt.dll: [php]# optional console wait for keypress, any key # C:\Windows\System32\msvcrt.dll contains C functions # works only with console (many IDEs have their own output) from msvcrt import getch print "Hello!" getch() # this …

Member Avatar for bumsfeld
0
90
Member Avatar for Rashakil Fol
Member Avatar for Gazco
0
205
Member Avatar for Jellomaster

Obviously something wrong in your MainWin class. Maybe the missing indents in reg()? Do you get any traceback error? Change line app = wx.PySimpleApp(0) to app = wx.PySimpleApp(redirect = True) I don't have MySQLdb installed, so I can't help you much.

Member Avatar for jrcagle
0
83
Member Avatar for Gigs_

Something like this will work fine: [code=python]from Tkinter import * root = Tk() root.title('root win') root.geometry("400x300+30+30") # create child window top = Toplevel() top.title('top win') top.geometry("200x100+100+130") top.lift(aboveThis=root) root.mainloop() [/code]

Member Avatar for bumsfeld
0
78
Member Avatar for tacmedic

We are talking PIL. 'n^2' ??? All I can think of is that you may want to average the color of one 4x4 area rather than one 2x2 area.

Member Avatar for bumsfeld
0
103
Member Avatar for liz517

x to the power 0.16 would be x**0.16 To make your Python code readable, you neeed to preserve the indentations, see: [url]http://www.daniweb.com/techtalkforums/announcement114-3.html[/url]

Member Avatar for liz517
0
94

The End.