Re: python gui builders

2009-11-17 Thread sturlamolden
On 18 Nov, 04:21, Dave Cook wrote: > On 2009-11-16, me wrote: > > > Also looked at the frames/forms created with QtDesigner, which > > can be used by Python via pyuic. > > That's what I would recommend.  What did you not like about it? GPL -- http://mail.python.org/mailman/listinfo/python-lis

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-17 Thread Dotan Cohen
2009/11/16 Steve Ferg : > This is a question for the language mavens that I know hang out here. > It is not Python related, except that recent comparisons of Python to > Google's new Go language brought it to mind. > > NOTE that this is *not* a suggestion to change Python.  I like Python > just the

Re: python gui builders

2009-11-17 Thread Yinon Ehrlich
On Nov 18, 8:10 am, sturlamolden wrote: > On 17 Nov, 19:34, r wrote: > > > Agreed! Tkinter (besides myself) seems to be the whipping boy of > > c.l.py. Tkinter has it's place in Python because of the same > > simplicity people laboriously lament about! Until something else comes > > along that ca

Qt Python radiobutton: activate event

2009-11-17 Thread Threader Slash
Hi Everybody, I am developing a project for one customer, where the design has a radio button with exclusive options. Here is a piece of the code that runs and show two nice radio buttons: self.performGroupBox = QtGui.QGroupBox(self.centralwidget) self.performGroupBox.setGeometry

Re: python gui builders

2009-11-17 Thread sturlamolden
On 17 Nov, 19:34, r wrote: > Agreed! Tkinter (besides myself) seems to be the whipping boy of > c.l.py. Tkinter has it's place in Python because of the same > simplicity people laboriously lament about! Until something else comes > along that can offer the same benefits of Tkinter and a little ex

Re: Time travel

2009-11-17 Thread greg
Lee Merrill wrote: And I can't do arithmetic, it is actually about 3600--never mind! Don't feel too bad. Obviously Guido nipped back to March 8 2008 in his time machine and fixed the problem, making it *look* like you can't do arithmetic. Time travel often leads to embarrassments like that. --

Re: New syntax for blocks

2009-11-17 Thread greg
r wrote: I think the syntax was chosen because the alternatives are even worse AND since assignment is SO common in programming, would you *really* rather type two chars instead of one? Smalltalk solved the problem by using a left-arrow character for assignment. But they had an unfair advantage

Re: New syntax for blocks

2009-11-17 Thread greg
MRAB wrote: Fortran uses "=" and ".EQ.", probably because (some) earlier autocodes did. I think Fortran used .LT. and .GT. because some early character sets didn't have < and > symbols. Having done that, it probably seemed more consistent to use .EQ. for comparison than to break the pattern an

Re: Running a python script from interactive mode

2009-11-17 Thread Himanshu
2009/11/18 ashwini yal : > Hi, > > I am trying to run a python script from interactive mode ,but i am not able > to know how to run it? Is it possible? if yes please let me how to run the > script? > a) If you want to debug it then see http://docs.python.org/library/pdb.html b) If you want to acce

Re: YIELD_VALUE Byte Code

2009-11-17 Thread greg
Andreas Löscher wrote: Since Python Version 2.5 it behaves the following: 1. pop yield value from stack and return it to a former gen_send_ex() call from Objects/genobject.c 2. push the yield value on the stack in gen_send_ex() and return Are you sure about that

Re: Running a python script from interactive mode

2009-11-17 Thread Chris Rebert
On Tue, Nov 17, 2009 at 8:56 PM, ashwini yal wrote: > Hi, > > I am trying to run a python script from interactive mode ,but i am not able > to know how to run it? Is it possible? if yes please let me how to run the > script? execfile("/path/to/the/script.py") or if it's on your sys.path and does

Re: Command line arguments??

2009-11-17 Thread greg
Rhodri James wrote: We've been living with this pain ever since windowed GUIs encouraged users to put spaces in their file names (Apple, I'm looking at you!). It's not really Apple's fault. There was no problem with spaces in filenames in the classic MacOS environment, because there was no tex

Re: WindowsError is not available on linux?

2009-11-17 Thread Dave Angel
Peng Yu wrote: On Tue, Nov 17, 2009 at 9:18 PM, alex23 wrote: Peng Yu wrote: But the document doesn't say shutil need to be imported in order to use WindowsError. Shall the document or the code be corrected? Neither, it's your understanding that needs correction. Benjamin was

Re: TypeError: unsupported operand types for +: 'NoneType' and 'str'

2009-11-17 Thread Dave Angel
aurfal...@gmail.com wrote: Hi all, I tried to make the subject as specific as possible rather then just "help me" or "its broke" or "my server is down", etc... So please excuse me if its too specific as I wasn't trying to be ridiculous. So I've been handed some one else's work to fix. Whi

Running a python script from interactive mode

2009-11-17 Thread ashwini yal
Hi, I am trying to run a python script from interactive mode ,but i am not able to know how to run it? Is it possible? if yes please let me how to run the script? -- Regards , Ashwini . K -- http://mail.python.org/mailman/listinfo/python-list

Re: WindowsError is not available on linux?

2009-11-17 Thread Chris Rebert
On Tue, Nov 17, 2009 at 7:37 PM, Peng Yu wrote: > On Tue, Nov 17, 2009 at 9:18 PM, alex23 wrote: >> Peng Yu wrote: >>> But the document doesn't say shutil need to be imported in order to >>> use WindowsError. Shall the document or the code be corrected? >> >> Neither, it's your understanding tha

Re: WindowsError is not available on linux?

2009-11-17 Thread alex23
Peng Yu wrote: > I don't know about others. The wording "Windows-specific error occurs" > was ambiguous to me. It could refers to some errors resulted from > copying (on a linux machine) some files from linux file systems to > windows files systems (via samba, maybe). I recommend to revise the > d

Re: TypeError: unsupported operand types for +: 'NoneType' and 'str'

2009-11-17 Thread Chris Rebert
On Tue, Nov 17, 2009 at 7:25 PM, wrote: > The error I get; > > File "myscript.py", Line 18, in ? > projectpath = ourHome+"/etc/TEMPLATE" > TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' > > Python 2.4.3 > > I've read were when passing a string to exec may need to end with a '

Re: ZipFile - file adding API incomplete?

2009-11-17 Thread Glenn Maynard
On Tue, Nov 17, 2009 at 9:28 AM, Dave Angel wrote: > I'm pretty sure that the ZIP format uses independent compression for each > contained file (member).  You can add and remove members from an existing > ZIP, and use several different compression methods within the same file.  So > the adaptive t

Re: WindowsError is not available on linux?

2009-11-17 Thread Dave Angel
Peng Yu wrote: On Tue, Nov 17, 2009 at 8:25 PM, Benjamin Kaplan wrote: On Tue, Nov 17, 2009 at 9:18 PM, Peng Yu wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the document. But I see WindowsError in shutil.py. Could you somebody let me know

Re: WindowsError is not available on linux?

2009-11-17 Thread Peng Yu
On Tue, Nov 17, 2009 at 9:18 PM, alex23 wrote: > Peng Yu wrote: >> But the document doesn't say shutil need to be imported in order to >> use WindowsError. Shall the document or the code be corrected? > > Neither, it's your understanding that needs correction. > > Benjamin wasn't trying to say th

TypeError: unsupported operand types for +: 'NoneType' and 'str'

2009-11-17 Thread aurfalien
Hi all, I tried to make the subject as specific as possible rather then just "help me" or "its broke" or "my server is down", etc... So please excuse me if its too specific as I wasn't trying to be ridiculous. So I've been handed some one else's work to fix. While its fun and all, I have

Re: python gui builders

2009-11-17 Thread Dave Cook
On 2009-11-16, me wrote: > Also looked at the frames/forms created with QtDesigner, which > can be used by Python via pyuic. That's what I would recommend. What did you not like about it? Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: WindowsError is not available on linux?

2009-11-17 Thread alex23
Peng Yu wrote: > But the document doesn't say shutil need to be imported in order to > use WindowsError. Shall the document or the code be corrected? Neither, it's your understanding that needs correction. Benjamin wasn't trying to say that WindowsError is defined within shutil, he was showing t

Re: WindowsError is not available on linux?

2009-11-17 Thread Benjamin Kaplan
On Tue, Nov 17, 2009 at 9:40 PM, Peng Yu wrote: > On Tue, Nov 17, 2009 at 8:25 PM, Benjamin Kaplan > wrote: >> On Tue, Nov 17, 2009 at 9:18 PM, Peng Yu wrote: >>> It's not clear to me whether WindowsError is available on linux or >>> not, after I read the document. But I see WindowsError in shut

Re: TODO and FIXME tags

2009-11-17 Thread Scott David Daniels
Martin P. Hellwig wrote: Ben Finney wrote: Chris Rebert writes: 2009/11/16 Yasser Almeida Hernández : How is the sintaxis for set the TODO and FIXME tags...? ... There's no widely-followed “syntax” for this convention, though. Except for _not_ doing what is suggested in those comments, whi

Re: What is the difference between 'except IOError as e:' and 'except IOError, e:'

2009-11-17 Thread MRAB
Peng Yu wrote: I don't see any different between the following code in terms of output. Are they exactly the same ('as' v.s. ',')? try: raise IOError('IOError') except IOError as e: print e try: raise IOError('IOError') except IOError, e: print e The second form is the old form. Later

Re: Qt Python : QTreeWidget Child Problem

2009-11-17 Thread Threader Slash
> Hello Everybody, > > I have a QTreewidget that works fine if I have just one level on my > treelist. If I decide to add child sublevels, it gives me an error. Here is > the code, that works nice only without the "childs" lines on it (see after > > "child 1" and "child 2"). > > def eqpt_centra

Re: WindowsError is not available on linux?

2009-11-17 Thread MRAB
Peng Yu wrote: It's not clear to me whether WindowsError is available on linux or not, after I read the document. But I see WindowsError in shutil.py. Could you somebody let me know what cause the following error? try: ... raise WindowsError('WindowsError') ... except WindowsError as e: ...

Re: Command line arguments??

2009-11-17 Thread Dave Angel
Nobody wrote: On Tue, 17 Nov 2009 11:47:46 -0800, Gerry wrote: How about this: lastarg = " ".join(sys.argv[2:]) What about it? IOW, why would you want to do that? Like many tricks, it'd work if several conditions applied: 1) there's exactly two arguments expected on the com

Re: WindowsError is not available on linux?

2009-11-17 Thread Peng Yu
On Tue, Nov 17, 2009 at 8:25 PM, Benjamin Kaplan wrote: > On Tue, Nov 17, 2009 at 9:18 PM, Peng Yu wrote: >> It's not clear to me whether WindowsError is available on linux or >> not, after I read the document. But I see WindowsError in shutil.py. >> Could you somebody let me know what cause the

Re: What is the difference between 'except IOError as e:' and 'except IOError, e:'

2009-11-17 Thread Steven D'Aprano
On Tue, 17 Nov 2009 20:28:16 -0600, Peng Yu wrote: > I don't see any different between the following code in terms of output. > Are they exactly the same ('as' v.s. ',')? > > try: > raise IOError('IOError') > except IOError as e: > print e This is the preferred syntax. It is used in Python 2

Re: python simply not scaleable enough for google?

2009-11-17 Thread Steven D'Aprano
On Tue, 17 Nov 2009 22:11:42 +0530, Rustom Mody wrote: > "Language L is (in)efficient. No! Only implementations are > (in)efficient" > > I am reminded of a personal anecdote. It happened about 20 years ago > but is still fresh and this thread reminds me of it. > > I was attending some workshop

Re: What is the difference between 'except IOError as e:' and 'except IOError, e:'

2009-11-17 Thread Xavier Ho
On Wed, Nov 18, 2009 at 12:28 PM, Peng Yu wrote: > I don't see any different between the following code in terms of > output. Are they exactly the same ('as' v.s. ',')? > Yes, they're exactly the same. However, the syntax with "as" is newer, introducted in Python 3.x, and eventually backported t

Re: Calling Python functions from Excel

2009-11-17 Thread Ethan Furman
Chris Withers wrote: Mark Tolonen wrote: The book Python: Programming on Win32 has a whole chapter on COM, and a section on COM servers. ...and it's generally accepted that COM sucks rocks through straws, so explore alternatives when they're available ;-) +1 QOTW :D -- http://mail.python.o

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread Lie Ryan
hong zhang wrote: --- On Tue, 11/17/09, Tim Chase wrote: From: Tim Chase Subject: Re: IOError: [Errno 28] No space left on device To: "Lie Ryan" Cc: python-list@python.org Date: Tuesday, November 17, 2009, 7:47 PM for i in glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous

What is the difference between 'except IOError as e:' and 'except IOError, e:'

2009-11-17 Thread Peng Yu
I don't see any different between the following code in terms of output. Are they exactly the same ('as' v.s. ',')? try: raise IOError('IOError') except IOError as e: print e try: raise IOError('IOError') except IOError, e: print e -- http://mail.python.org/mailman/listinfo/python-list

Re: WindowsError is not available on linux?

2009-11-17 Thread Benjamin Kaplan
On Tue, Nov 17, 2009 at 9:18 PM, Peng Yu wrote: > It's not clear to me whether WindowsError is available on linux or > not, after I read the document. But I see WindowsError in shutil.py. > Could you somebody let me know what cause the following error? > try: > ...   raise WindowsError('Windo

WindowsError is not available on linux?

2009-11-17 Thread Peng Yu
It's not clear to me whether WindowsError is available on linux or not, after I read the document. But I see WindowsError in shutil.py. Could you somebody let me know what cause the following error? >>> try: ... raise WindowsError('WindowsError') ... except WindowsError as e: ... print e ... T

Re: Calling Python functions from Excel

2009-11-17 Thread Mark Tolonen
"Chris Withers" wrote in message news:4b02d1e3.6080...@simplistix.co.uk... Mark Tolonen wrote: Please I need Calling Python functions from Excel and receive result back in Excel. Can me somebody advise simplest solution please? I am more VBA programmer than Python. Try http://code.google.

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-17 Thread bartc
"Steve Ferg" wrote in message news:ff92db5b-9cb0-4a72-b339-2c5ac02fb...@p36g2000vbn.googlegroups.com... This is a question for the language mavens that I know hang out here. It is not Python related, except that recent comparisons of Python to Google's new Go language brought it to mind. NOTE

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Mark Hammond
On 18/11/2009 6:29 AM, Randall Walls wrote: I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't exist, so I can't open it. I did find out that I can open the key using: hKey =

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread hong zhang
--- On Tue, 11/17/09, Tim Chase wrote: > From: Tim Chase > Subject: Re: IOError: [Errno 28] No space left on device > To: "Lie Ryan" > Cc: python-list@python.org > Date: Tuesday, November 17, 2009, 7:47 PM > >> for i in > glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx')

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread Tim Chase
for i in glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'): with open(i, 'w') as f: print >>f, cont_tx work perfectly. But following get error like: print >>f, cont_tx IOError: [Errno 28] No space left on device Apparently the harddisk where you s

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread hong zhang
--- On Tue, 11/17/09, Lie Ryan wrote: > From: Lie Ryan > Subject: Re: IOError: [Errno 28] No space left on device > To: python-list@python.org > Date: Tuesday, November 17, 2009, 6:59 PM > hong zhang wrote: > > List, > > > > My python script has a strange error. > > > > cont_tx = 1 > > for i

Re: python simply not scaleable enough for google?

2009-11-17 Thread Chris Rebert
On Tue, Nov 17, 2009 at 8:41 AM, Rustom Mody wrote: > "Language L is (in)efficient. No! Only implementations are (in)efficient" > > I am reminded of a personal anecdote.  It happened about 20 years ago > but is still fresh and this thread reminds me of it. > > I was attending some workshop on theo

Re: IOError: [Errno 28] No space left on device

2009-11-17 Thread Lie Ryan
hong zhang wrote: List, My python script has a strange error. cont_tx = 1 for i in glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'): with open(i, 'w') as f: print >>f, cont_tx work perfectly. But following get error like: print >>f, cont_tx IOEr

Re: python simply not scaleable enough for google?

2009-11-17 Thread David Cournapeau
On Wed, Nov 18, 2009 at 8:31 AM, Terry Reedy wrote: > David Cournapeau wrote: >> >> On Tue, Nov 17, 2009 at 10:48 PM, Aaron Watters >> wrote: I don't think Python and Go address the same set of programmer desires.  For example, Go has a static type system.  Some programmers fi

Re: ANN: Urwid 0.9.9 - Console UI Library

2009-11-17 Thread alex23
Daniel Fetchinson wrote: > How did you make the html 'screenshots'? I guess you have some kind of > urwid2html tool or some such or is it plain ncurses? It's all handled in the demo code. This is from tour.py: if urwid.web_display.is_web_request(): screen = urwid.web_display.Screen()

Re: python simply not scaleable enough for google?

2009-11-17 Thread Wolfgang Rohdewald
On Wednesday 18 November 2009, Terry Reedy wrote: > Python today is at least 100x as fast as 1.4 (my first version) was > in its time. Which is to say, Python today is as fast as C was > then on the same hardware? That must have been a very buggy C compiler. Or was it a C interpreter? -- Wol

Re: Vim breaks after Python upgrade

2009-11-17 Thread TerryP
In my experience (FreeBSD), compiling vim with Python, Perl, or Ruby support (etc), generally requires recompiling vim after upgrading the corresponding language. Note also that (if like me) you manage vim installations `by hand` on all systems, rather then use the systems package management syst

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-17 Thread TerryP
On Nov 16, 4:54 pm, Steve Ferg wrote: > This is a question for the language mavens that I know hang out here. > It is not Python related, except that recent comparisons of Python to > Google's new Go language brought it to mind. > > NOTE that this is *not* a suggestion to change Python.  I like Py

IOError: [Errno 28] No space left on device

2009-11-17 Thread hong zhang
List, My python script has a strange error. cont_tx = 1 for i in glob.glob('/sys/kernel/debug/ieee80211/phy*/iwlagn/data/continuous_tx'): with open(i, 'w') as f: print >>f, cont_tx work perfectly. But following get error like: print >>f, cont_tx IOError: [Errno 28] No s

Re: Command line arguments??

2009-11-17 Thread Rhodri James
On Tue, 17 Nov 2009 19:26:46 -, Nobody wrote: On Mon, 16 Nov 2009 23:30:09 +, Rhodri James wrote: Quote the filenames or escape the spaces: C:\Python26\Python.exe C:\echo.py "C:\New Folder\text.txt" We've been living with this pain ever since windowed GUIs encouraged users to put

Re: python simply not scaleable enough for google?

2009-11-17 Thread greg
David Cournapeau wrote: It is often claimed that optimization should be done after having found the hotspot, but that does not always apply It's more that if you *do* have a hotspot, you had better find it and direct your efforts there first. E.g. if there is a hotspot taking 99% of the time,

Re: Beautifulsoup code that is not running

2009-11-17 Thread Brian J Mingus
On Tue, Nov 17, 2009 at 3:38 PM, Zeynel wrote: > Hello, > > Please help with this code suggested in the beautifulsoup group > > http://groups.google.com/group/beautifulsoup/browse_frm/thread/d288555c6992ceaa > > >>> from BeautifulSoup import BeautifulSoup > > >>> soup = BeautifulSoup (file("test.

Re: python simply not scaleable enough for google?

2009-11-17 Thread Terry Reedy
David Cournapeau wrote: On Tue, Nov 17, 2009 at 10:48 PM, Aaron Watters wrote: I don't think Python and Go address the same set of programmer desires. For example, Go has a static type system. Some programmers find static type systems to be useless or undesirable. Others find them extremely

Re: python gui builders

2009-11-17 Thread Kevin Walzer
On 11/17/09 4:25 PM, Tim Daneliuk wrote: +1 Tkinter for the simple stuff You can actually use Tkinter to do quite sophisticated GUI's that rival anything found in Qt or wx... -- Kevin Walzer Code by Kevin http://www.codebykevin.com -- http://mail.python.org/mailman/listinfo/python-list

Re: python simply not scaleable enough for google?

2009-11-17 Thread greg
David Cournapeau wrote: It is a bit odd to dismiss "python is slow" by saying that you can extend it with fortran. One of the most significant point of python IMO is its readability, even for people not familiar with it, and that's important when doing scientific work. Relying on a lot of compil

Re: ANN: Urwid 0.9.9 - Console UI Library

2009-11-17 Thread Daniel Fetchinson
On 11/16/09, Ian Ward wrote: > Announcing Urwid 0.9.9 > -- > > Urwid home page: >http://excess.org/urwid/ > > Updated screen shots: >http://excess.org/urwid/examples.html How did you make the html 'screenshots'? I guess you have some kind of urwid2html tool or some suc

Re: ANN: PyGUI 2.1

2009-11-17 Thread greg
r wrote: I really like this! But after looking over your pyGUI it does "seem" that Tkinter has a richer widget set. PyGUI is a work in progress. I plan to add more widgets, but it will take a while to catch up with what's available in Tkinter and other GUI toolkits. I tend to add widgets as

Pydev 1.5.1 Released

2009-11-17 Thread Fabio Zadrozny
Hi All, Pydev 1.5.1 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Improvements in the AST rewriter * Improvements on the refactoring engine: o No longer using BRM o Mer

Re: Vim breaks after Python upgrade

2009-11-17 Thread Terry Reedy
NickC wrote: Perhaps OT, but I figure here is where people have seen this commonly. I upgraded Python from my distro's default of 2.5.2 to 2.6.2. Vim is now complaining every startup about missing libraries, presumably as some plugins run some python code on initialisation. I'm guessing vim

Re: ast manipulation

2009-11-17 Thread Terry Reedy
Tsize wrote: Hello, I am hoping for a little help. I have been playing with the python ast module and have run into an issue that I need a little push on. I would like to be able to change a specific element in a specific node in an ast then compile the resulting ast. If you can identify the

Re: python simply not scaleable enough for google?

2009-11-17 Thread David Cournapeau
On Wed, Nov 18, 2009 at 5:48 AM, Paul Rubin wrote: > > What about Git?  Some people prefer it. Git is an interesting example, because it both really pushes performance into its core structure and reasonably complete implementations exist in other languages. In parti

Beautifulsoup code that is not running

2009-11-17 Thread Zeynel
Hello, Please help with this code suggested in the beautifulsoup group http://groups.google.com/group/beautifulsoup/browse_frm/thread/d288555c6992ceaa >>> from BeautifulSoup import BeautifulSoup >>> soup = BeautifulSoup (file("test.html").read()) >>> title = soup.find('title') >>> titleString =

Re: Command line arguments??

2009-11-17 Thread Nobody
On Tue, 17 Nov 2009 11:47:46 -0800, Gerry wrote: > How about this: > > lastarg = " ".join(sys.argv[2:]) What about it? IOW, why would you want to do that? -- http://mail.python.org/mailman/listinfo/python-list

Re: Anything equivalent to cassert in C++?

2009-11-17 Thread Simon Forman
On Tue, Nov 17, 2009 at 4:19 PM, Peng Yu wrote: > There are some assertion code (testing if a condition is false, if it > is false, raise an Error object) in my python, which is useful when I > test my package.  But such case would never occur when in the produce > code. If I keep them in if state

Re: python gui builders

2009-11-17 Thread Tim Daneliuk
Simon Hibbs wrote: > On 16 Nov, 10:06, me wrote: > >> What Python gui builder is well supported, does not require me >> to learn another framework/library, and can crank out stuff for >> multiple platforms ? > > You're looking for a framework/library that doesn't require you to > learn it. OK...

Re: python gui builders

2009-11-17 Thread Ben Finney
Scott David Daniels writes: > Well, let's see. You want to do gui work without learning things. Good > luck with that. If you discover how, I'd like to learn tensor analysis > without using symbols or operations more complex than addition and > subtraction. Maybe your groundwork can help me out w

Re: python gui builders

2009-11-17 Thread Joel Davis
On Nov 16, 5:06 am, me wrote: > Good People > > I do not write stuff for humans, as it has been my job to remove > humans from the loop. But I have to make a front end to a > component database where everything was built in Python. > > I have looked at the Tk stuff that is built into Python -> not

Anything equivalent to cassert in C++?

2009-11-17 Thread Peng Yu
There are some assertion code (testing if a condition is false, if it is false, raise an Error object) in my python, which is useful when I test my package. But such case would never occur when in the produce code. If I keep them in if statement, it will take some runtime. I'm wondering what is th

Re: python simply not scaleable enough for google?

2009-11-17 Thread Paul Rubin
Aaron Watters writes: > ... and I still have an issue with the whole "Python is slow" > meme. The reason NASA doesn't build a faster Python is because > Python when augmented with FORTRAN libraries... Do you think that numerics is the only area of programming where users care about speed? > And

Re: QuerySets in Dictionaries

2009-11-17 Thread scoopseven
On Nov 14, 11:55 pm, Steven D'Aprano wrote: > On Fri, 13 Nov 2009 14:10:10 -0800, scoopseven wrote: > > I actually had a queryset that was dynamically generated, so I ended up > > having to use the eval function, like this... > > > d = {} > > for thing in things: > >         query_name = 'thing_'

Re: Code for finding the 1000th prime

2009-11-17 Thread Terry Reedy
On Sun, 15 Nov 2009, mrholtsr wrote: I am absolutely new to python and barely past beginner in programming. Also I am not a mathematician. Can some one give me pointers for finding the 1000th. prime for a course I am taking over the internet on Introduction to Computer Science and Programming.

Sample CGI for use with Unit Tests

2009-11-17 Thread Kee Nethery
I've been looking for examples of how to run unit tests on a CGI. Didn't find any so I came up with this pared down sample. Don't know where to post example code so I figured I'd just email it to this list. Perhaps it will be findable by others in the future. This CGI with unit test example

Re: New syntax for blocks

2009-11-17 Thread Stephen Hansen
On Tue, Nov 17, 2009 at 10:15 AM, r wrote: > On Nov 17, 9:28 am, Jonathan Saxton wrote: > > > And if I ever find the genius who had the brilliant idea of using = to > mean assignment then I have a particularly nasty dungeon reserved just for > him. Also a foul-smelling leech-infested swamp for

ANN: Urwid 0.9.9 - Console UI Library

2009-11-17 Thread Ian Ward
Announcing Urwid 0.9.9 -- Urwid home page: http://excess.org/urwid/ Updated screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.tar.gz RSS: http://excess.org/feeds/tag/urwid/ About this release: === Thi

ANN: Urwid 0.9.9 - Console UI Library

2009-11-17 Thread Ian Ward
Announcing Urwid 0.9.9 -- Urwid home page: http://excess.org/urwid/ Updated screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.tar.gz RSS: http://excess.org/feeds/tag/urwid/ About this release: === Thi

Re: Code for finding the 1000th prime

2009-11-17 Thread Edward A. Falk
In article , mrholtsr wrote: >I am absolutely new to python and barely past beginner in programming. >Also I am not a mathematician. Can some one give me pointers for >finding the 1000th. prime for a course I am taking over the internet >on Introduction to Computer Science and Programming. Thanks

Re: Command line arguments??

2009-11-17 Thread Gerry
On Nov 17, 2:26 pm, Nobody wrote: > On Mon, 16 Nov 2009 23:30:09 +, Rhodri James wrote: > > Quote the filenames or escape the spaces: > > > C:\Python26\Python.exe C:\echo.py "C:\New Folder\text.txt" > > > We've been living with this pain ever since windowed GUIs encouraged users   > > to put s

Re: New syntax for blocks

2009-11-17 Thread Russ P.
On Nov 17, 7:28 am, Jonathan Saxton wrote: > On Thu, 12 Nov 2009 21:27:31 +0100, Bruno Desthuilliers wrote: > >> Congratulations, you just reinvented one of the most infamous source of > >> bugs in C, C++, Java, PHP, javascript and quite a few other languages. > >> Believe it or not, but not allow

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-17 Thread steven.oldner
Along the COBOl line is ABAP, the 4gl language from SAP. If today = 'Mon'. message 'oh boy'. elseif today = 'Wed'. message 'Hump day'. elseif today = 'Fri'. message 'TGIF'. else. message 'get to work'. endif. The period is the statement teminator. Indentation and separte lines are just to

Re: Command line arguments??

2009-11-17 Thread Nobody
On Mon, 16 Nov 2009 23:30:09 +, Rhodri James wrote: > Quote the filenames or escape the spaces: > > C:\Python26\Python.exe C:\echo.py "C:\New Folder\text.txt" > > We've been living with this pain ever since windowed GUIs encouraged users > to put spaces in their file names (Apple, I'm look

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Randall Walls
I don't believe so, but it seems like I'm in a catch 22, where I need to _winreg.OpenKey the key first before I can pass it to _winreg.DisableReflectionKey, but it doesn't exist, so I can't open it. I did find out that I can open the key using: hKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"

Re: directory wildcard

2009-11-17 Thread Nobody
On Mon, 16 Nov 2009 14:19:16 -0800, hong zhang wrote: >>         print >>f, mcs > > This assigns decimal value, how can I assign Hex here to mcs? print >>f, "%x" % mcs -- http://mail.python.org/mailman/listinfo/python-list

Re: New syntax for blocks

2009-11-17 Thread Nobody
On Tue, 17 Nov 2009 17:31:18 +, MRAB wrote: >> And if I ever find the genius who had the brilliant idea of using = >> to mean assignment then I have a particularly nasty dungeon reserved >> just for him. Also a foul-smelling leech-infested swamp for those >> language designers and compiler wr

Re: python gui builders

2009-11-17 Thread CM
On Nov 16, 5:06 am, me wrote: > Good People > > I do not write stuff for humans, as it has been my job to remove > humans from the loop. But I have to make a front end to a > component database where everything was built in Python. > > I have looked at the Tk stuff that is built into Python -> not

Re: python gui builders

2009-11-17 Thread r
On Nov 17, 12:20 pm, Simon Hibbs wrote: > I wouldn't completely dismiss Tkinter. It's too simple for complex > GUIs but I still think it has it's place for basic utilities. Agreed! Tkinter (besides myself) seems to be the whipping boy of c.l.py. Tkinter has it's place in Python because of the sa

Re: 2.6.4 Mac x86_64 ?

2009-11-17 Thread chris grebeldinger
On Nov 14, 12:53 am, Zvezdan Petkovic wrote: > On Nov 13, 2009, at 3:58 PM, chris grebeldinger wrote: > > > Hi All, > > I've been having some trouble getting ax86_64/i386 universal > > readline.so to build against libedit, on MacOS 10.5.6 as Apple does. > > Does anyone have any pointers about what

Re: python gui builders

2009-11-17 Thread Simon Hibbs
On 16 Nov, 10:06, me wrote: > What Python gui builder is well supported, does not require me > to learn another framework/library, and can crank out stuff for > multiple platforms ? You're looking for a framework/library that doesn't require you to learn it. OK I've had this problem for a f

Re: New syntax for blocks

2009-11-17 Thread r
On Nov 17, 9:28 am, Jonathan Saxton wrote: > And if I ever find the genius who had the brilliant idea of using = to mean > assignment then I have a particularly nasty dungeon reserved just for him.   > Also a foul-smelling leech-infested swamp for those language designers and > compiler writers

Is there a way to load multiple wxhtmlwindow at the same time?

2009-11-17 Thread Abe
All - I'm working on a program that loads a series of web pages so the user can view them quickly one after another. I'm using python and wxhtmlwindow, and the page loading is really slow. Is there a simple way to load up the next few pages in the queue while the user is looking at the current

ANN: Urwid 0.9.9 - Console UI Library

2009-11-17 Thread Ian Ward
Announcing Urwid 0.9.9 -- Urwid home page: http://excess.org/urwid/ Updated screen shots: http://excess.org/urwid/examples.html Tarball: http://excess.org/urwid/urwid-0.9.9.tar.gz RSS: http://excess.org/feeds/tag/urwid/ About this release: === This

Re: YIELD_VALUE Byte Code

2009-11-17 Thread Terry Reedy
Andreas Löscher wrote: Hi, I am not sure if this is the right newsgroup, so if not don't hesitate to tell me. Since there is no CPython internals list, this is the right place to start, even though you might end up having to post a slightly off-topic query to python-devel just to get the atte

Re: _winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Nick Stinemates
>From _winreg.c: "Disables registry reflection for 32-bit processes running on a 64-bit OperatingSystem. Will generally raise NotImplemented if executed on a 32-bit Operating System. If the key is not on the reflection list, the function succeeds but has noeffect. Disabling reflection for a key

_winreg error on open key (64bit) - proper usage of _winreg.DisableReflectionKey

2009-11-17 Thread Randall Walls
Greetings, I'm writing a python script to automate creating ODBC connections on a Windows2008 Server (64bit) platform. I created an ODBC manually (using the GUI), for the purposes of fleshing out the 'check for existing' section of the script. Problem: though I can see the key in regedit (HKEY_LO

Re: Vim breaks after Python upgrade

2009-11-17 Thread Nick Stinemates
At least with Gentoo, there's a command to recompile all of the plugins you have installed when upgrading python versions. Your issue is probably related to that. I don't think VIM uses hardcoded locations for scripts at the core. If you have any specific questions about the errors you're receivi

Re: Code for finding the 1000th prime

2009-11-17 Thread Chris Rebert
On Tue, Nov 17, 2009 at 9:27 AM, Diez B. Roggisch wrote: > Stefan Behnel wrote: >> Robert P. J. Day, 15.11.2009 15:44: >> Now, all that's left to do is write a prime number generator (a random >> number generator will do, too, but writing a good one isn't easy), run it >> repeatedly in a loop, and

Re: Language mavens: Is there a programming with "if then else ENDIF" syntax?

2009-11-17 Thread nn
On Nov 16, 11:54 am, Steve Ferg wrote: > This is a question for the language mavens that I know hang out here. > It is not Python related, except that recent comparisons of Python to > Google's new Go language brought it to mind. > > NOTE that this is *not* a suggestion to change Python.  I like P

  1   2   >