Simple hack to get $500 to your home.

2010-07-13 Thread easy money
Simple hack to get $500 to your home at http://cashbygetpaypal.tk Due to high security risks,i have hidden the cheque link in an image. in that website on top side above search box, click on image and enter your name and address where you want to receive your cheque. please don,t tell to anyone.

Re: C interpreter in Lisp/scheme/python

2010-07-13 Thread Paul Rubin
bolega writes: > I am trying to compare LISP/Scheme/Python for their expressiveness... > Are there already answers anywhere ? > How would a gury approach such a project ? These two articles http://page.mi.fu-berlin.de/~prechelt/Biblio/jccpprt_computer2000.pdf http://www.haskell.org/pape

Python track at German Zope conference

2010-07-13 Thread Martin v. Loewis
[Das ist im Wesentlichen eine Kopie einer Nachricht, die Dinu an die Python-DE-Liste geschickt hat.] >From September 15 to September 17, 2010, the German Zope conference (organized by DZUG) takes place in Dresden. It has tracks for Python, Zope, and Plone. Dinu Gherman and me are organizing the P

Re: C interpreter in Lisp/scheme/python

2010-07-13 Thread geremy condra
On Tue, Jul 13, 2010 at 11:01 PM, bolega wrote: > On Jun 20, 9:31 pm, Richard Fateman wrote: >> Define Macro wrote: >> > On Jun 13, 7:07 pm, bolega wrote: >> >> I am trying to compare LISP/Scheme/Python for their expressiveness. >> >> >> For this, I propose a vanilla C interpreter. I have seen a

Re: C interpreter in Lisp/scheme/python

2010-07-13 Thread bolega
On Jun 20, 9:31 pm, Richard Fateman wrote: > Define Macro wrote: > > On Jun 13, 7:07 pm, bolega wrote: > >> I am trying to compare LISP/Scheme/Python for their expressiveness. > > >> For this, I propose a vanilla C interpreter. I have seen a book which > >> writes C interpreter in C. > > >> The c

Re: python namespace question

2010-07-13 Thread alex23
chad wrote: > I could care less about the extra blank line. I guess I was just more > concerned about the namespace question. Which is why Steven spent far more time answering that question than commenting on newline handling. Now say 'thank you'. -- http://mail.python.org/mailman/listinfo/pyth

Re: floatref

2010-07-13 Thread Steven D'Aprano
On Wed, 14 Jul 2010 06:50:58 +0200, Alf P. Steinbach /Usenet wrote: > Possibly you have a point here. Oh yeah? Don't think you can escape a flame war by agreeing with me! *wink* -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: floatref

2010-07-13 Thread Alf P. Steinbach /Usenet
* Steven D'Aprano, on 14.07.2010 06:31: Gary did the right thing by pointing out that the simple-sounding term "points to" is anything but simple, it depends on what you mean by pointing and pointers. Possibly you have a point here. Cheers, - Alf -- blog at http://alfps.wordpress.com> -- h

Re: floatref

2010-07-13 Thread Steven D'Aprano
On Wed, 14 Jul 2010 03:19:36 +0200, Alf P. Steinbach /Usenet wrote: > Gary Herron wrote: >> Python does not have pointers, so if I take your wording"y.var and >> x.var to point to the same value" literally, then the answer is NO >> Python does not do that. > > This is just a terminological issue.

Re: python namespace question

2010-07-13 Thread Steven D'Aprano
On Tue, 13 Jul 2010 20:52:31 -0700, Chris Rebert wrote: > The built-ins is the > namespace of last resort; it's the last one to be consulted when trying > to resolve a name in Python. You can inspect it via __builtins__ Avoid __builtins__ as it is an implementation detail. The difference between

Re: python namespace question

2010-07-13 Thread Chris Rebert
On Tue, Jul 13, 2010 at 8:03 PM, chad wrote: > Given the following code... > > #!/usr/bin/python > > class cgraph: >    def printme(self): >        print "hello\n" > > x = cgraph() > x.printme() > > > Does the function print() exist in the cgraph namespace or the > printme() one? Neither. It exis

Re: python namespace question

2010-07-13 Thread chad
On Jul 13, 8:37 pm, Steven D'Aprano wrote: > On Tue, 13 Jul 2010 20:03:14 -0700, chad wrote: > > Given the following code... > > > #!/usr/bin/python > > > class cgraph: > >     def printme(self): > >         print "hello\n" > > > x = cgraph() > > x.printme() > > > Does the function print() exist i

Re: python ldap recursive

2010-07-13 Thread Steven D'Aprano
On Tue, 13 Jul 2010 18:15:58 -0700, tekion wrote: > Hi, > I know perl Net::LDAP could do a recursive search call to LDAP. What I > am running into with Python LDAP on the search call is that I would l > have to wait for the search to complete to get the result. Where as > with Perl recursive se

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-13 Thread Steven D'Aprano
On Tue, 13 Jul 2010 23:24:12 -0400, Kenneth Tilton wrote: > The moral? If you look for the spam, you'll find it. And if you *don't* look for spam, you can be sure that some goose will reply to it and get it past your filters. Thanks for that Kenneth, if that is your name and you're not a Xah Le

Re: python namespace question

2010-07-13 Thread Steven D'Aprano
On Tue, 13 Jul 2010 20:03:14 -0700, chad wrote: > Given the following code... > > #!/usr/bin/python > > class cgraph: > def printme(self): > print "hello\n" > > x = cgraph() > x.printme() > > > Does the function print() exist in the cgraph namespace or the printme() > one? What

Re: Check if a command is valid

2010-07-13 Thread Shashwat Anand
On Tue, Jul 13, 2010 at 6:59 AM, Kenny Meyer wrote: > Hello, > > I have to figure out if a string is callable on a Linux system. I'm > actually doing this: > >def is_valid_command(command): >retcode = 100 # initialize >if command: >retcode = subprocess.call(command

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-13 Thread Kenneth Tilton
Xah Lee wrote: • Death of Newsgroups http://xahlee.org/UnixResource_dir/writ2/death_of_newsgroups.html plain text version follows. -- Death of Newsgroups Xah Lee, 2010-07-13 Microsoft is closing down their newsgroups. See: microsoft.public.win

Re: python namespace question

2010-07-13 Thread Shashwat Anand
On Wed, Jul 14, 2010 at 8:33 AM, chad wrote: > Given the following code... > > #!/usr/bin/python > > class cgraph: >def printme(self): >print "hello\n" > No need to do print "hello\n", python is not C, print "hello" prints hello with a newline. Try it on interpretor. > > x = cgraph

python namespace question

2010-07-13 Thread chad
Given the following code... #!/usr/bin/python class cgraph: def printme(self): print "hello\n" x = cgraph() x.printme() Does the function print() exist in the cgraph namespace or the printme() one? -- http://mail.python.org/mailman/listinfo/python-list

Problem with executing python interpretetor on special build of win server 2003

2010-07-13 Thread Бажен Ржеутский
Hello. Actual problem in the next, when i trying to execute portable python on my build then nothing happens, and the error code is 128. What does mean this code 128? -- http://mail.python.org/mailman/listinfo/python-list

Re: nicer way to remove prefix of a string if it exists

2010-07-13 Thread Shashwat Anand
On Wed, Jul 14, 2010 at 5:42 AM, MRAB wrote: > News123 wrote: > >> I wondered about a potentially nicer way of removing a prefix of a >> string if it exists. >> >> >> Here what I tried so far: >> >> >> def rm1(prefix,txt): >>if txt.startswith(prefix): >>return txt[len(prefix):] >>

Re: floatref

2010-07-13 Thread Steven D'Aprano
On Tue, 13 Jul 2010 19:26:34 +0200, Roald de Vries wrote: > Hi all, > > I have two objects that should both be able to alter a shared float. So > i need something like a mutable float object, or a float reference > object. Does anybody know if something like that exists? I know it's not > hard to

Re: floatref

2010-07-13 Thread Alf P. Steinbach /Usenet
* Gary Herron, on 14.07.2010 01:26: On 07/13/2010 03:02 PM, Roald de Vries wrote: Hi Gary, On Jul 13, 2010, at 8:54 PM, Gary Herron wrote: On 07/13/2010 10:26 AM, Roald de Vries wrote: Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mut

python ldap recursive

2010-07-13 Thread tekion
Hi, I know perl Net::LDAP could do a recursive search call to LDAP. What I am running into with Python LDAP on the search call is that I would l have to wait for the search to complete to get the result. Where as with Perl recursive search call, I would get the result (not the completed result)

Re: Why doesn't python's list append() method return the list itself?

2010-07-13 Thread Aahz
[Original not available on my swerver, responding here] >On 7/11/10 10:03 PM, Nathan Rice wrote: >> >> Yeah, I long ago filed the in place place in the same folder as >> strings-as-sequences, all() returning True for an empty iterable and any >> returning True rather than the thing which triggered

Re: Errno 9] Bad file descriptor

2010-07-13 Thread Cameron Simpson
On 13Jul2010 05:56, joblack wrote: | Thanks for the answers so far. It's not my code I'm just curious how | that could happen: | | Starting point: | ... | self.status['text'] = 'Processing ...' | try: | cli_main(argv) | except Exception, e: | self.s

Re: How is Unladen Swallow coming along?

2010-07-13 Thread Dan Stromberg
2010/7/8 Luis M. González > On Jul 8, 1:42 pm, John Nagle wrote: > > How is Unladen Swallow coming along? Looking at the site, code is > > being checked in and issues are being reported, but the last quarterly > > release was 2009 Q3. They missed their January 2010 release date > > for "20

Re: nicer way to remove prefix of a string if it exists

2010-07-13 Thread MRAB
News123 wrote: I wondered about a potentially nicer way of removing a prefix of a string if it exists. Here what I tried so far: def rm1(prefix,txt): if txt.startswith(prefix): return txt[len(prefix):] return txt for f in [ 'file:///home/me/data.txt' , '/home/me/data.txt' ]:

Re: nicer way to remove prefix of a string if it exists

2010-07-13 Thread Juan Andres Knebel
Hi, for rm1 I think something like this could work: def rm1(prefix,txt): regular_expresion = re.compile(r''+prefix+'(.*)') return re.match(regular_expresion,txt).group(1) On Tue, Jul 13, 2010 at 8:49 PM, News123 wrote: > I wondered about a potentially nicer way of removing a prefix of a >

Re: guia de python 2.6.4 en castellano

2010-07-13 Thread Juan Andres Knebel
Hola, esto tal vez te pueda ayudar, no es para 2.6.4 pero sirve igual. http://www.espaciolinux.com/2009/01/tutorial-%E2%80%9Cpython-para-todos%E2%80%9D-en-espanol/ Igualmente esto es una lista en ingles, por lo que si necesitas ayuda en espanol te recomiendo la lista python en dicho idioma Saludos

nicer way to remove prefix of a string if it exists

2010-07-13 Thread News123
I wondered about a potentially nicer way of removing a prefix of a string if it exists. Here what I tried so far: def rm1(prefix,txt): if txt.startswith(prefix): return txt[len(prefix):] return txt for f in [ 'file:///home/me/data.txt' , '/home/me/data.txt' ]: # method 1 i

Re: floatref

2010-07-13 Thread Gary Herron
On 07/13/2010 03:02 PM, Roald de Vries wrote: Hi Gary, On Jul 13, 2010, at 8:54 PM, Gary Herron wrote: On 07/13/2010 10:26 AM, Roald de Vries wrote: Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mutable float object, or a float referen

Re: Errno 9] Bad file descriptor

2010-07-13 Thread joblack
All right I found the web link. It's an improvement to the pdf miner project (adds pdf dump methods). http://pastebin.com/P8SWj5YK -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross-platform module that creates directory object with all file attributes

2010-07-13 Thread python
Hi Tim, > Can't help you with x-platform; but for Windows I can offer my winsys package. > if f.readonly: >print f.created_at, f I like your logical model - that's exactly what I was looking for. Thank you for sharing your code. Cheers, Malcolm -- http://mail.python.org/mailman/listinfo/

Re: Check if a command is valid

2010-07-13 Thread Kenny Meyer
Chris Rebert (c...@rebertia.com) wrote: > On Mon, Jul 12, 2010 at 6:29 PM, Kenny Meyer wrote: > > Hello, > > > > I have to figure out if a string is callable on a Linux system. I'm > > "callable" seems vague. Is a command string with invalid arguments but > a valid executable "callable"? If no, t

Re: executing python scripts within wx frames

2010-07-13 Thread Philip Semanchuk
On Jul 13, 2010, at 11:15 AM, Astan Chee wrote: Hi, I'm trying to make one of those frames thats similar to the wx python demo where a folder is filled with demo wx python scripts and there is one main script that opens the other ones in as different items in a tree/notebook. I've gotten

Re: adodb.NewADOConnection('postgres') returns None

2010-07-13 Thread Thomas Jollans
On 07/13/2010 09:55 PM, micayael wrote: > Hi. > > I'm trying to use adodb for postgres. I had instaled in ubuntu 9.10 > the adodb and psycopg2 module (sudo apt-get install python-adodb > python-psycopg2) but when I put this > > import adodb > print adodb.NewADOConnection('postgres') --> None > >

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread sturlamolden
On 13 Jul, 22:35, "Alf P. Steinbach /Usenet" wrote: > Yes, I know Boost.Python in more detail and I've heard of all the rest except > SIP, In my opinion, SIP is the easiest way of integrating C++ and Python. Just ignore the PyQt stuff. http://www.riverbankcomputing.co.uk/static/Docs/sip4/using

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Alf P. Steinbach /Usenet
* sturlamolden, on 13.07.2010 22:06: On 13 Jul, 21:39, "Alf P. Steinbach /Usenet" wrote: Thanks! It seems that SCXX does those things that I've been planning to do but haven't got around to (wrapping standard Python types), while what it doesn't do (abstracting away all those tables etc. and m

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread sturlamolden
On 13 Jul, 22:35, "Alf P. Steinbach /Usenet" wrote: > In practice, 'extern "C"' matters for the jump tables because for those few > compilers if any where it really matters (not just the compiler emitting a > warning like reportedly Sun CC does), different linkage can imply different > machine co

M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-13 Thread Adam Mercer
Hi I'm trying to build M2Crypto on Mac OS X 10.6.4 against python2.5 (python2.6 fails in the same way), with SWIG 2.0.0 and OpenSSL 1.0.0a and it is failing with the following: 105 :info:build swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c 106 :info:build swig -python -I/opt/local/Lib

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Dilip
On Jul 13, 2:34 am, "Alf P. Steinbach /Usenet" wrote: > Well, we got no further, but I know of three solutions: > >    A) Punting: just say that the compiler has to support C++/C function type >       mingling. >       -> Perhaps the practical solution, but formally unsafe. > >    B) On the script

Re: Hello

2010-07-13 Thread Tim Johnson
On 2010-07-10, Andreas Waldenburger wrote: > On Fri, 9 Jul 2010 16:49:20 + (UTC) Grant Edwards > wrote: > >> On 2010-07-09, Dani Valverde wrote: >> >> > I am new to python and pretty new to programming (I have some >> > expertise wit R statistical programming language). I am just >> > starti

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Alf P. Steinbach /Usenet
* sturlamolden, on 13.07.2010 22:03: On 9 Jul, 17:52, "Alf P. Steinbach /Usenet" wrote: For an extension module it seems that Python requires each routine to be defined as 'extern "C"'. That is strange. PyMethodDef is just a jump table. So why should 'extern "C"' matter? Formally because t

Re: Check if a command is valid

2010-07-13 Thread Hans Mulder
Chris Rebert wrote: `where` seems to be a zsh built-in: $ # I'm in UR bash $ nonexistent -bash: nonexistent: command not found $ where bash -bash: where: command not found And not everyone has zsh installed, so... I don't see why one shouldn't use the standard `which` *nix command instead. Be

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread sturlamolden
On 13 Jul, 21:39, "Alf P. Steinbach /Usenet" wrote: > Thanks! It seems that SCXX does those things that I've been planning to do but > haven't got around to (wrapping standard Python types), while what it doesn't > do > (abstracting away all those tables etc. and mapping Python calls to C++ call

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread sturlamolden
On 9 Jul, 17:52, "Alf P. Steinbach /Usenet" wrote: > For an extension module it seems that Python requires each routine to be > defined > as 'extern "C"'. That is strange. PyMethodDef is just a jump table. So why should 'extern "C"' matter? Good luck on re-inventing the wheel (you've probably

adodb.NewADOConnection('postgres') returns None

2010-07-13 Thread micayael
Hi. I'm trying to use adodb for postgres. I had instaled in ubuntu 9.10 the adodb and psycopg2 module (sudo apt-get install python-adodb python-psycopg2) but when I put this import adodb print adodb.NewADOConnection('postgres') --> None but with print adodb.NewADOConnection('mysql') --> -- ht

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Alf P. Steinbach /Usenet
* Jonathan Lee, on 13.07.2010 16:41: Problem (C) is outside the realm of the C++ standard, since the C++ standard doesn't support shared libraries, and I've never actually used *nix shared libraries so I don't /know/... Is such dynamic initialization guaranteed? Not guaranteed, though I think

Re: write a .txt file

2010-07-13 Thread MRAB
Jia Hu wrote: On Tue, Jul 13, 2010 at 3:17 AM, Cameron Simpson > wrote: On 13Jul2010 02:46, Jia Hu mailto:huji...@gmail.com>> wrote: | Hi: | | Do you mean the following code? | | #!/usr/bin/python | # OS: Ubuntu | import subprocess |

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Alf P. Steinbach /Usenet
* Robert Kern, on 13.07.2010 17:16: On 7/13/10 2:34 AM, Alf P. Steinbach /Usenet wrote: PS: You (the reader) may be wondering, why why why Yet Another Python/C++ binding? Well, because I had this great name for it, "pyni", unfortunately already in use. But cppy is very different from Boost: Boo

Re: write a .txt file

2010-07-13 Thread Jia Hu
On Tue, Jul 13, 2010 at 3:17 AM, Cameron Simpson wrote: > On 13Jul2010 02:46, Jia Hu wrote: > | Hi: > | > | Do you mean the following code? > | > | #!/usr/bin/python > | # OS: Ubuntu > | import subprocess > | fileName = open ('final.txt', 'a') > | fileName.write ('%s %s %s \n' % (12,25,9)) > | >

Re: floatref

2010-07-13 Thread Gary Herron
On 07/13/2010 10:26 AM, Roald de Vries wrote: Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mutable float object, or a float reference object. Does anybody know if something like that exists? I know it's not hard to build, but I have a

death of newsgroups (Microsoft closing their newsgroups)

2010-07-13 Thread Xah Lee
• Death of Newsgroups http://xahlee.org/UnixResource_dir/writ2/death_of_newsgroups.html plain text version follows. -- Death of Newsgroups Xah Lee, 2010-07-13 Microsoft is closing down their newsgroups. See: microsoft.public.windows.powershell.

Re: integer >= 1 == True and integer.0 == False is bad, bad, bad!!!

2010-07-13 Thread Peter Pearson
On 13 Jul 2010 03:16:31 GMT, Steven D'Aprano wrote: [snip] > . . . and we rightly shake our heads at the sheer > n00b-ness of it. Writing the explicit tests: > > if bool(myInt): > > or even: > > if myInt <> 0: > > are firmly in the same category. The only difference is that it is more > familiar

Re: Python 3 grammar, function parameters

2010-07-13 Thread Junkman
A-ha! Thank you very much, Chris. Much appreciated. :-) Jay Chris Rebert wrote: > On Mon, Jul 12, 2010 at 3:32 PM, Junkman wrote: >> Greetings to Python users, >> >> I'm trying to parse Python code using the grammar supplied with the >> documentation set, and have a question on the grammar fo

guia de python 2.6.4 en castellano

2010-07-13 Thread Ruben ruben
buenos dias mi nombre es ruben queria ver si me podian mandar la guia de python 2.6.4 en castellano yo baje el programa python pero en ingles y mi ingles es muy regular desde ya muchas gracias muy bueno el programa python

floatref

2010-07-13 Thread Roald de Vries
Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mutable float object, or a float reference object. Does anybody know if something like that exists? I know it's not hard to build, but I have a feeling that there should be a standard s

Re: round issue

2010-07-13 Thread Emile van Sebille
On 7/13/2010 9:06 AM Robin Becker said... Anyhow does anyone have a good algorithm for ensuring rounded percentages do add up to 100%? :) How about grouped percentages ie ensure the group sums and the groups display correctly in rounded form. I generally do the calculations in memory then set

Re: Cross-platform module that creates directory object with all file attributes

2010-07-13 Thread Tim Chase
On 07/13/2010 10:56 AM, pyt...@bdurham.com wrote: Any recommendations for a cross-platform module that creates a directory object with not only file names, but file attributes as well? Use cases: - Sort files by file size or date last modified - Filter files by read-only status I know I can use

Re: Plot problem.. ?? No sign at all

2010-07-13 Thread Ritchy lelis
On 11 Jul, 13:28, Johan Grönqvist wrote: > 2010-07-11 02:12, Ritchy lelis skrev: > > > On 7 jul, 08:38, Johan Grönqvist  wrote: > > > About the plot draw it's a curve that it's a set of points wich it's > > the result of the comput of the Vref and Vi together. I don't know if > > i had to make a b

Re: Plot problem.. ?? No sign at all

2010-07-13 Thread Ritchy lelis
On 11 Jul, 17:39, Ritchy lelis wrote: > On 11 jul, 13:28, Johan Grönqvist wrote: > > > > > > > 2010-07-11 02:12, Ritchy lelis skrev: > > > > On 7 jul, 08:38, Johan Grönqvist  wrote: > > > > About the plot draw it's a curve that it's a set of points wich it's > > > the result of the comput of the

Re: Plot problem.. ?? No sign at all

2010-07-13 Thread Ritchy lelis
On 11 Jul, 17:39, Ritchy lelis wrote: > On 11 jul, 13:28, Johan Grönqvist wrote: > > > > > > > 2010-07-11 02:12, Ritchy lelis skrev: > > > > On 7 jul, 08:38, Johan Grönqvist  wrote: > > > > About the plot draw it's a curve that it's a set of points wich it's > > > the result of the comput of the

Re: round issue

2010-07-13 Thread Robin Becker
On 12/07/2010 19:59, Mark Dickinson wrote: It does look inconsistent however, and it seems to me rounding and interpolation should behave similarly. Agreed. In this case it's a minor bug that round(-9.85, 1) produces -9.9 instead of -9.8; both string formatting and round should g

Cross-platform module that creates directory object with all file attributes

2010-07-13 Thread python
Any recommendations for a cross-platform module that creates a directory object with not only file names, but file attributes as well? Use cases: - Sort files by file size or date last modified - Filter files by read-only status I know I can use various standard library functions [1] to construct

Re: Lua is faster than Fortran???

2010-07-13 Thread Luis M . González
On Jul 4, 6:09 pm, Stephen Hansen wrote: > On 7/4/10 9:21 AM, sturlamolden wrote: > > > On 4 Jul, 14:29, David Cournapeau wrote: > > >> Actually, I think the main reason why Lua is much faster than other > >> dynamic languages is its size. The language is small. You don't list, > >> dict, tuples,

executing python scripts within wx frames

2010-07-13 Thread Astan Chee
Hi, I'm trying to make one of those frames thats similar to the wx python demo where a folder is filled with demo wx python scripts and there is one main script that opens the other ones in as different items in a tree/notebook. I've gotten most of it figured out except the part where the scrip

Re: Naming Conventions, Where's the Convention Waldo?

2010-07-13 Thread Neil Cerutti
On 2010-07-12, Steven D'Aprano wrote: > On Sun, 11 Jul 2010 01:30:36 -0700, rantingrick wrote: > >> On Jul 11, 3:03??am, "G??nther Dietrich" wrote: >> >>> So, it is not a disadvantage that the functions you listed above are >>> named in this way. In the contrary, it is an advantage, as it keeps

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Robert Kern
On 7/13/10 2:34 AM, Alf P. Steinbach /Usenet wrote: PS: You (the reader) may be wondering, why why why Yet Another Python/C++ binding? Well, because I had this great name for it, "pyni", unfortunately already in use. But cppy is very different from Boost: Boost is large, cppy is tiny; Boost has

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Jonathan Lee
> Problem (C) is outside the realm of the C++ standard, since the C++ standard > doesn't support shared libraries, and I've never actually used *nix shared > libraries so I don't /know/... > > Is such dynamic initialization guaranteed? > Not guaranteed, though I think there's a combination of dlop

Re: Check if a command is valid

2010-07-13 Thread Chris Rebert
On Tue, Jul 13, 2010 at 4:33 AM, Jean-Michel Pichavant wrote: > Kenny Meyer wrote: >> I have to figure out if a string is callable on a Linux system. I'm >> actually doing this: >> >>    def is_valid_command(command): >>        retcode = 100 # initialize >>        if command: >>            retcode

Re: Errno 9] Bad file descriptor

2010-07-13 Thread joblack
Thanks for the answers so far. It's not my code I'm just curious how that could happen: Starting point: ... self.status['text'] = 'Processing ...' try: cli_main(argv) except Exception, e: self.status['text'] = 'Error: ' + str(e) return ..

Re: Help choosing license for new projects

2010-07-13 Thread Ed Keith
--- On Mon, 7/12/10, Jake b wrote: > I'm starting a new python code > project. What license do you suggest? I > am searching, but I'm not finding a simple comparison of > licenses. So > I don't know which to use. Maybe MIT or Apache or LGPL or > BSD? > > Are there certain licenses to avoid using

Re: Issue with logging.config

2010-07-13 Thread Peter Otten
Joe Hughes wrote: > I'm doing some work with logging.config and I'm running into an > interesting situation. I've run this by python-help, but that didn't help > so I thought I would send to the list. Here is the config file > > [loggers] > keys=root,log,syslog > > [handlers] > keys=console,lo

Re: multitask http server (single-process multi-connection HTTP server)

2010-07-13 Thread Luke Kenneth Casson Leighton
On Tue, Jul 13, 2010 at 1:30 AM, Tim Wintle wrote: > On Mon, 2010-07-12 at 23:28 +, Luke Kenneth Casson Leighton wrote: >> On Mon, Jul 12, 2010 at 10:13 PM, geremy condra wrote: >> > On Mon, Jul 12, 2010 at 4:59 PM, lkcl wrote: >> >> there probably exist perfectly good web frameworks that ar

Re: Check if a command is valid

2010-07-13 Thread Jean-Michel Pichavant
Kenny Meyer wrote: Hello, I have to figure out if a string is callable on a Linux system. I'm actually doing this: def is_valid_command(command): retcode = 100 # initialize if command: retcode = subprocess.call(command, shell=True) if retcode is 0:

Calling LabVIEW VI from Python

2010-07-13 Thread Sathish S
Hi ppl, I'm trying to call the LabVIEW VI's from python. I'm trying to use the Call method exposed in the LabVIEW activex. this method expects the input values to be passed as an array of reference. I'm passing a list to it, and I find that the list is unchanged. Here is my code: import win32com.

Re: integer >= 1 == True and integer.0 == False is bad, bad, bad!!!

2010-07-13 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Mon, 12 Jul 2010 19:28:28 -0600, Ian Kelly wrote: On Mon, Jul 12, 2010 at 6:18 PM, Steven D'Aprano wrote: I prefere to explicitly write what I want to test: if myInt <> 0: I would argue against that. Why do you, the coder, care about the specific d

Re: Why doesn't python's list append() method return the list itself?

2010-07-13 Thread Gregory Ewing
John Nagle wrote: Arguably, if a function just does a "return", it should be an error to try to use its return value. It's been suggested at least once before that the default return value for a function should be some special value that raises an exception if you try to do anything with it exc

Re: simples setup for an wsgi https server in python

2010-07-13 Thread Дамјан Георгиевски
> It seems, that wsgiref.simple_server.make_server can only create an > http server. > > What I wondered would be how to easiest create an https server, that > supports wsgi modules PythonPaste has a WSGI server that supports https http://pythonpaste.org/modules/httpserver.html#module-paste.https

Re: multitask http server (single-process multi-connection HTTP server)

2010-07-13 Thread Tim Wintle
On Mon, 2010-07-12 at 23:28 +, Luke Kenneth Casson Leighton wrote: > On Mon, Jul 12, 2010 at 10:13 PM, geremy condra wrote: > > On Mon, Jul 12, 2010 at 4:59 PM, lkcl wrote: > >> there probably exist perfectly good web frameworks that are capable of > >> doing this sort of thing: i feel certai

Re: Worship We Must

2010-07-13 Thread geremy condra
On Tue, Jul 13, 2010 at 1:17 AM, Johannes Kleese wrote: > On 13.07.2010 10:00, geremy condra wrote: >> On Tue, Jul 13, 2010 at 12:28 AM, Johannes Kleese wrote: >>> On 13.07.2010 05:16, nais-saudi wrote: The submission of man to His Creator is the essence of Islam. >>> >>> The submission of t

Re: Worship We Must

2010-07-13 Thread Johannes Kleese
On 13.07.2010 10:00, geremy condra wrote: > On Tue, Jul 13, 2010 at 12:28 AM, Johannes Kleese wrote: >> On 13.07.2010 05:16, nais-saudi wrote: >>> The submission of man to His Creator is the essence of Islam. >> >> The submission of topic-related Bla to His Newsgroup is the essence of >> Posting.

Re: Worship We Must

2010-07-13 Thread geremy condra
On Tue, Jul 13, 2010 at 12:28 AM, Johannes Kleese wrote: > On 13.07.2010 05:16, nais-saudi wrote: >> The submission of man to His Creator is the essence of Islam. > > The submission of topic-related Bla to His Newsgroup is the essence of > Posting. > > Learn it. Know it. Live it. The submission o

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-13 Thread Alf P. Steinbach /Usenet
* geremy condra, on 09.07.2010 23:43: On Fri, Jul 9, 2010 at 5:22 PM, Ian Collins wrote: On 07/10/10 03:52 AM, Alf P. Steinbach /Usenet wrote: [Cross-posted comp.lang.python and comp.lang.c++] I lack experience with shared libraries in *nix and so I need to ask... This is about "cppy", some

Re: Worship We Must

2010-07-13 Thread Johannes Kleese
On 13.07.2010 05:16, nais-saudi wrote: > The submission of man to His Creator is the essence of Islam. The submission of topic-related Bla to His Newsgroup is the essence of Posting. Learn it. Know it. Live it. -- http://mail.python.org/mailman/listinfo/python-list

Re: write a .txt file

2010-07-13 Thread Cameron Simpson
On 13Jul2010 02:46, Jia Hu wrote: | Hi: | | Do you mean the following code? | | #!/usr/bin/python | # OS: Ubuntu | import subprocess | fileName = open ('final.txt', 'a') | fileName.write ('%s %s %s \n' % (12,25,9)) | | fileName.flush() # add | fileName.close() # add You should not need the

Re: Errno 9] Bad file descriptor

2010-07-13 Thread Cameron Simpson
On 11Jul2010 17:48, joblack wrote: | I get sometimes a | | Errno 9 Bad file descriptor | | the code is too long to show it here but what are the circumstances | this could happen? A web search showed nothing. | | I have especially the feeling Python 2.6 has some problems with | Unicode ... and