Re: A Python 3000 Question

2007-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2007 03:40:59 +, Tim Roberts wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: On Wed, 31 Oct 2007 22:48:12 -0700, Carl Banks wrote: I hope you're not serious that $# would make a good operator. If you happen to know where I borrowed it from, it would be pretty evident

Re: AOP and pep 246

2007-11-02 Thread Paddy
On Nov 1, 4:46 pm, Kay Schluehr [EMAIL PROTECTED] wrote: On 1 Nov., 16:18, Rustom Mody [EMAIL PROTECTED] wrote: I am interested in AOP in python. From here one naturally (or google-ly) reaches peak. But peak seems to be discontinued. Whereas pep-246 on adaptors seems to be rejected in

RE: posting to a form with no form name

2007-11-02 Thread Ryan Ginstrom
On Behalf Of [EMAIL PROTECTED] posting to a form with no form name or it's just that i cant find the form name. can anyone explain how to either post to a form with no name or, find the name of the form..here my current output, but i dont see a form name, also, there is only 1 form on the

Re: PyQt with embedded python in Qt App

2007-11-02 Thread Bart.
Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisał(a): So how to pass this object into embeded python interpreter (executed script)? Anyone know any example? You don't pass it, you _retrieve_ it in the embedded interpreter by invoking the code given to you. Know any example,

Re: AOP and pep 246

2007-11-02 Thread Carl Banks
On Nov 2, 12:10 am, Paul Rubin http://[EMAIL PROTECTED] wrote: Rustom Mody [EMAIL PROTECTED] writes: On 11/1/07, Kay Schluehr [EMAIL PROTECTED] wrote: AOP was a research that gone nowhere - at least not in its orginal AspectJ form: declaring aspect code that targets business code... My

Re: Readline and record separator

2007-11-02 Thread Bruno Desthuilliers
Dennis Lee Bieber a écrit : On Wed, 31 Oct 2007 11:13:21 +0100, Bruno Desthuilliers [EMAIL PROTECTED] declaimed the following in comp.lang.python: [1] Coma Separated Values - but the separator can be almost anything. Comma... oops... though at this time of night I feel like I

Re: posting to a form with no form name

2007-11-02 Thread [EMAIL PROTECTED]
On Nov 2, 12:04 am, Ryan Ginstrom [EMAIL PROTECTED] wrote: On Behalf Of [EMAIL PROTECTED] posting to a form with no form name or it's just that i cant find the form name. can anyone explain how to either post to a form with no name or, find the name of the form..here my current output,

Re: posting to a form with no form name

2007-11-02 Thread [EMAIL PROTECTED]
On Nov 2, 12:04 am, Ryan Ginstrom [EMAIL PROTECTED] wrote: On Behalf Of [EMAIL PROTECTED] posting to a form with no form name or it's just that i cant find the form name. can anyone explain how to either post to a form with no name or, find the name of the form..here my current output,

Re: (MAC) CoreGraphics module???

2007-11-02 Thread David C. Ullrich
On Thu, 01 Nov 2007 19:39:20 -0500, Robert Kern [EMAIL PROTECTED] wrote: David C. Ullrich wrote: [why doesn't CoreGraphics work?] That's different than the one that is referenced. The one those articles reference is only available in the Python that came with the system in

Re: raw_input() and utf-8 formatted chars

2007-11-02 Thread Marc 'BlackJack' Rintsch
On Thu, 01 Nov 2007 19:21:03 -0700, 7stud wrote: BeautifulSoup can convert an html entity representing an 'A' with umlaut, e.g.: Auml; into an without every touching my keyboard. How does BeautifulSoup do it? It maps the HTML entity names to unicode characters. Take a look at the

Re: Need some help...

2007-11-02 Thread Boris Borcic
Ricardo Aráoz wrote: Boris Borcic wrote: Ricardo Aráoz wrote: Boris Borcic wrote: [EMAIL PROTECTED] wrote: I want to create a program that I type in a word. for example... chaos each letter equals a number A=1 B=20 and so on. So Chaos would be C=13 H=4

Re: new style class

2007-11-02 Thread Wildemar Wildenburger
gert wrote: oops the code is like this but doesn't work class Test(object): def m1(self,v): return v def m2(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Well, what do you think: In [9]: gert

Re: new style class

2007-11-02 Thread Tim Chase
gert wrote: On Nov 2, 12:27 pm, Boris Borcic [EMAIL PROTECTED] wrote: gert wrote: class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Why doesn't

Re: new style class

2007-11-02 Thread Wildemar Wildenburger
gert wrote: On Nov 2, 12:27 pm, Boris Borcic [EMAIL PROTECTED] wrote: gert wrote: class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Why doesn't

Re: new style class

2007-11-02 Thread gert
On Nov 2, 12:31 pm, gert [EMAIL PROTECTED] wrote: On Nov 2, 12:27 pm, Boris Borcic [EMAIL PROTECTED] wrote: gert wrote: class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test()

Re: (MAC) CoreGraphics module???

2007-11-02 Thread Tommy Nordgren
On 2 nov 2007, at 02.10, David C. Ullrich wrote: Running OS X 10.4 Tiger. Various references by Apple and others say that there exists a module that gives Quartz bindings, allowing all sort of graphics things in Python. Sure enough, after installing Xcode I have some sample scripts. They

Re: new style class

2007-11-02 Thread Martin Sand Christensen
gert == gert [EMAIL PROTECTED] writes: gert Why doesn't this new style class work in python 2.5.1 ? Whether you declare your class as a new style class or an old style class, your code is completely and utterly broken. Calling non-existing methods has never been a good way of getting things

Re: PyQt with embedded python in Qt App

2007-11-02 Thread Bart.
Friday 02 of November 2007 12:21:06 BlueBird napisał(a): On Nov 2, 8:03 am, Bart. [EMAIL PROTECTED] wrote: Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisa (a): So how to pass this object into embeded python interpreter (executed script)? Anyone know any example? You

sell all NIKE.shox.Air max.AF1.TN.Jordan.shoes.Apple Ipods Nano, Xbox 360, Sony PS3, Sony PSP.wii.all laptops http://www.new-nikeshoes.com

2007-11-02 Thread 008
hi We are the biggest wholesale suppliers..We have a lot of very nice quality merchandises with the very special price We are wholesaler of Nike Jordan and Other Shoes in China. We are big Shoes Manufacturer in China. We supply many kinds of Shoes, such as Nike Shoes, Jordan 1-22, Air

Re: new style class

2007-11-02 Thread gert
On Nov 2, 12:27 pm, Boris Borcic [EMAIL PROTECTED] wrote: gert wrote: class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Why doesn't

Re: python newbie

2007-11-02 Thread Jim Hendricks
BartlebyScrivener wrote: On Nov 2, 8:51 am, Jim Hendricks [EMAIL PROTECTED] wrote: New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't explain: Did you look at THE tut? You would seem to be the perfect reader for it, because you are

Re: new style class

2007-11-02 Thread Boris Borcic
gert wrote: Could not one of you just say @staticmethod for once damnit :) I did, did I not ? -- http://mail.python.org/mailman/listinfo/python-list

http client using ssh -D

2007-11-02 Thread Nikola Skoric
Is there a python library which supports using SOCKS proxy which I create by ssh -D port remote-host? I was trying to use that socket by SocksiPy, but I get channel 3: open failed: administratively prohibited: open failed on the server side. And I can use that channel freely with firefox. Any

Re: python newbie

2007-11-02 Thread Neil Cerutti
On 2007-11-02, Jim Hendricks [EMAIL PROTECTED] wrote: New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't explain: 1) global vars - python sets scope to the block a var is declared (1st set), I see the global keyword that allows access

Re: python newbie

2007-11-02 Thread Duncan Booth
Bjoern Schliessmann [EMAIL PROTECTED] wrote: Jim Hendricks wrote: I see the global keyword that allows access to global vars in a function, what I'm not clear on is does that global need to be declared in the global scope, You can't just declare in Python, you always define objects (and

Re: new style class

2007-11-02 Thread Bjoern Schliessmann
Wildemar Wildenburger wrote: Bjoern Schliessmann wrote: No, since everyone's crystal balls are in repair. I don't even have crystal balls! Not many are rich *and* impotent. :) Regards, Björn -- BOFH excuse #14: sounds like a Windows problem, try calling Microsoft support --

Re: python newbie

2007-11-02 Thread Bjoern Schliessmann
Please use a more informative subject next time. Jim Hendricks wrote: 1) global vars - python sets scope to the block a var is declared (1st set), http://docs.python.org/ref/global.html I'm afraid not. Python only interprets the listed name(s) as globals. I see the global keyword that

Re: python newbie

2007-11-02 Thread BartlebyScrivener
On Nov 2, 8:51 am, Jim Hendricks [EMAIL PROTECTED] wrote: New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't explain: Did you look at THE tut? You would seem to be the perfect reader for it, because you are already a programmer.

PyQt with embedded python in Qt App

2007-11-02 Thread David Boddie
On Fri Nov 2 12:59:48 CET 2007, Bart. wrote: Or I want to use PyQt in scripts to have similar gui for plugins written in python Or I want to extend application by scripts with PyQt. Or better question: How to easy add python scripting in Qt application and have almast all objects of app

Re: Is there a usenet library for Python?

2007-11-02 Thread Grant Edwards
On 2007-11-02, Just Another Victim of the Ambient Morality [EMAIL PROTECTED] wrote: I'm interested in the former, an NNTP client. Thank you Grant and Jean-Paul (who answered this question in another post). I should have guessed at searching for NNTP instead of usenet... What to Google

Re: Copy database with python..

2007-11-02 Thread Martin Sand Christensen
Abandoned == Abandoned [EMAIL PROTECTED] writes: Abandoned Yes i understand thank you. Now i find that maybe help the Abandoned other users. Abandoned import os Abandoned os.system(su postgres) Abandoned ... I get the distinct impression that you're trying to replace simple shell scripting

Re: Copy database with python..

2007-11-02 Thread Abandoned
On Nov 2, 4:19 pm, Paul McNett [EMAIL PROTECTED] wrote: Abandoned wrote: Hi. I want to copy my database but python give me error when i use this command. cursor.execute(pg_dump mydata old.dump) What is the problem ? And how can i copy the database with python ? You are just going to

Re: Copy database with python..

2007-11-02 Thread Abandoned
On Nov 2, 4:11 pm, Martin Sand Christensen [EMAIL PROTECTED] wrote: Abandoned == Abandoned [EMAIL PROTECTED] writes: Abandoned I want to copy my database but python give me error when i Abandoned use this command. cursor.execute(pg_dump mydata old.dump) Abandoned What is the problem ?

Re: Copy database with python..

2007-11-02 Thread Paul McNett
Abandoned wrote: Hi. I want to copy my database but python give me error when i use this command. cursor.execute(pg_dump mydata old.dump) What is the problem ? And how can i copy the database with python ? You are just going to have to give us more to go on. Please post the entire

Re: Copy database with python..

2007-11-02 Thread Martin Sand Christensen
Abandoned == Abandoned [EMAIL PROTECTED] writes: Abandoned I want to copy my database but python give me error when i Abandoned use this command. cursor.execute(pg_dump mydata old.dump) Abandoned What is the problem ? cursor.execute() is for executing SQL commands, and this is not an SQL

Re: Copy database with python..

2007-11-02 Thread Carsten Haese
On Fri, 2007-11-02 at 06:51 -0700, Abandoned wrote: Hi. I want to copy my database but python give me error when i use this command. cursor.execute(pg_dump mydata old.dump) cursor.execute executes SQL queries. pg_dump is not an SQL query, it is an operating system command. To execute OS

Copy database with python..

2007-11-02 Thread Abandoned
Hi. I want to copy my database but python give me error when i use this command. cursor.execute(pg_dump mydata old.dump) What is the problem ? And how can i copy the database with python ? Note: The database's size is 200 GB -- http://mail.python.org/mailman/listinfo/python-list

python newbie

2007-11-02 Thread Jim Hendricks
New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't explain: 1) global vars - python sets scope to the block a var is declared (1st set), I see the global keyword that allows access to global vars in a function, what I'm not clear on is

Re: MySQLdb.string_literal

2007-11-02 Thread Carsten Haese
On Fri, 2007-11-02 at 12:24 +, gert wrote: I want to escape binary data so i can insert data into a blob No, you don't want to escape binary data. You want to bind it to a parametrized query: http://informixdb.blogspot.com/2007/07/filling-in-blanks.html Keep in mind, though, that MySQLdb

Re: python newbie

2007-11-02 Thread Jim Hendricks
Bjoern Schliessmann wrote: Please use a more informative subject next time. Jim Hendricks wrote: 1) global vars - python sets scope to the block a var is declared (1st set), http://docs.python.org/ref/global.html I'm afraid not. Python only interprets the listed name(s) as globals.

Re: compiling python 3000 on debian etch

2007-11-02 Thread rustompmody
On Nov 2, 6:56 pm, Carl Banks [EMAIL PROTECTED] wrote: Here is the home page for the Debian source package for Python 2.5--it lists the build dependencies. http://packages.debian.org/source/etch/python2.5 Ok Thanks With that help Ive got it down to this (output of (end of) make) Failed to

Re: compiling python 3000 on debian etch

2007-11-02 Thread Carl Banks
On Nov 2, 8:24 am, Rustom Mody [EMAIL PROTECTED] wrote: Ive been trying to compile python 3000 on debian etch And on running test I get: 4 skips unexpected on linux2: test_tcl test_dbm test_ssl test_bsddb Can someone tell me what packages I am missing? Here is the home page for the

Re: new style class

2007-11-02 Thread Nigel Rantor
gert wrote: Could not one of you just say @staticmethod for once damnit :) why were you asking if you knew the answer? yeesh -- http://mail.python.org/mailman/listinfo/python-list

Re: python newbie

2007-11-02 Thread BartlebyScrivener
On Nov 2, 10:13 am, Jim Hendricks [EMAIL PROTECTED] wrote: Here's an example of what I am asking: Try this example from Beazley (pg 82) a = 42 def foo(): a = 13 foo() print a 42 By contrast: a = 42 b = 13 def foo(): global a, b a = 13 b = 0 foo() print a 13 print b 0 --

Re: MySQLdb.string_literal

2007-11-02 Thread gert
On Nov 2, 1:48 pm, Carsten Haese [EMAIL PROTECTED] wrote: On Fri, 2007-11-02 at 12:24 +, gert wrote: I want to escape binary data so i can insert data into a blob No, you don't want to escape binary data. You want to bind it to a parametrized query:

Re: new style class

2007-11-02 Thread Nigel Rantor
gert wrote: On Nov 2, 12:27 pm, Boris Borcic [EMAIL PROTECTED] wrote: gert wrote: class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Why doesn't

Re: new style class

2007-11-02 Thread Wildemar Wildenburger
Bjoern Schliessmann wrote: gert wrote: Could not one of you just say @staticmethod for once damnit :) No, since everyone's crystal balls are in repair. I don't even have crystal balls! /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax coloring in Python interpreter

2007-11-02 Thread kyosohma
On Nov 1, 12:45 pm, braver [EMAIL PROTECTED] wrote: Greetings -- as a long time user of both Python and Ruby interpreters, I got used to the latter's syntax-coloring gem, wirble, which colorizes Ruby syntax on the fly. Is there anything similar for Python? What's wrong with IDLE? There's a

Re: new style class

2007-11-02 Thread Boris Borcic
gert wrote: class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Why doesn't this new style class work in python 2.5.1 ? why should it ? --

Re: marshal vs pickle

2007-11-02 Thread Aaron Watters
On Nov 1, 11:42 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: Aaron Watters [EMAIL PROTECTED] writes: marshal.loads('RKp,U\xf7`\xef\xe77\xc1\xea\xd8\xec\xbe\\') Segmentation fault ... I'll grant you the above as a denial of service attack. ... Can you give me an example where

Re: Syntax coloring in Python interpreter

2007-11-02 Thread Neil Cerutti
On 2007-11-02, Tim Golden [EMAIL PROTECTED] wrote: Neil Cerutti wrote: On 2007-11-01, Chris Mellon [EMAIL PROTECTED] wrote: On Nov 1, 2007 3:01 PM, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-11-01, Lee Capps [EMAIL PROTECTED] wrote: On Nov 1, 2007, at 1:45 PM, braver wrote: Greetings --

using the filter function within class return error

2007-11-02 Thread david . katkowski
I'm trying to use the __builtin__ filter function within a class; however, I receive the following error: NameError: global name 'MajEthnic' is not defined The line of code is: EthMaj = filter(self.MajEthnic,flist) So, I'm trying to use the MajEthnic function to filter the list flist. Any

Re: python newbie

2007-11-02 Thread J. Clifford Dyer
On Fri, Nov 02, 2007 at 11:13:00AM -0400, Jim Hendricks wrote regarding Re: python newbie: BartlebyScrivener wrote: On Nov 2, 8:51 am, Jim Hendricks [EMAIL PROTECTED] wrote: New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't

[ANN] Leo 4.4.4 Final released

2007-11-02 Thread Edward K Ream
Leo 4.4.4 Final is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html Leo 4.4.4 contains many important features originally planned

Re: Iterable Flattener with Depth.

2007-11-02 Thread Ian Clark
thebjorn wrote: On Nov 2, 6:32 am, praddy [EMAIL PROTECTED] wrote: On Nov 1, 5:03 pm, [EMAIL PROTECTED] wrote: Pradeep Jindal: Any comments? Something with similar functionality (plus another 20 utility functions/classes or so) has probably to go into the std lib... :-) Bye, bearophile

Re: new style class

2007-11-02 Thread gert
On Nov 2, 4:04 pm, Boris Borcic [EMAIL PROTECTED] wrote: gert wrote: Could not one of you just say @staticmethod for once damnit :) I did, did I not ? i am sorry, yes you did :) -- http://mail.python.org/mailman/listinfo/python-list

Re: python newbie

2007-11-02 Thread Jim Hendricks
J. Clifford Dyer wrote: before calling my_function, x does not exist in my program. So, my question is in my_function, the combination of using the global statement, then implicitly creating x via assignment to the result of the open function, is x created in the global namespace? Yes.

Re: python newbie

2007-11-02 Thread tasjaevan
On Nov 2, 3:35 pm, Jim Hendricks [EMAIL PROTECTED] wrote: This sounds like an issue of terminology. I understand that I don't declare variables like I would in C or Java, but that they are implicitly declared via the first assignment. And the define objects and bind a name to them makes no

Re: Is pyparsing really a recursive descent parser?

2007-11-02 Thread Paul McGuire
On Nov 2, 5:47 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: Pyparsing is no recursive descent parser. It doesn't go back in the input stream. The ``OneOrMore(Word(alphas))`` part eats the 'end' and when it can't get more, the parser moves to the ``Literal('end')`` part which fails

Re: new style class

2007-11-02 Thread gert
On Nov 2, 2:10 pm, Wildemar Wildenburger [EMAIL PROTECTED] wrote: Bjoern Schliessmann wrote: gert wrote: Could not one of you just say @staticmethod for once damnit :) No, since everyone's crystal balls are in repair. I don't even have crystal balls! /W lol --

Re: new style class

2007-11-02 Thread Boris Borcic
gert wrote: [...] Why doesn't this new style class work in python 2.5.1 ? why should it ? I don't know I thought it was supported from 2.2? oops the code is like this but doesn't work class Test(object): def m1(self,v): return v def m2(v): return v if

MySQLdb.string_literal

2007-11-02 Thread gert
I want to escape binary data so i can insert data into a blob Using MySQLdb.string_literal(data) doesn't seem to escape everything ? -- http://mail.python.org/mailman/listinfo/python-list

compiling python 3000 on debian etch

2007-11-02 Thread Rustom Mody
Ive been trying to compile python 3000 on debian etch And on running test I get: 4 skips unexpected on linux2: test_tcl test_dbm test_ssl test_bsddb Can someone tell me what packages I am missing? -- http://mail.python.org/mailman/listinfo/python-list

Re: os.readlink returning value

2007-11-02 Thread Giampaolo Rodola'
On 2 Nov, 05:30, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 01 Nov 2007 22:51:14 -0300, Giampaolo Rodola' [EMAIL PROTECTED] escribió: I was reading os.readlink doc which says: readlink( path) Return a string representing the path to which the symbolic link points. The result

new style class

2007-11-02 Thread gert
class Test(object): def execute(self,v): return v def escape(v): return v if __name__ == '__main__': gert = Test() print gert.m1('1') print Test.m2('2') Why doesn't this new style class work in python 2.5.1 ? --

Re: PyQt with embedded python in Qt App

2007-11-02 Thread BlueBird
On Nov 2, 8:03 am, Bart. [EMAIL PROTECTED] wrote: Friday 02 of November 2007 01:06:58 Diez B. Roggisch napisa (a): So how to pass this object into embeded python interpreter (executed script)? Anyone know any example? You don't pass it, you _retrieve_ it in the embedded interpreter by

difference between IDLE and command line

2007-11-02 Thread Jim Hendricks
New to Python, and just had something strange happen. I've been running my new code in IDLE running in windows. My IDLE version shows as 1.2.1, Python version displaying in IDLE is 2.5.1. I have been editing my code in UltraEdit then testing in IDLE by choosing open, then F5. I didn't see an

Re: python newbie

2007-11-02 Thread Bruno Desthuilliers
Bjoern Schliessmann a écrit : Jim Hendricks wrote: (snip) I see the global keyword that allows access to global vars in a function, what I'm not clear on is does that global need to be declared in the global scope, You can't just declare in Python, you always define objects (and bind a

Re: new style class

2007-11-02 Thread Bjoern Schliessmann
gert wrote: oops the code is like this but doesn't work For sake of the god of your choice, please always provide runnable code as well as hints to - what you think it should do - what you want it to do - what exact error message(s) you get NOT just it doesn't work. Regards, Björn --

Writing GTK UI for Python apps in XUL

2007-11-02 Thread Devraj
Hi everyone, Is it possible to write UI code in XUL for a GTK Python application? I found NuFox, which does the reverse (lets me write Python to generate XUL) Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterable Flattener with Depth.

2007-11-02 Thread thebjorn
On Nov 2, 6:32 am, praddy [EMAIL PROTECTED] wrote: On Nov 1, 5:03 pm, [EMAIL PROTECTED] wrote: Pradeep Jindal: Any comments? Something with similar functionality (plus another 20 utility functions/classes or so) has probably to go into the std lib... :-) Bye, bearophile Same

Re: PyCheck for a classes defined in python and user data in PyObject_HEAD

2007-11-02 Thread Hrvoje Niksic
Note that there is a mailing list dedicated to the Python/C API, http://mail.python.org/mailman/listinfo/capi-sig [EMAIL PROTECTED] writes: issue #2 I'm in a situation when i don't really need to extend python with any classes of my own but i do have extra luggage for the python data

Re: A Python 3000 Question

2007-11-02 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Fri, 02 Nov 2007 03:40:59 +, Tim Roberts wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: On Wed, 31 Oct 2007 22:48:12 -0700, Carl Banks wrote: I hope you're not serious that $# would make a good operator. If you happen to know where I borrowed it from, it

looping

2007-11-02 Thread Beema shafreen
hi everybody, I have a file: A_16_P21360207 304 A_14_P136880783 A_16_P21360209795 A_16_P21360210173 A_16_P036419591177 A_16_P036419601944 A_16_P03641962999 A_16_P036419633391 A_16_P415636493626 A_16_P03641964180 A_16_P415636551216

Re: Adding GNU Readline after installation?

2007-11-02 Thread Michele Simionato
On Nov 2, 3:37 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I compiled Python from source on a bunch of my development machines without enabling the readline modules. Is it possible to add readline support after installation? I really just want to get my up arrow history working... Google

Re: Syntax coloring in Python interpreter

2007-11-02 Thread Tim Golden
Neil Cerutti wrote: On 2007-11-01, Chris Mellon [EMAIL PROTECTED] wrote: On Nov 1, 2007 3:01 PM, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-11-01, Lee Capps [EMAIL PROTECTED] wrote: On Nov 1, 2007, at 1:45 PM, braver wrote: Greetings -- as a long time user of both Python and Ruby

Re: 3 number and dot..

2007-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2007 16:39:12 +, Roberto Bonvallet wrote: On 31 oct, 22:21, Paul Rubin http://[EMAIL PROTECTED] wrote: def convert(n): assert type(n) in (int,long) I'd replace this line with n = int(n), more in the spirit of duck typing. Not necessarily. Something duck typing is

Re: new style class

2007-11-02 Thread gert
Could not one of you just say @staticmethod for once damnit :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy database with python..

2007-11-02 Thread Diez B. Roggisch
Abandoned wrote: On Nov 2, 4:19 pm, Paul McNett [EMAIL PROTECTED] wrote: Abandoned wrote: Hi. I want to copy my database but python give me error when i use this command. cursor.execute(pg_dump mydata old.dump) What is the problem ? And how can i copy the database with python ? You

Re: Is pyparsing really a recursive descent parser?

2007-11-02 Thread Marc 'BlackJack' Rintsch
On Fri, 02 Nov 2007 06:05:13 +, Just Another Victim of the Ambient Morality wrote: Is pyparsing really a recursive descent parser? I ask this because there are grammars it can't parse that my recursive descent parser would parse, should I have written one. For instance: from

Re: Need some help...

2007-11-02 Thread Ricardo Aráoz
Gabriel Genellina wrote: En Thu, 01 Nov 2007 20:12:52 -0300, Ricardo Aráoz [EMAIL PROTECTED] escribió: def sumToOneDigit(num) : if num 10 : return num else : return sumToOneDigit(sum(int(i) for i in str(num))) def sumToOneDigit(num): return num % 9

Re: A Python 3000 Question

2007-11-02 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: Seriously? You didn't know that $#x in perl returns the length of the array @x, minus 1? I don't speak Perl. You know there are million of us who have managed to avoid it. I used to use perl (though I was never an expert) and I didn't know that

Re: Adding GNU Readline after installation?

2007-11-02 Thread Uwe Grauer
[EMAIL PROTECTED] wrote: I compiled Python from source on a bunch of my development machines without enabling the readline modules. Is it possible to add readline support after installation? I really just want to get my up arrow history working... No. You have to uncomment readline

Re: trapping DLL import issues without blocking pop up window

2007-11-02 Thread Thomas Heller
alf schrieb: Hi, there is following issue: import cx_Oracle on windows pops up a nice 'DLL missing' window in case there indeed is no CLI.DLL (or something like that). Then the exception is raised. Catching the exception is obviously not a problem, but the popup practically blocks

Re: new style class

2007-11-02 Thread Bjoern Schliessmann
gert wrote: Could not one of you just say @staticmethod for once damnit :) No, since everyone's crystal balls are in repair. Regards, Björn -- BOFH excuse #256: You need to install an RTFM interface. -- http://mail.python.org/mailman/listinfo/python-list

Re: 3 number and dot..

2007-11-02 Thread Roberto Bonvallet
On 31 oct, 22:21, Paul Rubin http://[EMAIL PROTECTED] wrote: def convert(n): assert type(n) in (int,long) I'd replace this line with n = int(n), more in the spirit of duck typing. -- Roberto Bonvallet -- http://mail.python.org/mailman/listinfo/python-list

Re: python newbie

2007-11-02 Thread Bruno Desthuilliers
Jim Hendricks a écrit : New to python, programming in 15 or so langs for 24 years. Couple of questions the tuts I've looked at don't explain: 1) global vars - python sets scope to the block a var is declared (1st set), I see the global keyword that allows access to global vars in a

Re: new style class

2007-11-02 Thread Aahz
In article [EMAIL PROTECTED], Nigel Rantor [EMAIL PROTECTED] wrote: I think what Boris was being exceedingly unhelpful in saying was why should it work when you're calling methods that do not exist http://www.catb.org/~esr/faqs/smart-questions.html -- Aahz ([EMAIL PROTECTED]) *

Re: Writing GTK UI for Python apps in XUL

2007-11-02 Thread Alberto Berti
Devraj == Devraj [EMAIL PROTECTED] writes: Devraj Hi everyone, Is it possible to write UI code in XUL for a Devraj GTK Python application? I found NuFox, which does the Devraj reverse (lets me write Python to generate XUL) i wrote such a system as a proof of concept, it's far from

Webservices, SOAP and Python

2007-11-02 Thread João Rodrigues
Hello all, I'm trying to build a webserver client and I'm having quite the trouble. I ended up using ZSI (since it's the only one that I could actually install on my Linux system) but I wonder: is there any other software for this purpose? I read about SOAPpy and PyXML but since both are

Re: using the filter function within class return error

2007-11-02 Thread Steven D'Aprano
On Fri, 02 Nov 2007 09:42:17 -0700, david.katkowski wrote: I'm trying to use the __builtin__ filter function within a class; however, I receive the following error: NameError: global name 'MajEthnic' is not defined The line of code is: EthMaj = filter(self.MajEthnic,flist) So, I'm

Assertion for python scripts

2007-11-02 Thread matthias
Howdy ! I started using the assert() stmt and found it quite useful :-) I have only one problem: I don't know how to turn them off again. I know that -O turns off assertions in general. However, how do I pass thus parameter to python to an executable script ? I have tried the following: 1.

Re: Assertion for python scripts

2007-11-02 Thread Matt McCredie
On 11/2/07, matthias [EMAIL PROTECTED] wrote: Howdy ! I started using the assert() stmt and found it quite useful :-) I have only one problem: I don't know how to turn them off again. I know that -O turns off assertions in general. However, how do I pass thus parameter to python to an

Re: (MAC) CoreGraphics module???

2007-11-02 Thread Robert Kern
David C. Ullrich wrote: On Thu, 01 Nov 2007 19:39:20 -0500, Robert Kern [EMAIL PROTECTED] wrote: David C. Ullrich wrote: [why doesn't CoreGraphics work?] That's different than the one that is referenced. The one those articles reference is only available in the Python that came with the

Re: marshal vs pickle

2007-11-02 Thread Aaron Watters
On Nov 1, 10:12 am, Aaron Watters [EMAIL PROTECTED] wrote: On Oct 31, 6:10 pm, Raymond Hettinger [EMAIL PROTECTED] wrote: Alright already. Here is the patched file you want http://nucular.sourceforge.net/kisstree_pickle.py This file has been removed. After consideration, I don't want to

Re: Assertion for python scripts

2007-11-02 Thread matthias
On Nov 2, 12:12 pm, Matt McCredie [EMAIL PROTECTED] wrote: On 11/2/07, matthias [EMAIL PROTECTED] wrote: Howdy ! I started using the assert() stmt and found it quite useful :-) I have only one problem: I don't know how to turn them off again. I know that -O turns off assertions

error ...1 value to unpack

2007-11-02 Thread Beema shafreen
hi everybody, i have a file: A_16_P21360207#304 A_14_P136880#783 A_16_P21360209#795 A_16_P21360210#173 A_16_P03641959#1177 A_16_P03641960#1944 A_16_P03641962#999 A_16_P41563648#-31 A_16_P03641963#3391 A_16_P41563649#3626 A_16_P03641964#180 A_16_P41563655#1216 A_16_P03641965#1170

Re: Iterable Flattener with Depth.

2007-11-02 Thread Pradeep Jindal
On Friday 02 Nov 2007 10:43:45 pm Ian Clark wrote: thebjorn wrote: On Nov 2, 6:32 am, praddy [EMAIL PROTECTED] wrote: On Nov 1, 5:03 pm, [EMAIL PROTECTED] wrote: Pradeep Jindal: Any comments? Something with similar functionality (plus another 20 utility functions/classes or so) has

Re: 3 number and dot..

2007-11-02 Thread Roberto Bonvallet
On 2 nov, 14:54, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: Not necessarily. Something duck typing is too liberal in what it accepts. You might want convert(math.pi) to raise an exception What I meant was that the function should not reject unnecessarily non- numeric things

Re: Assertion for python scripts

2007-11-02 Thread Bart.
Friday 02 of November 2007 20:53:12 matthias napisał(a): On Nov 2, 12:12 pm, Matt McCredie [EMAIL PROTECTED] wrote: On 11/2/07, matthias [EMAIL PROTECTED] wrote: Howdy ! I started using the assert() stmt and found it quite useful :-) I have only one problem: I don't know how to

  1   2   >