Re: join a samba domain

2008-12-23 Thread Toff
On 22 déc, 19:37, Toff wrote: > On 22 déc, 18:59, Jens Henrik Leonhard Jensen > > wrote: > > Toff wrote: > > >    d = c.Win32_ComputerSystem > > >    d.JoinDomainOrWorkGroup(None, 3, "mydom", "mydompw", r"admin\\mydom") > > > Shouldn't r"admin\\mydom" be "admin\\mydom" or r"admin\mydom". >

Re: no sign() function ?

2008-12-23 Thread Arnaud Delobelle
pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) writes: > def sign_0(x): > if x==0.0: > return 0.0 > elif x>0.0: > return 1.0 > else: > return -1.0 > This might be slightly faster: def sign(x): return 1 if x >

Re: Python's popularity

2008-12-23 Thread Arnaud Delobelle
s...@pobox.com writes: > If you look back at the Tour de France results from the 80's I > believe Greg Lemond won it one year without ever winning a stage. Well I think it was actually in 1990, his last win sadly. -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Django/Turbogears too specific?

2008-12-23 Thread Bruno Desthuilliers
Daniel Fetchinson a écrit : (snip) The 1.x branch of tg is built on cherrypy, the 2.x branch is built on pylons. Both branches depend on external packages for most of their functionality which makes them very flexible. Django is monolithic Except that 1/ you can use each component (request han

Re: Python's popularity

2008-12-23 Thread Bruno Desthuilliers
Steve Holden a écrit : walterbyrd wrote: [...]>> Fooled by version numbers ? No, but I am giving django the benefit of the doubt. The django project told people all along that django was not to be considered production ready before 1.0. I will accept that some people decided to wait until 1.0 ca

[no subject]

2008-12-23 Thread sai
-- http://mail.python.org/mailman/listinfo/python-list

Re: join a samba domain

2008-12-23 Thread Toff
Or maybe could I try with LoadLibrary("netapi32.dll"); and the netjoindomain function ? but it doesn't look very easy -- http://mail.python.org/mailman/listinfo/python-list

Re: using subprocess module in Python CGI

2008-12-23 Thread ANURAG BAGARIA
Thank you for the prompt response. Yeah, I missed out one line at the end of the error, the whole of which is: Traceback (most recent call last): File "process.py", line 18, in retval = subprocess.call(comd, 0, None, None, outptr, errptr) File "/usr/lib/python2.5/subprocess.py", line 443

Re: join a samba domain

2008-12-23 Thread Tim Golden
Toff wrote: On 22 déc, 19:37, Toff wrote: On 22 déc, 18:59, Jens Henrik Leonhard Jensen wrote: Toff wrote: d = c.Win32_ComputerSystem d.JoinDomainOrWorkGroup(None, 3, "mydom", "mydompw", r"admin\\mydom") Shouldn't r"admin\\mydom" be "admin\\mydom" or r"admin\mydom". Or maybe just "

turtle ?

2008-12-23 Thread sai
python newbie here :-) I am trying to get turtle to run but got stuck here: $ python Python 2.5.2 (r252:60911, Aug 5 2008, 16:17:28) [GCC 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import turtle Tracebac

Re: turtle ?

2008-12-23 Thread Gerhard Häring
sai wrote: > python newbie here :-) > > I am trying to get turtle to run but got stuck here: > > $ python > Python 2.5.2 (r252:60911, Aug 5 2008, 16:17:28) > [GCC 4.2.2 20071128 (prerelease) (4.2.2-3.1mdv2008.0)] on linux2 > Type "help", "copyright", "credits" or "license" for more information.

Re: Beep

2008-12-23 Thread Jeremiah Dodds
On Mon, Dec 22, 2008 at 10:42 PM, Jeffrey Barish wrote: > > > On Ubuntu, it is possible to set visual and audible beeps separately. When > I set both, I get the visual beep, but not the audible one. It's not a > Python issue -- so I should take this thread to Ubuntu -- because I observe > this b

Re: Python's popularity

2008-12-23 Thread Hendrik van Rooyen
"r" wrote: >Now thats the kind of friendly banter this group could use. Instead of >people acting as if their bowel-movements smell like bakery fresh >cinnamon rolls! What an amazing thing to say! Doesn't yours? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's popularity

2008-12-23 Thread Hendrik van Rooyen
"r" wrote:: > The writing is on the Wall! Yes it is, and as always, it says : Mene, mene, tekel epharsim. If my protestant upbringing hasn't failed me, it means: Weighed, and found wanting. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's popularity

2008-12-23 Thread Aaron Brady
On Dec 23, 2:33 am, "Hendrik van Rooyen" wrote: > "r" wrote: > >Now thats the kind of friendly banter this group could use. Instead of > >people acting as if their bowel-movements smell like bakery fresh > >cinnamon rolls! > > What an amazing thing to say! > > Doesn't yours? > > - Hendrik You th

Very basic question

2008-12-23 Thread Sengly
Hello all, I would like to calculate a string expression to a float. For example, I have ('12/5') and I want 2.4 as a result. I tried to use eval but it only gives me 2 instead of 2.5 Help!!! Regards, Sengly -- http://mail.python.org/mailman/listinfo/python-list

Re: Very basic question

2008-12-23 Thread Sengly
I can hack it by doing eval('1.0*12/5') but is there any better method? -- http://mail.python.org/mailman/listinfo/python-list

Re: Very basic question

2008-12-23 Thread Aaron Brady
On Dec 23, 4:46 am, Sengly wrote: > Hello all, > > I would like to calculate a string expression to a float. For example, > I have ('12/5') and I want 2.4 as a result. I tried to use eval but it > only gives me 2 instead of 2.5 > > Help!!! > > Regards, > > Sengly >>> float('12')/float('5') 2.3999

wxPython.button.disabled still catching clicks

2008-12-23 Thread mynthon
Hello! (sorry for my english) I have a problem with buttons in wxPython. When button is disabled (by .Disable() or .Enable(False)) it is grayed out but still receive clicks. Eg. i have button that disable itself, runs long action and enable itself: def onClick(self, evt): self.btn.Enable(Fal

Re: wxPython.button.disabled still catching clicks

2008-12-23 Thread Aaron Brady
On Dec 23, 4:50 am, mynthon wrote: > Hello! (sorry for my english) > > I have a problem with buttons in wxPython. When button is disabled > (by .Disable() or .Enable(False)) it is grayed out but still receive > clicks. > > Eg. i have button that disable itself, runs long action and enable > itself

print to console without a line break

2008-12-23 Thread Qian Xu
Hello All, Is it possible to print something to console without a line break? I tried: sys.stdout.write("Testing something ...") // nothing will be printed time.sleep(1) sys.stdout.write("done\n") // now, the whole string will be printed What I want, is to see "Testing something ..." first

Re: print to console without a line break

2008-12-23 Thread Qian Xu
Qian Xu wrote: > Hello All, > > Is it possible to print something to console without a line break? > > I tried: > sys.stdout.write("Testing something ...") // nothing will be printed > time.sleep(1) > sys.stdout.write("done\n") // now, the whole string will be printed > > What I want, is

Re: Very basic question

2008-12-23 Thread John Machin
On Dec 23, 9:49 pm, Sengly wrote: > I can hack it by doing eval('1.0*12/5') but is there any better method? from __future__ import division -- http://mail.python.org/mailman/listinfo/python-list

Re: Very basic question

2008-12-23 Thread Sion Arrowsmith
Sengly wrote: >I would like to calculate a string expression to a float. For example, >I have ('12/5') and I want 2.4 as a result. I tried to use eval but it >only gives me 2 instead of 2.5 py> from __future__ import division py> print eval('12/5') 2.4 py> print eval('12//5') 2 Or switch to 3.0

Re: Very basic question

2008-12-23 Thread Bryan Olson
Sengly wrote: I can hack it by doing eval('1.0*12/5') but is there any better method? Where did you get the string? If you generated it, you might as well make one or both the operands float to begin with. If you got it as input, calling eval() on it is a world of security hurt. The right w

Re: String Format Error.

2008-12-23 Thread Steve Holden
Chris Rebert wrote: > On Mon, Dec 22, 2008 at 10:19 PM, Paulo Repreza wrote: >> Hi, >> >> I'm a newbie with python and I recently bought Beginning with Python (Which >> is a book I recommend) but the problem that I'm facing it's the following: >> >> This is the code: >> >> #!/usr/bin/python2.5 >>

Why MyHDL?

2008-12-23 Thread Jan Decaluwe
Hello: MyHDL is a Python package for using Python as a Hardware Description Language. A new release is upcoming, and on this occasion we have prepared a page about why MyHDL may be useful to you: http://www.myhdl.org/doku.php/why Regards, Jan -- Jan Decaluwe - Resources bvba - http://www

Re: Very basic question

2008-12-23 Thread Sengly
Thank you very much everyone. Regards, -- Sengly -- http://mail.python.org/mailman/listinfo/python-list

On Whose Desktop

2008-12-23 Thread Steve Holden
Thanks to Barry Warsaw the "On Your Desktop" blog now has a new entry: http://onyourdesktop.blogspot.com/ Who would you like to see profiled next? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.pyth

Re: On Whose Desktop

2008-12-23 Thread Fuzzyman
On Dec 23, 12:06 pm, Steve Holden wrote: > Thanks to Barry Warsaw the "On Your Desktop" blog now has a new entry: > >  http://onyourdesktop.blogspot.com/ > > Who would you like to see profiled next? > > regards >  Steve > -- > Steve Holden        +1 571 484 6266   +1 800 494 3119 > Holden Web LLC

Re: On Whose Desktop

2008-12-23 Thread Bruno Desthuilliers
Steve Holden a écrit : Thanks to Barry Warsaw the "On Your Desktop" blog now has a new entry: http://onyourdesktop.blogspot.com/ Who would you like to see profiled next? The effbot ? regards Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Why MyHDL?

2008-12-23 Thread Stef Mientki
hello Jan, Jan Decaluwe wrote: Hello: MyHDL is a Python package for using Python as a Hardware Description Language. A new release is upcoming, and on this occasion we have prepared a page about why MyHDL may be useful to you: http://www.myhdl.org/doku.php/why Very Interesting, I'm no e

SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Reimar Bauer
Hi I can install pydev using the update manager in eclipse for 64 bit from the SuSE 11.1 repo. But I can't configure pydev without crashing it. I can select the interpreter /usr/bin/python and I do see the System PYTHONPATH Forced builtin libs also looks good. But Apply gives me # # An unexpected

Re: print to console without a line break

2008-12-23 Thread Lie Ryan
On Tue, 23 Dec 2008 11:50:59 +0100, Qian Xu wrote: > Hello All, > > Is it possible to print something to console without a line break? > > I tried: > sys.stdout.write("Testing something ...") // nothing will be printed > time.sleep(1) > sys.stdout.write("done\n") // now, the whole string w

Re: wxPython.button.disabled still catching clicks

2008-12-23 Thread mynthon
On Dec 23, 11:58 am, Aaron Brady wrote: > On Dec 23, 4:50 am, mynthon wrote: > > > > > Hello! (sorry for my english) > > > I have a problem with buttons in wxPython. When button is disabled > > (by .Disable() or .Enable(False)) it is grayed out but still receive > > clicks. > > > Eg. i have butto

Re: Are python objects thread-safe?

2008-12-23 Thread Duncan Booth
Aaron Brady wrote: > Th.1 Th.2 > a=X >a=Y > a=Z > > You are saying that if 'a=Z' interrupts 'a=Y' at the wrong time, the > destructor for 'X' or 'Y' might not get called. Correct? In serial > flow, the destructor for X is called, then Y. No, the destructors will be called, but the d

Re: no sign() function ?

2008-12-23 Thread Pierre-Alain Dorange
Steven D'Aprano wrote: > But this is just duplicating what timeit already does. Trust me, learn to > use it, you won't be sorry. Here's a trick that took me a long time to > learn: instead of copying your functions into the setup code of timeit, > you can just import them. Thanks for the advise,

pseudo terminal usage from Python?

2008-12-23 Thread skip
I ran into an interesting problem yesterday. The mpstat(1) command on Solaris formats its output like so: CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl 0 42 1 1184 812 265 227 12 44 370 11316 2 0 93 1 25 1 933 4472

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 7:49 AM, Reimar Bauer wrote: > Hi > > I can install pydev using the update manager in eclipse for 64 bit from the > SuSE 11.1 repo. But I can't configure pydev without crashing it. > I can select the interpreter /usr/bin/python > and I do see the System PYTHONPATH > Forced

PIL - font kerning

2008-12-23 Thread carsn
Hey all, anybody know, if there´s a way to specify the kerning of a font, when you draw text with PIL? I´d like to achieve the same effect that you get, when you set a negative kerning in Gimp/Photshop - ie. reduce the spacing between glyphs. Can PIL do that or do I use another lib for that? Th

Re: Python's popularity

2008-12-23 Thread Lie Ryan
On Mon, 22 Dec 2008 21:05:22 -0800, r wrote: > On Dec 22, 10:09 pm, Ben Kaplan wrote: >> That's just because most of us don't say anything unless we have >> something useful to say. We prefer to let the experts answer the >> questions, but we read the threads so we can benefit from them. > > OK

Re: On Whose Desktop

2008-12-23 Thread Steve Holden
Fuzzyman wrote: > On Dec 23, 12:06 pm, Steve Holden wrote: >> Thanks to Barry Warsaw the "On Your Desktop" blog now has a new entry: >> >> http://onyourdesktop.blogspot.com/ >> >> Who would you like to see profiled next? > > Guido (of course), Brett Cannon, Martin v Loewis, Jim Hugunin, Ted > Leu

Re: Python's popularity

2008-12-23 Thread Thorsten Kampe
* r (Mon, 22 Dec 2008 10:44:32 -0800 (PST))> > Steve Holden > > What makes you assume this is a zero-sum game, and that Python won't > > survive if any other language becomes popular. Every language borrows > > from those that came before it. Terms like "outright plagiarism" don't > > encourage ra

Re: iterating initalizations

2008-12-23 Thread D'Arcy J.M. Cain
On Mon, 22 Dec 2008 22:32:17 -0500 Aaron Stepp wrote: > Instead of writing a long list of initializations like so: > > A = [ ] > B = [ ] > ... > Y = [ ] > Z = [ ] > > I'd like to save space by more elegantly turning this into a loop. If Well, if all you want is a loop: for v in vars:

Re: Python's popularity

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 12:05 AM, r wrote: > On Dec 22, 10:09 pm, Ben Kaplan wrote: > > That's just because most of us don't say anything unless we have > > something useful to say. We prefer to let the experts answer the > > questions, but we read the threads so we can benefit from them. > > OK

Re: pseudo terminal usage from Python?

2008-12-23 Thread Steve Holden
s...@pobox.com wrote: > I ran into an interesting problem yesterday. The mpstat(1) command on > Solaris formats its output like so: > > CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl > 0 42 1 1184 812 265 227 12 44 370 11316 2 0 93 >

Re: print to console without a line break

2008-12-23 Thread Albert Hopkins
On Tue, 2008-12-23 at 13:18 +, Lie Ryan wrote: > On Tue, 23 Dec 2008 11:50:59 +0100, Qian Xu wrote: > > > Hello All, > > > > Is it possible to print something to console without a line break? > > > > I tried: > > sys.stdout.write("Testing something ...") // nothing will be printed > > ti

Re: python3 urlopen(...).read() returns bytes

2008-12-23 Thread Christian Heimes
ajaksu wrote: > On Dec 22, 9:05 pm, Christian Heimes wrote: >> ajaksu schrieb: >> >>> That said, a "decode to declared HTTP header encoding" version of >>> urlopen could be useful to give some users the output they want (text >>> from network io) or to make it clear why bytes is the safe way. >> Y

Re: no sign() function ?

2008-12-23 Thread Christian Heimes
All algorithm including my own suffer from one mistake. Nobody accounts for NaN (not a number). You have to check for NaNs, too. NaNs have no sign at all. You could also try to do some fancy bit mask operation like >>> ord(struct.pack("d", 0.)[7]) & 0x80 0 >>> ord(struct.pack("d", -0.)[7]) & 0x80

Re: print to console without a line break

2008-12-23 Thread Qian Xu
Albert Hopkins wrote: > On Tue, 2008-12-23 at 13:18 +, Lie Ryan wrote: > > Probably because your stdout is line-buffered. Try: > > sys.stdout.write("Testing something...") > sys.stout.flush() # flush the stdout buffer Thanks. This works for me ^^) -- http://mail.python.org/mailman/listinfo/

Re: print to console without a line break

2008-12-23 Thread Qian Xu
Lie Ryan wrote: > If you don't mind an extra space, you can use this: > > print 'Testing something ...', > # note the trailing comma Thanks. However, the contents will be saved in buffer and will not be shown until print "(last piece)" sys.stdout.flush() can solve this problem :-) -- http://ma

Re: iterating initalizations

2008-12-23 Thread Steve Holden
D'Arcy J.M. Cain wrote: > On Mon, 22 Dec 2008 22:32:17 -0500 > Aaron Stepp wrote: >> Instead of writing a long list of initializations like so: >> >> A = [ ] >> B = [ ] >> ... >> Y = [ ] >> Z = [ ] >> >> I'd like to save space by more elegantly turning this into a loop. If > > Well, if all you

Re: pseudo terminal usage from Python?

2008-12-23 Thread skip
Steve> Look at the pexpect module - you can run interactive tasks Steve> through that. Thanks. Worked like a charm. -- Skip Montanaro - s...@pobox.com - http://smontanaro.dyndns.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating initalizations

2008-12-23 Thread Aaron Stepp
import random from rtcmix import * from chimes_source import * # Chime.play() from rhythmblock import * # rhythmBlock.rhythmTwist() and rhythmBlock.printStuff() from pitchblock import * # pitchBlock.pitchTwist() and pitchBlock.printStuff() from lenEval import * #greaterThan.sovler() indexra

Re: Python's popularity

2008-12-23 Thread Adrian Cherry
r wrote in news:ae1bb365-7755-4c5f-8166-e704c51a7...@i20g2000prf.googlegro ups.com: > > Oh Steve... Listen, my words are ment as a wake-up-call to > all who still love Python, and i believe you are one of > them. Maybe old age has slowed your hand, that's OK, Us > "youngsters" will take the hel

Re: iterating initalizations

2008-12-23 Thread D'Arcy J.M. Cain
On Tue, 23 Dec 2008 10:20:59 -0500 Steve Holden wrote: > D'Arcy J.M. Cain wrote: > > Well, if all you want is a loop: > > > > for v in vars: > > locals()[v] = [] > > > Note that this isn't guaranteed to work. While locals() will return a > dict containing the names and values from th

Re: I always wonder ...

2008-12-23 Thread r
On Dec 22, 11:12 pm, ajaksu wrote: > On Dec 22, 9:24 pm, r wrote: > > > You know what i hate more than a troll, a spineless jellyfish who goes > > around rating peoples post with one star. You are the lowest form of > > life. You are the same type of person who would key someones car in > > the p

Re: pseudo terminal usage from Python?

2008-12-23 Thread Grant Edwards
On 2008-12-23, s...@pobox.com wrote: > > I ran into an interesting problem yesterday. The mpstat(1) command on > Solaris formats its output like so: > > CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl > 0 42 1 1184 812 265 227 12 44 370 1131

Re: Python's popularity

2008-12-23 Thread r
On Dec 23, 8:21 am, Thorsten Kampe wrote: > * r (Mon, 22 Dec 2008 10:44:32 -0800 (PST))> > > > Steve Holden > > > What makes you assume this is a zero-sum game, and that Python won't > > > survive if any other language becomes popular. Every language borrows > > > from those that came before it. T

Re: iterating initalizations

2008-12-23 Thread Steve Holden
D'Arcy J.M. Cain wrote: > On Tue, 23 Dec 2008 10:20:59 -0500 > Steve Holden wrote: >> D'Arcy J.M. Cain wrote: >>> Well, if all you want is a loop: >>> >>> for v in vars: >>> locals()[v] = [] >>> >> Note that this isn't guaranteed to work. While locals() will return a >> dict containing

Re: pseudo terminal usage from Python?

2008-12-23 Thread skip
Grant> Are you sure it's not Python buffering its input? Have you tried Grant> "python -u mympstat.py"? Hmmm... No, I hadn't considered that. I'll check it out. Thanks... Grant> I had a Linux pty example running once upon a time. If "python Grant> -u" doesn't work post again,

Re: Python's popularity

2008-12-23 Thread r
On Dec 23, 10:12 am, je.s.t...@hehxduhmp.org wrote: > r wrote: > > You are the epitimy of an internet troll. A troll tries to hide his > > identity. Why are you so concerned about your TRUE identity. Are the > > I've already stated, and you've already proven, that it's pretty trivial > to ascertai

Re: Python's popularity

2008-12-23 Thread r
On Dec 23, 8:21 am, Thorsten Kampe wrote: > You don't have a single clue about neither Python nor Ruby: > 'According to the Ruby FAQ, "If you like Perl, you will like Ruby and be > right at home with its syntax. [...] If you like Python, you may or may > not be put off by the huge difference in de

Re: no sign() function ?

2008-12-23 Thread Mark Dickinson
On Dec 23, 2:59 pm, Christian Heimes wrote: > All algorithm including my own suffer from one mistake. Nobody accounts > for NaN (not a number). You have to check for NaNs, too. NaNs have no > sign at all. I think that's not quite true: NaNs have a sign; it's just not accorded any particular mea

Re: no sign() function ?

2008-12-23 Thread ajaksu
On Dec 22, 9:18 am, Christian Heimes wrote: > Sure? :) Are you aware that the IEEE 754 standard makes a difference > between the floats +0.0 and -0.0? > > from math import atan2 > def sign(x): >     if x > 0 or (x == 0 and atan2(x, -1.) > 0.): >         return 1 >     else: >         return -1 Is

Get applications to open a given file (Mac and, or Windows)

2008-12-23 Thread riklau...@gmail.com
Under Linux/Unix I use GIO (pygobject) or gnome-vfs-python to get a list of installed applications that can open given file (for example image in graphics software). Is there something that can be used for MS Windows or Mac OS X? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's popularity

2008-12-23 Thread r
Benjamin Kaplin wrote: You're the one who keeps bringing up the need to spread python. For most people, this is a forum to ask questions and have experts respond to them. Most people who post here aren't looking for your opinion, they want answers. If you know the answer to a question, answer it. I

Re: no sign() function ?

2008-12-23 Thread Mark Dickinson
On Dec 23, 4:27 pm, ajaksu wrote: > Is "x ** 0 > 0." instead of "atan2(x, -1.) > 0." unreliable across > platforms? x**0 doesn't distinguish between x = -0.0 and x = 0.0. I suspect you're confusing -0.0**0.0 with (-0.0)**0.0. Mark -- http://mail.python.org/mailman/listinfo/python-list

Re: On Whose Desktop

2008-12-23 Thread Aaron Brady
On Dec 23, 8:19 am, Steve Holden wrote: > Fuzzyman wrote: > > On Dec 23, 12:06 pm, Steve Holden wrote: > >> Thanks to Barry Warsaw the "On Your Desktop" blog now has a new entry: > > >>  http://onyourdesktop.blogspot.com/ > > >> Who would you like to see profiled next? > > > Guido (of course), Br

Re: On Whose Desktop

2008-12-23 Thread Arnaud Delobelle
Aaron Brady writes: > +1 whose (posessive) -1 posessive :) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: String Format Error.

2008-12-23 Thread Paulo Repreza
Thank You! On Tue, Dec 23, 2008 at 3:49 AM, Steve Holden wrote: > Chris Rebert wrote: > > On Mon, Dec 22, 2008 at 10:19 PM, Paulo Repreza > wrote: > >> Hi, > >> > >> I'm a newbie with python and I recently bought Beginning with Python > (Which > >> is a book I recommend) but the problem that I

Re: wxPython.button.disabled still catching clicks

2008-12-23 Thread Mike Driscoll
On Dec 23, 7:27 am, mynthon wrote: > On Dec 23, 11:58 am, Aaron Brady wrote: > > > > > On Dec 23, 4:50 am, mynthon wrote: > > > > Hello! (sorry for my english) > > > > I have a problem with buttons in wxPython. When button is disabled > > > (by .Disable() or .Enable(False)) it is grayed out but

Re: Python's popularity

2008-12-23 Thread Pierre-Alain Dorange
r wrote: > > I've already stated, and you've already proven, that it's pretty trivial > > to ascertain my true identity, if one actually cares. OTOH, that's > > *not* the case with you. Who is hiding now? > > I told you, my name is Thurstan Howell III. Do you want to know my > favorite color t

[Offtopic] Re: I always wonder ...

2008-12-23 Thread Pierre-Alain Dorange
r wrote: > [...] > Well that shows that even lads with tiny nads can be brave, any of the > other trolls want to expose them selfs? This thread is offtopic, please just keep silent and let it be closed... -- Pierre-Alain Dorange Ce message est sous li

Re: pseudo terminal usage from Python?

2008-12-23 Thread Grant Edwards
On 2008-12-23, s...@pobox.com wrote: > Grant> Are you sure it's not Python buffering its input? Have you tried > Grant> "python -u mympstat.py"? > > Hmmm... No, I hadn't considered that. I'll check it out. Thanks... > > Grant> I had a Linux pty example running once upon a time. If

Re: pseudo terminal usage from Python?

2008-12-23 Thread skip
Grant> Are you sure it's not Python buffering its input? Have you tried Grant> "python -u mympstat.py"? Nope. -u unbuffers stdout and stderr, not stdin. It really must be mpstat being uncooperative. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Are python objects thread-safe?

2008-12-23 Thread Gabriel Genellina
En Tue, 23 Dec 2008 11:30:25 -0200, Duncan Booth escribió: Aaron Brady wrote: Th.1 Th.2 a=X a=Y a=Z You are saying that if 'a=Z' interrupts 'a=Y' at the wrong time, the destructor for 'X' or 'Y' might not get called. Correct? In serial flow, the destructor for X is called, then

Re: python3 urlopen(...).read() returns bytes

2008-12-23 Thread ajaksu
On Dec 23, 12:51 pm, Christian Heimes wrote: > If you want to do it right ... It should be a clean patch against the > py3k svn branch Done > including documentation This thread is a good start :) > and a unit test. Doing this now. Daniel -- http://mail.python.org/mailman/listinfo/python-list

Symposium “Visualization and Human-Computer” wit hin the IRF’2009 Conference – Announce & Call for Papers

2008-12-23 Thread tava...@fe.up.pt
(Apologies for cross-posting) Symposium on “Visualization and Human-Computer” 3rd International Conference on Integrity, Reliability & Failure (IRF’2009) Facult

Re: pseudo terminal usage from Python?

2008-12-23 Thread Grant Edwards
On 2008-12-23, s...@pobox.com wrote: > > Grant> Are you sure it's not Python buffering its input? Have you tried > Grant> "python -u mympstat.py"? > > Nope. -u unbuffers stdout and stderr, not stdin. It really must be mpstat > being uncooperative. That's not what my python man page say

2to3 used in the Shootout

2008-12-23 Thread bearophileHUGS
They have translated the Python benchmarks of the Shootout site from Py2 to Py3 using 2to3: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=python3 It shows some "performance bugs" of Python3 itself (especially regarding the binary-trees benchmark, that was unexpected by me), an

Re: pseudo terminal usage from Python?

2008-12-23 Thread skip
Grant> Are you sure it's not Python buffering its input? Have you tried Grant> "python -u mympstat.py"? >> Nope. -u unbuffers stdout and stderr, not stdin. It really must be >> mpstat being uncooperative. Grant> That's not what my python man page says: Grant>-u

[ANN] Python 2.5.4 (final)

2008-12-23 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.5.4 (final). Python 2.5.3 unfortunately contained an incorrect patch that could cause interpreter crashes; the only change in Python 2.5.4 relative to 2.5.4 is the reversal of this patc

Re: PIL - font kerning

2008-12-23 Thread Ivan Illarionov
On 23 дек, 16:44, carsn wrote: > Hey all, > > anybody know, if there´s a way to specify the kerning of a font, when > you draw text with PIL? > > I´d like to achieve the same effect that you get, when you set a > negative kerning in Gimp/Photshop - ie. reduce the spacing between > glyphs. > > Can

Re: Are python objects thread-safe?

2008-12-23 Thread Aaron Brady
On Dec 23, 7:30 am, Duncan Booth wrote: > Aaron Brady wrote: > > Th.1   Th.2 > > a=X > >        a=Y > > a=Z > > > You are saying that if 'a=Z' interrupts 'a=Y' at the wrong time, the > > destructor for 'X' or 'Y' might not get called.  Correct?  In serial > > flow, the destructor for X is called,

Re: PIL - font kerning

2008-12-23 Thread Ivan Illarionov
On Dec 23, 11:22 pm, Ivan Illarionov wrote: > On 23 дек, 16:44, carsn wrote: > > > Hey all, > > > anybody know, if there´s a way to specify the kerning of a font, when > > you draw text with PIL? > > > I´d like to achieve the same effect that you get, when you set a > > negative kerning in Gimp/P

Re: pseudo terminal usage from Python?

2008-12-23 Thread Grant Edwards
On 2008-12-23, s...@pobox.com wrote: > Grant> Are you sure it's not Python buffering its input? Have you tried > Grant> "python -u mympstat.py"? > > >> Nope. -u unbuffers stdout and stderr, not stdin. It really must be > >> mpstat being uncooperative. > > Grant> That's not w

Re: Get applications to open a given file (Mac and, or Windows)

2008-12-23 Thread Tommy Nordgren
On Dec 23, 2008, at 5:29 PM, riklau...@gmail.com wrote: Under Linux/Unix I use GIO (pygobject) or gnome-vfs-python to get a list of installed applications that can open given file (for example image in graphics software). Is there something that can be used for MS Windows or Mac OS X? -- http:/

Re: Beep

2008-12-23 Thread Ivan Illarionov
On Dec 22, 3:16 am, Jeffrey Barish wrote: > I use sys.stdout.write('\a') to beep.  It works fine on Kubuntu, but not on > two other platforms (one of which is Ubuntu).  I presume that the problem > is due to a system configuration issue.  Can someone point me in the right > direction?  Thanks. > -

Re: [Haskell-cafe] Initializing GHC from Python

2008-12-23 Thread Jason Dusek
I upmodded this on Reddit. Thank you for your work. -- Jason Dusek -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating initalizations

2008-12-23 Thread Rhodri James
On Tue, 23 Dec 2008 15:39:52 -, Aaron Stepp wrote: import random from rtcmix import * from chimes_source import * # Chime.play() from rhythmblock import * # rhythmBlock.rhythmTwist() and rhythmBlock.printStuff() from pitchblock import * # pitchBlock.pitchTwist() and pitchBlock.printSt

Re: python3 urlopen(...).read() returns bytes

2008-12-23 Thread ajaksu
On Dec 23, 12:51 pm, Christian Heimes wrote: > If you want to do it right ... It should be a clean patch against the > py3k svn branch including documentation and a unit test. Got all three at http://bugs.python.org/issue4733 . Probably got all three wrong too, so any feedback is very welcome :)

Re: [ANN] Python 2.5.4 (final)

2008-12-23 Thread Terry Reedy
Martin v. Löwis wrote: For more information on Python 2.5.4, including download links for various platforms, release notes, and known issues, please see: http://www.python.org/2.5.4 http://www.python.org/download/releases/2.5.4/ -- http://mail.python.org/mailman/listinfo/python-list

Re: 2to3 used in the Shootout

2008-12-23 Thread Terry Reedy
bearophileh...@lycos.com wrote: They have translated the Python benchmarks of the Shootout site from Py2 to Py3 using 2to3: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=python3 It shows some "performance bugs" of Python3 itself (especially regarding the binary-trees benchma

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Nikolas Tautenhahn
Hi, Reimar Bauer wrote: > I can install pydev using the update manager in eclipse for 64 bit from the > SuSE 11.1 repo. But I can't configure pydev without crashing it. > I can select the interpreter /usr/bin/python > and I do see the System PYTHONPATH > Forced builtin libs also looks good. > > B

Re: 2to3 used in the Shootout

2008-12-23 Thread Isaac Gouy
On Dec 23, 11:51 am, bearophileh...@lycos.com wrote: > They have translated the Python benchmarks of the Shootout site from > Py2 to Py3 using 2to3: > > http://shootout.alioth.debian.org/u32/benchmark.php?test=all〈=pyt... So please re-write those programs to remove problems created by automatic t

Re: no sign() function ?

2008-12-23 Thread ajaksu
On Dec 23, 2:45 pm, Mark Dickinson wrote: > On Dec 23, 4:27 pm, ajaksu wrote: > > > Is "x ** 0 > 0." instead of "atan2(x, -1.) > 0." unreliable across > > platforms? > > x**0 doesn't distinguish between x = -0.0 and x = 0.0. > > I suspect you're confusing -0.0**0.0 with (-0.0)**0.0. Yes, fooled

Re: SuSE11.1 eclipse 64 pydev can't add python path

2008-12-23 Thread Benjamin Kaplan
On Tue, Dec 23, 2008 at 5:08 PM, Nikolas Tautenhahn wrote: > Hi, > > Reimar Bauer wrote: > > I can install pydev using the update manager in eclipse for 64 bit from > the > > SuSE 11.1 repo. But I can't configure pydev without crashing it. > > I can select the interpreter /usr/bin/python > > and

Re: using subprocess module in Python CGI

2008-12-23 Thread Matt Nordhoff
ANURAG BAGARIA wrote: > Hello, > > I am a Python Newbie and would like to call a short python script via > browser using a CGI script, but initially I am trying to call the same > python script directly through python command line. The script intends > to perform a few command line in a pipe and I

Re: On Whose Desktop

2008-12-23 Thread James Stroud
Steve Holden wrote: Thanks to Barry Warsaw the "On Your Desktop" blog now has a new entry: Note the thumb trackball. It's the shiznizzle. Give one two weeks of your patience and you'll seriously consider having it implanted in your thigh so you don't have to worry about missing it when you tr

  1   2   >