ANN: Python FTP Server library (pyftpdlib) 0.5.1 released

2009-01-22 Thread Giampaolo Rodola'
Hi, I'm pleased to announce release 0.5.1 of Python FTP Server library (pyftpdlib). http://code.google.com/p/pyftpdlib === About === Python FTP server library provides an high-level portable interface to easily write asynchronous FTP servers with Python. Based on asyncore framework pyftpdlib is

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Steven D'Aprano
On Wed, 21 Jan 2009 01:02:37 -0800, Aaron Brady wrote: class Parrot: ...     _private = 'spam' ... p = Parrot() p._private = 'ham'  # allowed by default from protection import lock lock(p)._private p._private = 'spam' Traceback (most recent call last):   File stdin, line 1, in

Re: malloc (error code=12)

2009-01-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arash Arfaee wrote: Very BIG Jesse It works on a huge Boolean function. And thanks Roger. Do you think it will be solved if I run it over another OS like windows? By far the simplest solution is to use a 64 bit process on a 64 bit operating

Re: English-like Python

2009-01-22 Thread Steven D'Aprano
On Wed, 21 Jan 2009 08:17:34 -0700, Joe Strout wrote: Steven D'Aprano wrote: ... But even if RB doesn't have these things, I question that the syntax is beautiful. Consider some arbitrary method Foo. If you see this: Foo Is that legal RB syntax? You betcha! How do you know? I

Re: English-like Python

2009-01-22 Thread Aaron Brady
On Jan 22, 1:46 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Wed, 21 Jan 2009 00:57:49 -0800, Aaron Brady wrote: Natural language doesn't have the equivalent of parentheses, I take it you mean natural language doesn't have the equivalent of parentheses for *calling*,

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Steven D'Aprano
On Wed, 21 Jan 2009 12:55:42 -0500, Luis Zarrabeitia wrote: Btw, the correctness of a program (on a turing-complete language) cannot be statically proven. Ask Turing about it. The correctness of *all* *arbitrary* programs cannot be proven. That doesn't mean that no programs can be proven.

Re: English-like Python

2009-01-22 Thread Aaron Brady
On Jan 22, 2:17 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Wed, 21 Jan 2009 08:17:34 -0700, Joe Strout wrote: But of course.  Any method call is legal only if the form of the call matches the method prototype -- if you try to call a function that requires 4

Re: Dictionary : items()

2009-01-22 Thread Steven D'Aprano
On Wed, 21 Jan 2009 23:02:11 -0800, koranthala wrote: Hi, Dictionary has the items method which returns the value as a list of tuples. I was wondering whether it would be a good idea to have an extra parameter - sort - to allow the tuples to be sorted as the desire of users.

Re: Dictionary : items()

2009-01-22 Thread Paul Rubin
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: That is better written as: l = sorted(abcd.items(), key=lambda x:(x[1].lower(), x[0])) In Python 2.x, I prefer the style l = sorted(abcd.iteritems(), key=lambda (k,v): (v.lower(), k)) but Python 3.0 breaks the tuple unpacking per

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Paul Rubin
Tim Rowe digi...@gmail.com writes: Programs done in Ada are, by objective measures, more reliable than those done in C and C++ (the very best released C++ programs are about as good as the worst released Ada programs), although I've always wondered how much of that is because of language

A different kind of interface

2009-01-22 Thread bearophileHUGS
I use the Python shell daily, plus of course normal editors to edit python scripts. They both are very useful for different purposes. But the default interactive shell isn't much handy if you want to modify the past code to run it again, or you want to embed a bit of text in the code, or if you

Re: Logging help

2009-01-22 Thread Vinay Sajip
On Jan 22, 6:49 am, koranthala koranth...@gmail.com wrote: I understand Vinay. But my point is that I wanted a mechanism to rotate the log files based on data - i.e. today one log, tomorrow Did you mean based on date? another. This is easier because when trouble tickets are raised, users

Seeking pure Python AES/RSA library compatible with OpenSSL

2009-01-22 Thread novosibirsk
Hello, I am faced with the following problem: 0. In pure Python, encrypt some data using AES. 1. In pure Python, encrypt the key used in 0 with RSA, given a private key in PEM format. 2. In C, using OpenSSL, decrypt the AES key from 0 using the public key that corresponds to private key in 1.

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Wed, 21 Jan 2009 12:54:31 +0100, Bruno Desthuilliers wrote: Russ P. a écrit : (snip) In any case, I have suggested that Python should perhaps get a new keyword, private or priv. And quite a few people - most of them using Python daily - answered they didn't wan't

Re: is this pythonic?

2009-01-22 Thread Peter Otten
TP wrote: Hi, Is the following code pythonic: l=[{title:to, value:2},{title:ti,value:coucou}] dict = [ dict for dict in l if dict['title']=='ti'] l.remove(*dict) l [{'title': 'to', 'value': 2}] Precision: I have stored data in the list of dictionaries l, because in my application I

Formal specification and proof (was : Does Python really follow its philosophy of Readability counts?)

2009-01-22 Thread Ricardo Aráoz
Mark Wooding wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: No it's not. It's *practical*. There are domains where *by law* code needs to meet all sorts of strict standards to prove safety and security, and Python *simply cannot meet those standards*.

Re: Seeking pure Python AES/RSA library compatible with OpenSSL

2009-01-22 Thread Paul Rubin
novosibi...@gmail.com writes: 0. In pure Python, encrypt some data using AES. 1. In pure Python, encrypt the key used in 0 with RSA, given a private key in PEM format. Question --- is there a library I can use for steps 0 and 1? I know there are some AES libs around, try google. The libs

Re: A different kind of interface

2009-01-22 Thread Ben Finney
bearophileh...@lycos.com writes: I use the Python shell daily, plus of course normal editors to edit python scripts. They both are very useful for different purposes. But the default interactive shell isn't much handy if you want to modify the past code to run it again, or you want to embed a

Re: A different kind of interface

2009-01-22 Thread Ben Finney
bearophileh...@lycos.com writes: I use the Python shell daily, plus of course normal editors to edit python scripts. They both are very useful for different purposes. But the default interactive shell isn't much handy if you want to modify the past code to run it again, or you want to embed a

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Bruno Desthuilliers
Paul Rubin a écrit : Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid writes: In my limited experience with Haskell (statically typed but very high level), dynamic and static were not meant to concern typing here (or at least not only typing). I'm not sure what you mean by

Re: A different kind of interface

2009-01-22 Thread Bruno Desthuilliers
bearophileh...@lycos.com a écrit : I use the Python shell daily, plus of course normal editors to edit python scripts. They both are very useful for different purposes. But the default interactive shell isn't much handy if you want to modify the past code to run it again, or you want to embed a

Re: Seeking pure Python AES/RSA library compatible with OpenSSL

2009-01-22 Thread novosibirsk
On Jan 22, 1:42 am, Paul Rubin http://phr...@nospam.invalid wrote: novosibi...@gmail.com writes: 0. In pure Python, encrypt some data using AES. 1. In pure Python, encrypt the key used in 0 with RSA, given a private key in PEM format. Question --- is there a library I can use for steps 0

Re: USB in python

2009-01-22 Thread Diez B. Roggisch
Astan Chee wrote: Hi, Im trying to write a program for my USB device and I'm thinking of using python to do this. The USB device is of my own making and it is activated when one of the two data pins of the USB is given about 5V (or similar to whatever the power pin is getting). Now I'm

Re: USB in python

2009-01-22 Thread Tino Wildenhain
Astan Chee wrote: Hi, Im trying to write a program for my USB device and I'm thinking of using python to do this. The USB device is of my own making and it is activated when one of the two data pins of the USB is given about 5V (or similar to whatever the power pin is getting). Now I'm

Re: List comprehension - NameError: name '_[1]' is not defined ?

2009-01-22 Thread mario ruggier
On Jan 16, 7:17 pm, Paul Rubin http://phr...@nospam.invalid wrote: mario ruggier mario.rugg...@gmail.com writes: All the above attempts will be blocked this way. Any other disallow- sub-strings to add to the list above? I think what you are trying to do is fundamentally hopeless.  You

Re: Ideas to optimize this getitem/eval call?

2009-01-22 Thread mario g
On Sun, Jan 4, 2009 at 6:46 PM, Tino Wildenhain t...@wildenhain.de wrote: mario wrote: On Jan 3, 7:16 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: I was about to make a comment about this being a security hole, Strange that you say this, as you are also implying that

Re: Start Python at client side from web app

2009-01-22 Thread Thomas Guettler
Bryan Olson schrieb: Thomas Guettler wrote: Sorry, I described my problem not well. Here is more information: Actually you did pretty well. [...] The main application is the intranet web application used with IE (ms windows client). Your idea of a custom mime-type, with a browser

Re: Start Python at client side from web app

2009-01-22 Thread Thomas Guettler
Diez B. Roggisch schrieb: 2) create a localhost web server, for the client side manipulation. Then have your remote webserver render a form that posts via javavscript to the localhost webserver. The localhost server would post back in the same way. AFAIK the JS security model prevents

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Tim Rowe
Btw, the correctness of a program (on a turing-complete language) cannot be statically proven. Ask Turing about it. For the most safety critical of programmes, for which static proof is required, restrictions are placed on the use of the language that effectively mean that it is not

Re: file write collision consideration

2009-01-22 Thread Gary
It would help to know which version of Python when giving examples... I recollect that so-called mutex operation wasn't actually thread safe when using Python 2.5, but perhaps that was wrong, or subsequent versions have fixed that? -- http://mail.python.org/mailman/listinfo/python-list

Tutorial on working with Excel files in Python (without COM and cross platform!) at PyConUS 2009

2009-01-22 Thread Chris Withers
Hi All, Too many people in the Python community think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's PyCon in Chicago on Wednesday, 25th March that will cover working with Excel files in Python using the

Re: Start Python at client side from web app

2009-01-22 Thread Thomas Guettler
Paul Rubin schrieb: Thomas Guettler h...@tbz-pariv.de writes: 1. The user pushes a button in the web app. 2. Webserver sends signed python code to the client with own mime type 3. IE sends code to the python application. 4. Signature gets checked, Python code on the client gets executed. 5.

Re: A different kind of interface

2009-01-22 Thread bearophileHUGS
Ben Finney: Adding an editor to Python solves this problem only for Python. I'm sure that once such editor (I use the word editor for lack of a better term) is created, it can also be quickly adapted with other dynamic languages, like Ruby, TCL, Lua, Io, Perl, Awk, ecc. Probably it can't be

Recommended SOAP library?

2009-01-22 Thread morphex
Hi, I have to implement a service which involves some SOAP/WSDL. So far I've found http://pywebsvcs.sourceforge.net/ Is that the recommended library to build some logic which sets/ retrieves some information from a web service? Thanks, Morten --

Re: Recommended SOAP library?

2009-01-22 Thread GHZ
if you require a SOAP client, then I would recommend SUDS https://fedorahosted.org/suds/ Other options are not in active development, so is difficult to get support. -- http://mail.python.org/mailman/listinfo/python-list

Re: A different kind of interface

2009-01-22 Thread Stef Mientki
Several guys are working on a MatLab like editor / IDE, based on wxPython, including myself ;-) see http://mientki.ruhosting.nl/data_www/pylab_works/pw_debug.html e.g. with F9 it runs either the selected code or if nothing selected the whole code or even more powerfull (depending on your

Re: Python 3: exec arg 1

2009-01-22 Thread Alan G Isaac
On 1/20/2009 3:53 PM Rob Williscroft apparently wrote: http://bugs.python.org/issue1762972 (*) Useful. Thanks. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Steven D'Aprano
On Thu, 22 Jan 2009 10:33:26 +0100, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : On Wed, 21 Jan 2009 12:54:31 +0100, Bruno Desthuilliers wrote: Russ P. a écrit : (snip) In any case, I have suggested that Python should perhaps get a new keyword, private or priv. And quite a few

Re: is this pythonic?

2009-01-22 Thread TP
Peter Otten wrote: If you can change the rest of your program to work smoothly with a dictionary I would suggest the following: [snip] from collections import defaultdict [snip] Thanks a lot. I didn't know defaultdict. It is powerful. I begin to understand that people prefer using

subclass PyDictObject -- any gotchas?

2009-01-22 Thread Aaron Brady
Hello all, I am trying to create a mapping class similar to the base dictionary, but with some added behaviors that affect pointers on a low level. I have a bare-bones version I compiled with MinGW, and it is working! I want to know if there is anything that is going to bite me later, when I

Re: pep 8 constants

2009-01-22 Thread Benjamin Kaplan
On Thu, Jan 22, 2009 at 1:16 AM, Aahz a...@pythoncraft.com wrote: In article mailman.7174.1231915778.3487.python-l...@python.org, Brendan Miller catph...@catphive.net wrote: PEP 8 doesn't mention anything about using all caps to indicate a constant. Now it does! See

Why GIL? (was Re: what's the point of rpython?)

2009-01-22 Thread Aahz
In article 7xd4ele060@ruckus.brouhaha.com, Paul Rubin http://phr...@nospam.invalid wrote: alex23 wuwe...@gmail.com writes: Here's an article by Guido talking about the last attempt to remove the GIL and the performance issues that arose: I'd welcome a set of patches into Py3k *only if*

Re: what's the point of rpython?

2009-01-22 Thread Aahz
In article gl84uf$ju...@rumours.uwaterloo.ca, Ross Ridge rri...@csclub.uwaterloo.ca wrote: Scott David Daniels scott.dani...@acm.org wrote: The opcode cannot simply talk to its cache, it must either go directly to off-chip memory or communicate to other processors that it (and it alone) owns

Re: Recommended SOAP library?

2009-01-22 Thread morphex
On 22 Jan, 13:38, GHZ geraint.willi...@gmail.com wrote: if you require a SOAP client, then I would recommend SUDShttps://fedorahosted.org/suds/ Other options are not in active development, so is difficult to get support. SUDS looks great, thanks for the tip! :) -Morten --

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Thu, 22 Jan 2009 10:33:26 +0100, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : On Wed, 21 Jan 2009 12:54:31 +0100, Bruno Desthuilliers wrote: Russ P. a écrit : (snip) In any case, I have suggested that Python should perhaps get a new keyword, private or

Jabber xml-rpc

2009-01-22 Thread makkalot
Hi all i have a program which does some xml-rpc work over SSL, i want now to add some NAT capibilites to my program. The way i thought is to use jabber and send my calls over jabber xml-rpc and ssl it. - Is it the best way to make sth 'natted'? - If yes which library do u reccommend ? twisted

Executing previous stack frame

2009-01-22 Thread sturlamolden
frame = sys._getframe().f_back is the previous stack frame. Is there any way to execute (with exec or eval) frame.f_code beginning from frame.f_lasti or frame.f_lineno? I am trying to spawn a thread that is initialized with the code and state of the previous stack frame. S.M. --

About SCons Re: [Python-Dev] progress: compiling python2.5 under msys (specifically but not exclusively under wine) with msvcr80

2009-01-22 Thread anatoly techtonik
On Thu, Jan 22, 2009 at 12:51 AM, Roumen Petrov bugtr...@roumenpetrov.info wrote: Against 2.3, rejected due to dependence on SCons. Also appears to have been incomplete, needing more work. No it was complete but use SCons. Most of changes changes in code you will see again in 3871. I would

Re: is this pythonic?

2009-01-22 Thread pruebauno
On Jan 21, 4:23 pm, Scott David Daniels scott.dani...@acm.org wrote: prueba...@latinmail.com wrote: ... If you have duplicates this will not work. You will have to do something like this instead: o=[] i=0 ln=len(l) while iln:    if l[i]['title']=='ti':            

Re: is this pythonic?

2009-01-22 Thread pruebauno
On Jan 21, 4:23 pm, Scott David Daniels scott.dani...@acm.org wrote: prueba...@latinmail.com wrote: ... If you have duplicates this will not work. You will have to do something like this instead: o=[] i=0 ln=len(l) while iln:    if l[i]['title']=='ti':            

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Mark Wooding
Paul Rubin http://phr...@nospam.invalid writes: Also, the application area matters. There is a difference between programming for one's own enjoyment or to do a personal task, and writing programs whose reliability or lack of it can affect other people's lives. I've never done any

Re: what's the point of rpython?

2009-01-22 Thread MRAB
Paul Rubin wrote: Ross Ridge rri...@csclub.uwaterloo.ca writes: Scott David Daniels scott.dani...@acm.org wrote: The opcode cannot simply talk to its cache, it must either go directly to off-chip memory or communicate to other processors that it (and it alone) owns the increment target.

Re: Logging help

2009-01-22 Thread koranthala
On Jan 22, 2:14 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Jan 22, 6:49 am,koranthalakoranth...@gmail.com wrote: I understand Vinay. But my point is that I wanted a mechanism to rotate the log files based on data - i.e. today one log, tomorrow Did you mean based on date? another.

Python Style Question

2009-01-22 Thread K-Dawg
I am trying to become more pythonic as I learn python and get my mind around it instead of other languages I have used. I have an app that has a series of classes for objects it uses. From a style perspective, which should be done: Different py file for each class or One py file with all the

Re: English-like Python

2009-01-22 Thread Joe Strout
Steven D'Aprano wrote: Foo Is that legal RB syntax? You betcha! How do you know? I haven't specified what Foo does. You haven't specified whether Foo is a valid identifier at all, so I'm assuming that it is both valid and used correctly here. The syntax is certainly valid -- it

Re: Python Style Question

2009-01-22 Thread Steve Holden
K-Dawg wrote: I am trying to become more pythonic as I learn python and get my mind around it instead of other languages I have used. I have an app that has a series of classes for objects it uses. From a style perspective, which should be done: Different py file for each class or

Re: A different kind of interface

2009-01-22 Thread Vic Kelson
How about IDLE? It's a nice tool for the Python programmer. I've tried lots of IDEs, but when it comes down to it, on small-to-medium jobs I am be very productive indeed using IDLE... --v -- http://mail.python.org/mailman/listinfo/python-list

Re: subclass PyDictObject -- any gotchas?

2009-01-22 Thread Aaron Brady
On Jan 22, 7:49 am, Aaron Brady castiro...@gmail.com wrote: Hello all, I am trying to create a mapping class similar to the base dictionary, but with some added behaviors that affect pointers on a low level.  I have a bare-bones version I compiled with MinGW, and it is working!  I want to

Re: A different kind of interface

2009-01-22 Thread Doug Morse
On Thu, 22 Jan 2009 08:13:49 -0800 (PST), Vic Kelson vic.kel...@gmail.com wrote: How about IDLE? It's a nice tool for the Python programmer. I've tried lots of IDEs, but when it comes down to it, on small-to-medium jobs I am be very productive indeed using IDLE... --v I find

Re: A different kind of interface

2009-01-22 Thread Steve Holden
Doug Morse wrote: On Thu, 22 Jan 2009 08:13:49 -0800 (PST), Vic Kelson vic.kel...@gmail.com wrote: How about IDLE? It's a nice tool for the Python programmer. I've tried lots of IDEs, but when it comes down to it, on small-to-medium jobs I am be very productive indeed using IDLE...

Re: A different kind of interface

2009-01-22 Thread Eduardo O. Padoan
On Thu, Jan 22, 2009 at 7:10 AM, bearophileh...@lycos.com wrote: I use the Python shell daily, plus of course normal editors to edit python scripts. They both are very useful for different purposes. But the default interactive shell isn't much handy if you want to modify the past code to run

Re: Python Style Question

2009-01-22 Thread Terry Reedy
Steve Holden wrote: K-Dawg wrote: I am trying to become more pythonic as I learn python and get my mind around it instead of other languages I have used. I have an app that has a series of classes for objects it uses. From a style perspective, which should be done: Different py file for each

Re: pep 8 constants

2009-01-22 Thread Terry Reedy
Benjamin Kaplan wrote: On Thu, Jan 22, 2009 at 1:16 AM, Aahz a...@pythoncraft.com mailto:a...@pythoncraft.com wrote: In article mailman.7174.1231915778.3487.python-l...@python.org mailto:mailman.7174.1231915778.3487.python-l...@python.org, Brendan Miller catph...@catphive.net

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Steven D'Aprano
On Thu, 22 Jan 2009 15:12:31 +0100, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : On Thu, 22 Jan 2009 10:33:26 +0100, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : On Wed, 21 Jan 2009 12:54:31 +0100, Bruno Desthuilliers wrote: Russ P. a écrit : (snip) In any case, I have

Re: A different kind of interface

2009-01-22 Thread Terry Reedy
Steve Holden wrote: Doug Morse wrote: On Thu, 22 Jan 2009 08:13:49 -0800 (PST), Vic Kelson vic.kel...@gmail.com wrote: How about IDLE? It's a nice tool for the Python programmer. I've tried lots of IDEs, but when it comes down to it, on small-to-medium jobs I am be very productive indeed

Re: what's the point of rpython?

2009-01-22 Thread Ross Ridge
Ross Ridge rri...@csclub.uwaterloo.ca writes: The same cache coherency mechanism that prevents ordinary unlocked instructions from simulanteously modifying the same cache line on two different processors also provides the guarantee with locked instructions. There's no additional hardware

Re: Logging help

2009-01-22 Thread Vinay Sajip
On Jan 22, 3:40 pm, koranthala koranth...@gmail.com wrote: Thank you very much Vinay. You have been extremely helpful. This was my first design - but then I found that log system was taking up quite a huge chunk of the memory. That is why I went to rotating file handler. Using just plain

Counter Class -- Bag/Multiset

2009-01-22 Thread Raymond Hettinger
The collections module in Python 2.7 and Python 3.1 has gotten a new Counter class that works like bags and multisets in other languages. I've adapted it for Python2.5/2.6 so people can start using it right away: http://docs.python.org/dev/library/collections.html#counter-objects Here's a link

Re: Counter Class -- Bag/Multiset

2009-01-22 Thread Raymond Hettinger
I've adapted it for Python2.5/2.6 so people can start using it right away: That should just be Python2.6. -- http://mail.python.org/mailman/listinfo/python-list

Re: A different kind of interface

2009-01-22 Thread bearophileHUGS
Eduardo O. Padoan: You are almost *describing* reinteract: - Thank you for the link and the software, I have not tried it yet, but from the screencast it looks quite nice. - I am glad that there are people that don't think that Emacs is (despite being good) the alpha and omega of editing.

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Mark Wooding
Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Thu, 22 Jan 2009 15:12:31 +0100, Bruno Desthuilliers wrote: Steven D'Aprano a écrit : But if you have free access to attributes, then *everything* is interface. Nope. How could anyone fail to be convinced by an argument that

Re: Start Python at client side from web app

2009-01-22 Thread Diez B. Roggisch
Rob Williscroft schrieb: Diez B. Roggisch wrote in news:6tpo16fbacf...@mid.uni-berlin.de in comp.lang.python: 2) create a localhost web server, for the client side manipulation. Then have your remote webserver render a form that posts via javavscript to the localhost webserver. The localhost

Re: Executing previous stack frame

2009-01-22 Thread Jeff McNeil
On Jan 22, 9:49 am, sturlamolden sturlamol...@yahoo.no wrote: frame = sys._getframe().f_back is the previous stack frame. Is there any way to execute (with exec or eval) frame.f_code beginning from frame.f_lasti or frame.f_lineno? I am trying to spawn a thread that is initialized with the

Dealing with large memory under linux or How to Build 64bit Python

2009-01-22 Thread proteus...@gmail.com
I've got an Ubuntu (2.6.27-9-server SMP i686 GNU/Linux) setup with 6GB RAM running python 2.5. I'm running a simulation program that is breaking as soon as it hits ~3GB RAM even though I have plenty of RAM free. I'm guessing that it's because my python is only 32-bit? Appreciate any pointers on

Re: Dealing with large memory under linux or How to Build 64bit Python

2009-01-22 Thread Martin v. Löwis
I've got an Ubuntu (2.6.27-9-server SMP i686 GNU/Linux) setup with 6GB RAM running python 2.5. I'm running a simulation program that is breaking as soon as it hits ~3GB RAM even though I have plenty of RAM free. I'm guessing that it's because my python is only 32-bit? If you do use a 32-bit

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Scott David Daniels
Tim Rowe wrote: Btw, the correctness of a program (on a turing-complete language) cannot be statically proven. Ask Turing about it. For the most safety critical of programmes, for which static proof is required, restrictions are placed on the use of the language that effectively mean that it

Re: Counter Class -- Bag/Multiset

2009-01-22 Thread Raymond Hettinger
That should just be Python2.6. Fixed. Now runs of Python 2.5 as well. -- http://mail.python.org/mailman/listinfo/python-list

Re: USB in python

2009-01-22 Thread Brian Allen Vanderburg II
astan.c...@al.com.au wrote: Hi, Im trying to write a program for my USB device and I'm thinking of using python to do this. The USB device is of my own making and it is activated when one of the two data pins of the USB is given about 5V (or similar to whatever the power pin is getting). Now

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Mark Wooding
Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid writes: Paul Rubin a écrit : I'd say that Python's FP characteristics are an important part of its expressiveness. Indeed - but they do not make Python a functional language[1]. Python is based on objects, not on functions,

Re: pep 8 constants

2009-01-22 Thread Brian Allen Vanderburg II
bock...@virgilio.it wrote: Constants would be a nice addition in python, sure enough. But I'm not sure that this can be done without a run-time check every time the constant is used, and python is already slow enough. Maybe a check that is disabled when running with optimizing flags ? But I'm

Re: Executing previous stack frame

2009-01-22 Thread sturlamolden
On Jan 22, 8:47 pm, Jeff McNeil j...@jmcneil.net wrote: What are you trying to accomplish? On Jan 22, 8:47 pm, Jeff McNeil j...@jmcneil.net wrote: What are you trying to accomplish? While it's possible to do, I can't believe it's going to be very safe. I am trying to implement a

Re: Start Python at client side from web app

2009-01-22 Thread Rob Williscroft
Thomas Guettler wrote in news:6tr453fca5h...@mid.individual.net in comp.lang.python: Diez B. Roggisch schrieb: 2) create a localhost web server, for the client side manipulation. Then have your remote webserver render a form that posts via javavscript to the localhost webserver. The

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Luis Zarrabeitia
On Thursday 22 January 2009 08:32:51 am Steven D'Aprano wrote: And now I have accidentally broken the spam() method, due to a name clash. True, that's bad. I wish that were 'fixed'. Besides, double-underscore names are a PITA to work with: Isn't that example the point of having self.__private

Re: Mechanize hanging

2009-01-22 Thread Gabriel Genellina
En Wed, 21 Jan 2009 23:21:06 -0200, K-Dawg kdaw...@gmail.com escribió: I am trying to use mechanize to connect and log into Yahoo! Here is my code: #c:\Python25\python import re import urllib import urllib2 import mechanize print print1 br = mechanize.Browser() br.set_handle_robots(False)

Re: Does Python really follow its philosophy of Readability counts?

2009-01-22 Thread Ricardo Aráoz
Paul Rubin wrote: Mark Wooding m...@distorted.org.uk writes: Some people (let's call them `type A programmers') have decided that they want to be assisted with writing correct programs... Other people (`type B programmers') don't like having their (apparently? possibly?) correct programs

Re: Start Python at client side from web app

2009-01-22 Thread Rob Williscroft
Diez B. Roggisch wrote in news:6ts0dnfc9s0...@mid.uni-berlin.de in comp.lang.python: Rob Williscroft schrieb: Diez B. Roggisch wrote in news:6tpo16fbacf...@mid.uni-berlin.de in comp.lang.python: 2) create a localhost web server, for the client side manipulation. Then have your remote

Re: One Bug of Python 3.0

2009-01-22 Thread Gabriel Genellina
En Fri, 16 Jan 2009 01:56:23 -0200, escribiste en el grupo gmane.comp.python.general I met a bug of CGIXMLRPCRequestHandler in Python3.0. Because of the bug, couldn't use RPC in Apache CGI. You should file a bug report at http://bugs.python.org -- Gabriel Genellina --

unzip array of arrays?

2009-01-22 Thread Tobiah
Although it's trivial to program, I wondered whether there was a builtin or particularly concise way to express this idea: a = [(1, 2), (3, 4), (5, 6)] field[a, 2] [2, 4, 6] where field() is some made up function. Thanks, Toby -- http://mail.python.org/mailman/listinfo/python-list

Idea to support public/private.

2009-01-22 Thread Brian Allen Vanderburg II
Okay so I don't really care about public/private but I was watching the lists (Does python follow its idea of readability or something like that) and I thought of a 'possible' way to add this support to the language. I have implemented a class which allows creating both a private as well as a

Re: unzip array of arrays?

2009-01-22 Thread Chris Rebert
On Thu, Jan 22, 2009 at 2:04 PM, Tobiah t...@tobiah.org wrote: Although it's trivial to program, I wondered whether there was a builtin or particularly concise way to express this idea: a = [(1, 2), (3, 4), (5, 6)] field[a, 2] [2, 4, 6] where field() is some made up function. Python 2.6

Re: unzip array of arrays?

2009-01-22 Thread Grant Edwards
On 2009-01-22, Tobiah t...@tobiah.org wrote: Although it's trivial to program, I wondered whether there was a builtin or particularly concise way to express this idea: a = [(1, 2), (3, 4), (5, 6)] field[a, 2] [2, 4, 6] where field() is some made up function. The above example is a great

Re: os.path.getmtime on windows, error: 206 - path or extension too long

2009-01-22 Thread Gabriel Genellina
En Wed, 21 Jan 2009 08:50:53 -0200, mynthon mynth...@gmail.com escribió: I have very long path on windows and i get error when try to get modification time. So i tried do chdir path and then get file. It now gives me error that file doesn't exists [...] it works for other files so i suppose

Find all available Tkinter cursor names?

2009-01-22 Thread r
Anybody know how to find all the available Tkinter cursor icon names, or where the icons are stored? like paintbrush pencil etc... -- http://mail.python.org/mailman/listinfo/python-list

Re: Idea to support public/private.

2009-01-22 Thread Brian Allen Vanderburg II
There was a small error in setprivate/getprivate: import sys import inspect def get_private_codes(class_): codes = [] for i in class_.__dict__: value = class_.__dict__[i] if inspect.isfunction(value): codes.append(value.func_code) return codes def

Re: Start Python at client side from web app

2009-01-22 Thread Paul Rubin
Diez B. Roggisch de...@nospam.web.de writes: Before posting, I tried a jQuery-ajax-call inside Firebug from some random site to google. It bailed out with a security execption. You should be able to get around the security policy with XUL in Firefox, or with an ActiveX control in MSIE. In the

Re: unzip array of arrays?

2009-01-22 Thread Robert Kern
Unknown wrote: On 2009-01-22, Tobiah t...@tobiah.org wrote: Although it's trivial to program, I wondered whether there was a builtin or particularly concise way to express this idea: a = [(1, 2), (3, 4), (5, 6)] field[a, 2] [2, 4, 6] where field() is some made up function. The above

Re: ossaudiodev problem: sawtooth noise

2009-01-22 Thread Gabriel Genellina
En Mon, 19 Jan 2009 21:57:04 -0200, Peter Pearson ppear...@nowhere.invalid escribió: The following code uses ossaudiodev to read 1000 values from my sound card at a rate of 12,000 samples per second: When I select a sample rate that is not a power of 2 times 3000 samples/second, a strong and

To: Julian Snitow

2009-01-22 Thread SabbySF
I got this from a website and have no idea if you will get this. Since you are in charge of Anime at Boskone 46, do you know when the schedule will be published on line.For the last two years the Anime schedule was not published on line and that meant I could not do research on anime that I

Re: Formal specification and proof (was : Does Python really follow its philosophy of Readability counts?)

2009-01-22 Thread James Mills
On Thu, Jan 22, 2009 at 8:42 PM, Ricardo Aráoz ricar...@gmail.com wrote: (...) What I've seen engineers do when they need extra safety is to put in place independently developed and operated redundant systems, at least three, and the system will do whatever two of the independent systems agree

Re: Find all available Tkinter cursor names?

2009-01-22 Thread Kevin Walzer
r wrote: Anybody know how to find all the available Tkinter cursor icon names, or where the icons are stored? like paintbrush pencil etc... http://www.tcl.tk/man/tcl8.4/TkCmd/cursors.htm -- Kevin Walzer Code by Kevin http://www.codebykevin.com --

  1   2   3   >