[ANN] Tyrton ERP 1.0 released

2008-11-18 Thread Hartmut Goebel
On behalf of the Tryton team I'm proud to announce Tryton 1.0, an Open Source application platform and ERP. It provides modularity, scalability and security. This is the first release of Tryton, a fork of OpenERP (formally known as TinyERP). This release is the result of 8 months of intensive

Re: regular expressions ... slow

2008-11-18 Thread Kay Schluehr
On 17 Nov., 22:37, Uwe Schmitt [EMAIL PROTECTED] wrote: Hi, Is anobody aware of this post: http://swtch.com/~rsc/regexp/regexp1.html ? Are there any plans to speed up Pythons regular expression module ? Or is the example in this artricle too far from reality ??? Greetings, Uwe Some

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Antoon Pardon
On 2008-11-12, greg [EMAIL PROTECTED] wrote: Here is the definition of call-by-value from the Revised Report on the Algorithmic Language Algol 60 http://www.masswerk.at/algol60/report.htm: 4.7.3.1. Value assignment (call by value). All formal parameters quoted in the value part of the

who to thank for the new RST doc format?

2008-11-18 Thread mh
I am really loving the output, and have started using RST for some of my own docs as well. It's wonderful and I know it was a lot of work on somebody's part to think it through and make the changes. If it was you, Many Thanks!!! -- Mark Harrison Pixar Animation Studios --

Re: PP3E error

2008-11-18 Thread gagsl-py2
--- El mar 18-nov-08, ryan [EMAIL PROTECTED] escribió: I got it to work, just added the PP3E folder to Lib\site-packages. thanks very much I have been wanting to mke a text editor for some time. I also have another question, what is the book's software licensed under? can i make changes to

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Aaron Brady
On Nov 18, 2:21 am, Antoon Pardon [EMAIL PROTECTED] wrote: On 2008-11-12, greg [EMAIL PROTECTED] wrote: Here is the definition of call-by-value from the Revised Report on the Algorithmic Language Algol 60 http://www.masswerk.at/algol60/report.htm: 4.7.3.1. Value assignment (call by

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Steven D'Aprano
On Sun, 16 Nov 2008 15:46:54 -0800, rurpy wrote: Since many responses to my definition of value raised similar points, I will try and respond generally here. In hindsight, I should not have used the word value; it is far too overloaded with preexisting semantics for me to have attempted to

Re: Customizing sequence types

2008-11-18 Thread Mr . SpOOn
On Tue, Nov 18, 2008 at 1:59 AM, Gabriel Genellina [EMAIL PROTECTED] wrote: Yes, __cmp__ is gone in 3.0 You said you wrote __cmp__ the same as __eq__ and that's wrong, they return different results. Try something like this (untested): class X: def __init__(self, a): self.a = a def

Re: Sieve of Zakiya

2008-11-18 Thread Mark Dickinson
On Nov 18, 7:53 am, jzakiya [EMAIL PROTECTED] wrote: www.4shared.com/account/dir/7467736/97bd7b71/sharing From the introduction to the paper: Thus began a process that culminated in my developing a new class of Number Theory Sieves (NTS) to generate prime numbers, and test primality of numbers,

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Antoon Pardon
On 2008-11-12, greg [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: Why should anyone take the Revised Report on the Algorithmic Language Algol 60 as the official (only?) definition of call-by-value for all languages everywhere? Since the term was more or less invented by the people who

Re: compressed serialization module

2008-11-18 Thread Nick Craig-Wood
greg [EMAIL PROTECTED] wrote: Mark wrote: Thanks guys. This is for serializing to disk. I was hoping to not have to use too many intermediate steps You should be able to use a gzip.GzipFile or bz2.BZ2File and pickle straight into it. Good idea - that will be much more memory

Re: sorting list of complex numbers

2008-11-18 Thread Paul Rubin
[EMAIL PROTECTED] writes: but how do I then do a secondary sort by the imaginary part,... Is there a way to do this using just the key arg, no extra data structures? Clever solutions involving multiple sorts aside, I think what they really want you to do is something like (untested): class

Re: who to thank for the new RST doc format?

2008-11-18 Thread Glenn Hutchings
On 18 Nov, 08:46, [EMAIL PROTECTED] wrote: I am really loving the output, and have started using RST for some of my own docs as well. It's wonderful and I know it was a lot of work on somebody's part to think it through and make the changes. If it was you, Many Thanks!!! It *is* good,

Re: SHA1withRSA in python

2008-11-18 Thread Mailing List SVR
Ok thanks, for the records here is the python code to be compatible with java sha1withrsa: import M2Crypto md=M2Crypto.EVP.MessageDigest('sha1') md.update(clearpass) p=md.digest() key=M2Crypto.RSA.load_key(pathtokey) enc=key.sign(p) regards Nicola Il giorno mer, 12/11/2008 alle 17.45 +1100,

Re: sorting list of complex numbers

2008-11-18 Thread Paul Rubin
Duncan Booth [EMAIL PROTECTED] writes: If you don't like the tuple then just do the two sorts separately: lst.sort(key=lambda x: x.imag) lst.sort(key=lambda x: x.real) pprint.pprint(lst) That only goes so far though. Suppose instead of complex numbers you want to sort expressions, like:

Re: Multiple equates

2008-11-18 Thread CarlFK
On Nov 17, 2:54 pm, [EMAIL PROTECTED] (Cameron Laird) wrote: In article [EMAIL PROTECTED], Tim Chase  [EMAIL PROTECTED] wrote:                         .                         .                         .To the OP, I think rather than cluttering my code, I'd just create a loop   for i

vayama

2008-11-18 Thread palking
a href=http://www.tkqlhce.com/click-3234803-10534371; target=_top img src=http://www.awltovhc.com/image-3234803-10534371; width=160 height=600 alt=More international flights than any other website! border=0//a -- http://mail.python.org/mailman/listinfo/python-list

Re: external program crashes when run through subprocess.popen on XP

2008-11-18 Thread Christan K .
ckkart ckkart at gmail.com writes: Hi, on XP when starting a certain external program (plain C calculation program which communicates via stdout/fs) from python 2.5 using subprocess.Popen the external program crashes. It does not if started directly from the XP command prompt. This is

[ANN] Tyrton ERP 1.0 released

2008-11-18 Thread Hartmut Goebel
On behalf of the Tryton team I'm proud to announce Tryton 1.0, an Open Source application platform and ERP. It provides modularity, scalability and security. This is the first release of Tryton, a fork of OpenERP (formally known as TinyERP). This release is the result of 8 months of intensive

setting permissions to a file from linux.

2008-11-18 Thread gaurav kashyap
Hi all, I have a text file in a directory on unix system. Using a python program i want to change that file's permissions. How could this be done. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Installation on Vista (Was: ANN: ActivePython 2.6.0.0 is now available)

2008-11-18 Thread Artur M. Piwko
In the darkest hour on Mon, 17 Nov 2008 16:53:27 -0800 (PST), Mensanator [EMAIL PROTECTED] screamed: Strange, I had to. Had you enebled it previously and assinged a password? I couldn't use a runas command without a password. I never tried the Administrator-Disabled/Password-Assigned

Re: setting permissions to a file from linux.

2008-11-18 Thread Chris
On Nov 18, 2:36 pm, gaurav kashyap [EMAIL PROTECTED] wrote: Hi all, I have a text file in a directory on unix system. Using a python program i want to change that file's permissions. How could this be done. Thanks help(os.chmod) Help on built-in function chmod in module nt: chmod(...)

Re: setting permissions to a file from linux.

2008-11-18 Thread Albert Hopkins
On Tue, 2008-11-18 at 04:36 -0800, gaurav kashyap wrote: Hi all, I have a text file in a directory on unix system. Using a python program i want to change that file's permissions. How could this be done. Thanks os.chmod = chmod(...) chmod(path, mode) Change the access

Cython Installation on Windows

2008-11-18 Thread Srijit Kumar Bhadra
Cython Installation on Windows documentation (http://wiki.cython.org/ InstallingOnWindows) needs a minor but important change. Under section MinGW Compiler [build] compiler = mingw32 should be replaced by the following lines (i.e. disutils.cfg should have the following lines) [build]

Air Force1 and Air Jordan shoes PAYPAL wholesale

2008-11-18 Thread air force1 shoes
Air Force1 and Air Jordan shoes PAYPAL wholesale www.z-a-z-a.com air force1 shoes. air force1 high shoes. air force1 light shoes . we are professional produce air force1 and jordan shoes supplier ,carry PAYPAL.main air force1-25th AF1-high AF1-low .air jordan 1-14,air jordan 23,air force 1jordan

Re: setting permissions to a file from linux.

2008-11-18 Thread Nick Craig-Wood
Chris [EMAIL PROTECTED] wrote: On Nov 18, 2:36?pm, gaurav kashyap [EMAIL PROTECTED] wrote: I have a text file in a directory on unix system. Using a python program i want to change that file's permissions. How could this be done. Thanks help(os.chmod) Help on built-in function

Re: Sieve of Zakiya

2008-11-18 Thread jzakiya
On Nov 18, 5:01 am, Mark Dickinson [EMAIL PROTECTED] wrote: On Nov 18, 7:53 am, jzakiya [EMAIL PROTECTED] wrote: www.4shared.com/account/dir/7467736/97bd7b71/sharing From the introduction to the paper: Thus began a process that culminated in my developing a new class of Number Theory

spam update

2008-11-18 Thread skip
With some help from the python.org postmasters over the weekend I figured out why some seemingly obvious spam messages seem to be making it to the python-list@python.org mailing list. Messages gatewayed from Usenet don't pass through the spam filters. Mailman simply distributes them. There is

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Steve Holden
Steven D'Aprano wrote: On Mon, 17 Nov 2008 18:35:04 -0800, Craig Allen wrote: * Do all objects have values? (Ignore the Python docs if necessary.) If one allows null values, I am current thinking yes. I don't see a difference between a null value and not having a value. I think the

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-18 Thread Steve Holden
[EMAIL PROTECTED] wrote: [...] One of the reasons I would like to formulate a good model of an object's value and type is so that I could try to offer something better. Responses like yours are significantly demotivating. And yet you argue when people try to explain to you that objects don't

Re: Cython Installation on Windows

2008-11-18 Thread Stefan Behnel
Srijit Kumar Bhadra wrote: Cython Installation on Windows documentation (http://wiki.cython.org/ InstallingOnWindows) needs a minor but important change. Under section MinGW Compiler [build] compiler = mingw32 should be replaced by the following lines (i.e. disutils.cfg should have the

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread rurpy
On Nov 17, 7:35 pm, Craig Allen [EMAIL PROTECTED] wrote: * Do all objects have values? (Ignore the Python docs if necessary.) If one allows null values, I am current thinking yes. I don't see a difference between a null value and not having a value. I think the difference is

Re: Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-18 Thread John Nagle
Alia Khouri wrote: John Nagle wrote: MySQLdb, the Python shim for MySQL, still supports Python only to Python 2.5. See http://sourceforge.net/projects/mysql-python;. Are there any plans to support Python 2.6 or 3.x? Are you running windows? If so, check the forums of the group above,

Re: regular expressions ... slow

2008-11-18 Thread Stefan Behnel
Kay Schluehr wrote: All of this is prototyped in Python and it is still work in progress. As long as development has not reached a stable state I refuse to rebuild the system in an optimized C version. And rightfully so: 1) the approach is algorithmically better, so it may even beat the

Re: Avoiding local variable declarations?

2008-11-18 Thread Arnaud Delobelle
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] writes: On Tue, 18 Nov 2008 00:18:51 +, Steven D'Aprano wrote: On Mon, 17 Nov 2008 12:32:35 +, Marc 'BlackJack' Rintsch wrote: Not such illogical crap like ``a = a + 1`` which must be obviously false unless 1 is defined as the neutral

Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread Jeff Tchang
Odd issue I am having with class instantiation on Python 2.5.2 (Windows). I have a custom module with a few classes in it. The module is named SAML.py. There is a copy of it in C:\Python25\Lib\site-packages\SAML.py. Basically when I try to run a python file that tries to create an instance of

Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread Steve Holden
Jeff Tchang wrote: Odd issue I am having with class instantiation on Python 2.5.2 (Windows). I have a custom module with a few classes in it. The module is named SAML.py. There is a copy of it in C:\Python25\Lib\site-packages\SAML.py. Basically when I try to run a python file that tries to

Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread John Krukoff
On Tue, 2008-11-18 at 10:45 -0800, Jeff Tchang wrote: Odd issue I am having with class instantiation on Python 2.5.2 (Windows). I have a custom module with a few classes in it. The module is named SAML.py. There is a copy of it in C:\Python25\Lib\site-packages\SAML.py. Basically when I try

redirecting stdout to mysql table

2008-11-18 Thread n00b
greetings, i would like to redirect stdout/err to a mysql table and would like a) some peer review and b) suggestions for hardening the approach for a general purpose class. thank you very much. import sys import MySQLdb class DBLogger(object): def __init__(self): self.db_name =

redirecting stdout/err to mysql table

2008-11-18 Thread n00b
greetings, i need to log to the db directly and wrote a little script to do so. since i'm pretty new to python, i was wondering if a) you could review the enclosed code and b) provide suggestions to harden to code to turn it into a more general, broadly reusable class. thank you very much.

Re: redirecting stdout to mysql table

2008-11-18 Thread skip
n00b def openDb(self): n00b try: n00b self.db = MySQLdb.connect(host = self.db_host, n00b user = self.db_uname, n00b passwd = self.db_passwd, n00b

Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread Jeff Tchang
Random related question. If you're writing a SAML implementation have you found an XML Signature implementation that works reliably from python? I've had a hell of a time finding something that doesn't segfault and is interoperable with .NET. I guess you could call it a SAML implementation.

Re: Python and Its Libraries--Who's on First?

2008-11-18 Thread Kirk Strauser
At 2008-11-17T11:44:00Z, W. eWatson [EMAIL PROTECTED] writes: See the post by Chris R. In general, it is incumbent on the asker to provide additional information as needed, rather than being the job of the would-be answerer to go searching for it. -- Kirk Strauser --

Re: Suggestions for an education programming project

2008-11-18 Thread Scott David Daniels
Eric wrote: On Nov 17, 1:06 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: Eric [EMAIL PROTECTED] writes: Hi, I've been trying to get my son interested in learning some simple programming for a while. While I understand that a structured tutorial is best, I think if we can write something cool

Re: C Function Pointer Wrapping Example not working

2008-11-18 Thread Charlie
Nowhere in your code is the definition of binary_op - that is why you get a linker error. Is it defined in another C file?  If so you need to link it with the swig wrapper before you make the .so Thanks for pointing out. I sorted the code out finally! Charlie --

Re: special editor support for indentation needed.

2008-11-18 Thread Eric S. Johansson
Andreas Roehler wrote: IMO Jeremiah Dodds is right. With all the time spent on this discussion, you could write the needed function in elisp probably. BTW your request seems reasonable. Other python programmers may use it too. I tried learning lisp about 15 years ago. even bought a copy of

Re: sorting list of complex numbers

2008-11-18 Thread Gabriel Genellina
En Tue, 18 Nov 2008 08:41:58 -0200, Paul Rubin http://phr.cx@nospam.invalid escribió: [EMAIL PROTECTED] writes: but how do I then do a secondary sort by the imaginary part,... Is there a way to do this using just the key arg, no extra data structures? Clever solutions involving multiple

Re: external program crashes when run through subprocess.popen on XP

2008-11-18 Thread Gabriel Genellina
En Tue, 18 Nov 2008 09:41:46 -0200, Christan K. [EMAIL PROTECTED] escribió: ckkart ckkart at gmail.com writes: on XP when starting a certain external program (plain C calculation program which communicates via stdout/fs) from python 2.5 using subprocess.Popen the external program crashes. It

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Terry Reedy
Steven D'Aprano wrote: On Sun, 16 Nov 2008 15:46:54 -0800, rurpy wrote: For example, consider the two electrons around a helium nucleus. They have the same mass, the same speed, the same spin, the same electric charge, the same magnetic moment, they even have the same location in space

Re: sorting list of complex numbers

2008-11-18 Thread Arnaud Delobelle
Paul Rubin http://[EMAIL PROTECTED] writes: for fancier structures you'd need a full blown class implementation with an init method. Either way you end up temporarily allocating a lot of extra structures, but at least they're not all in memory simultaneously like in the DSU pattern. The

Re: who to thank for the new RST doc format?

2008-11-18 Thread Terry Reedy
Glenn Hutchings wrote: On 18 Nov, 08:46, [EMAIL PROTECTED] wrote: I am really loving the output, and have started using RST for some of my own docs as well. It's wonderful and I know it was a lot of work on somebody's part to think it through and make the changes. If it was you, Many

Re: sorting list of complex numbers

2008-11-18 Thread Terry Reedy
Paul Rubin wrote: That only goes so far though. Suppose instead of complex numbers you want to sort expressions, like: a(b,c(d,e),f(g,h)) treat those as parse trees in the obvious way. Presuming that a, c, and f are function calls that return Tree instances, you give Tree a __lt__

Re: spam update

2008-11-18 Thread r
On Nov 18, 10:23 am, [EMAIL PROTECTED] wrote: With some help from the python.org postmasters over the weekend I figured out why some seemingly obvious spam messages seem to be making it to the [EMAIL PROTECTED] mailing list.  Messages gatewayed from Usenet don't pass through the spam filters.  

how to acces the block inside of a context manager as sourcecode

2008-11-18 Thread Daniel
Hello, I need to access the code inside of a context manager, i.e. the call to with myManager(v=5) as x: a=b c=sin(x) should cause the following output (minus the first line, if that's easier): with myManager(v=5) as x: # I could live without this line a=b

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Aaron Brady
On Nov 18, 2:55 pm, Terry Reedy [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: On Sun, 16 Nov 2008 15:46:54 -0800, rurpy wrote: For example, consider the two electrons around a helium nucleus. They have the same mass, the same speed, the same spin, the same electric charge, the same

Re: Sieve of Zakiya

2008-11-18 Thread Mark Dickinson
On Nov 18, 3:58 pm, jzakiya [EMAIL PROTECTED] wrote: I am writing another paper explaining some of the mathematical basis for the SoZ, with complexity analysis, but I keep finding interesting features about the underlying math, which I hope real mathematicians will investigate and reveal

Re: Generators and their next() and send() methods

2008-11-18 Thread Thomas Mlynarczyk
alex23 schrieb: http://www.python.org/dev/peps/pep-0342/ That links to the original proposal to extend the generator behaviour After some searching, I found this as a remark in parentheses: Introducing a new method instead of overloading next() minimizes overhead for simple next() calls.

Re: Generators and their next() and send() methods

2008-11-18 Thread Thomas Mlynarczyk
Aaron Brady schrieb: And, if you don't intend to use 'myway' on 'listiterator's and such, 'send( None )' is equivalent to 'next( )'. I didn't know that. But doesn't that impose a restriction somehow? It makes it impossible to send a None to a generator. Greetings, Thomas -- Ce n'est pas

Re: Do a Gnuplot of a file in python

2008-11-18 Thread matthew43
You might want to try g.reset() or something of the sort. i saw this post because I'm also trying to figure out gnuplot.py I can't seem to find proper documentation anywhere. unless its telling me to run demo.py and analyse the code. does any1 have any idea where else I could look? A

Re: Avoiding local variable declarations?

2008-11-18 Thread Gabriel Genellina
En Tue, 18 Nov 2008 16:27:46 -0200, Arnaud Delobelle [EMAIL PROTECTED] escribió: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] writes: On Tue, 18 Nov 2008 00:18:51 +, Steven D'Aprano wrote: On Mon, 17 Nov 2008 12:32:35 +, Marc 'BlackJack' Rintsch wrote: Not such illogical crap like ``a

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Robert Kern
Terry Reedy wrote: Steven D'Aprano wrote: On Sun, 16 Nov 2008 15:46:54 -0800, rurpy wrote: For example, consider the two electrons around a helium nucleus. They have the same mass, the same speed, the same spin, the same electric charge, the same magnetic moment, they even have the same

file tell in a for-loop

2008-11-18 Thread Magdoll
I was trying to map various locations in a file to a dictionary. At first I read through the file using a for-loop, but tell() gave back weird results, so I switched to while, then it worked. The for-loop version was something like: d = {} for line in f:

Python module for rasters

2008-11-18 Thread John Townsend
I'm working on a script that will compare two raster files and tell me if they match or not. Are there any Python modules that will compare rasters (e.g. Photoshop files and Tiffs)? Any suggestions welcome. John Townsend (5-7204), AGM-FL and PSL QE Lead --

Re: wildcard match with list.index()

2008-11-18 Thread jeff
On Nov 10, 1:59 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: Mr.SpOOn [EMAIL PROTECTED] writes: Hi, is there any way to search elements in a list using wildcards? I have a list of various elements and I need to search for elements starting with 'no', extract them and put in a new list.

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread greg
Antoon Pardon wrote: Call by value is officially defined in terms of assignment in a context where assignments means copying and in a definition of a specifix language. You can't lift this part out of the definition of algol 60 and say it applies equally well in languages with different

Re: Best practise hierarchy for user-defined exceptions

2008-11-18 Thread Scott David Daniels
Nick Craig-Wood wrote: Slaunger [EMAIL PROTECTED] wrote: I will not notice that it was an unanticpated condition in my own code, which caused the ValueError to be raised. If I had just inherited from MyError, it would fall through I'd say if the above code worries you, then

Re: file tell in a for-loop

2008-11-18 Thread Justin Ezequiel
On Nov 19, 7:00 am, Magdoll [EMAIL PROTECTED] wrote: I was trying to map various locations in a file to a dictionary. At first I read through the file using a for-loop, but tell() gave back weird results, so I switched to while, then it worked. The for-loop version was something like:        

How to deal with globals during refactoring classes into separate files.

2008-11-18 Thread r0g
Hi There, I'm refactoring some old code that uses global variables and was originally written in one big flat file with a view to nicening it up and then extending it. The problem I have though is when I move the various classes out to their own separate files and reimport them back in they can't

Re: compressed serialization module

2008-11-18 Thread greg
Nick Craig-Wood wrote: (Note that basic pickle protocol is likely to be more compressible than the binary version!) Although the binary version may be more compact to start with. It would be interesting to compare the two and see which one wins. -- Greg --

Re: Avoiding local variable declarations?

2008-11-18 Thread greg
Arnaud Delobelle wrote: Neutral element is correct. But maybe its use is limited to mathematicians in the english-speaking word. I've only ever seen identity element in English mathematics. Neutral element sounds like something my car's gearbox might have... -- Greg --

Re: How to deal with globals during refactoring classes into separate files.

2008-11-18 Thread Gabriel Genellina
En Tue, 18 Nov 2008 22:14:39 -0200, r0g [EMAIL PROTECTED] escribió: I'm refactoring some old code that uses global variables and was originally written in one big flat file with a view to nicening it up and then extending it. The problem I have though is when I move the various classes out to

Re: Generators and their next() and send() methods

2008-11-18 Thread Aaron Brady
On Nov 18, 5:20 pm, Thomas Mlynarczyk [EMAIL PROTECTED] wrote: Aaron Brady schrieb: And, if you don't intend to use 'myway' on 'listiterator's and such, 'send( None )' is equivalent to 'next( )'. I didn't know that. But doesn't that impose a restriction somehow? It makes it impossible to

Programming exercises/challenges

2008-11-18 Thread btkuhn
Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing challenges/programs to reinforce the material and improve my skills. I started out with stuff like Guess my

Re: How to deal with globals during refactoring classes into separate files.

2008-11-18 Thread Chris Rebert
On Tue, Nov 18, 2008 at 4:14 PM, r0g [EMAIL PROTECTED] wrote: Hi There, I'm refactoring some old code that uses global variables and was originally written in one big flat file with a view to nicening it up and then extending it. The problem I have though is when I move the various classes

Re: Restricted Execution of untrusted code

2008-11-18 Thread Emanuele D'Arrigo
Thanks to those who replied and sorry for not having replied sooner. Ok, got the message: chroot jail. I understand chroot is available for unix-like OS as a kernel-provided facility. If I was developing for, say, Linux or maybe even MacOSX, it might even be easy. My target OS however are XP and

Re: how to acces the block inside of a context manager as sourcecode

2008-11-18 Thread Aaron Brady
On Nov 18, 3:59 pm, Daniel [EMAIL PROTECTED] wrote: Hello, I need to access the code inside of a context manager, i.e. the call to with myManager(v=5) as x:         a=b         c=sin(x) should cause the following output (minus the first line, if that's easier): with myManager(v=5) as x:

Re: Programming exercises/challenges

2008-11-18 Thread Mensanator
On Nov 18, 6:39�pm, [EMAIL PROTECTED] wrote: Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing challenges/programs to reinforce the material and improve my

Re: Programming exercises/challenges

2008-11-18 Thread skip
Ben I'm learning Python by teaching myself, ... I'm working on the Ben project Euler problems, but I find that they don't really help my Ben programming skills; they are more math focused. I've found quite the opposite to be the case. I've been programming in Python for quite awhile

Re: Programming exercises/challenges

2008-11-18 Thread Tomasz Rola
On Tue, 18 Nov 2008, [EMAIL PROTECTED] wrote: [...] challenges, or programs that have helped you'll learn. I'm working on the project Euler problems, but I find that they don't really help my programming skills; they are more math focused. Project Euler and others focus more on the so called

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread rurpy
On Nov 18, 10:22 am, Steve Holden [EMAIL PROTECTED] wrote in thread Python-URL! weekly Python news and links (Nov 17): [EMAIL PROTECTED] wrote: [...] One of the reasons I would like to formulate a good model of an object's value and type is so that I could try to offer something better.

Re: Python-URL! - weekly Python news and links (Nov 17)

2008-11-18 Thread rurpy
On Nov 18, 10:22 am, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: [...] One of the reasons I would like to formulate a good model of an object's value and type is so that I could try to offer something better. Responses like yours are significantly demotivating.

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Steven D'Aprano
On Tue, 18 Nov 2008 15:55:10 -0500, Terry Reedy wrote: Steven D'Aprano wrote: On Sun, 16 Nov 2008 15:46:54 -0800, rurpy wrote: For example, consider the two electrons around a helium nucleus. They have the same mass, the same speed, the same spin, the same electric charge, the same

Re: Palette-mode PNG images

2008-11-18 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], I wrote: data = string.join(map(chr, data), ) TypeError: an integer is required OK, I figured that out, the putpalette call wants a sequence of integers being (R, G, B, R, G, B ...), not a sequence of sequences ((R, G, B), (R, G, B)...).

PEP 324 error

2008-11-18 Thread Andrew
It appears PEP 324 is missing the part about check_call(): http://www.python.org/dev/peps/pep-0324/ ... This module also defines two shortcut functions: - call(*args, **kwargs): Run command with arguments. Wait for command to complete, then return the returncode

Re: Programming exercises/challenges

2008-11-18 Thread Scott MacDonald
What size of a project are you looking to work on? I enjoy learning in a similar way as you it seems. Recently I have been interested in data visualization problems. Maybe trying to replicate something from a website like: http://www.visualcomplexity.com/vc/ would interest you? Scott On Tue,

Re: Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-18 Thread Alia Khouri
John Nagle wrote:     Whoever did the port somehow created a dependency on the Intel math library, libguide40.dll and libmmd.dll.  That shouldn't be needed in the MySQL Python shim.  It's not freely distributable, either; you have to buy the Intel C++ compiler to get it.  There are

Exception difference 2.4 == 2.5

2008-11-18 Thread D'Arcy J.M. Cain
I am having a strange problem and I can't seem to zero in on it. I am also having trouble reducing it to a small enough snippet that I can post here. I think that I am doing what the more complex script does but none of my attempts fail. So, here is a description just in case someone has seen

Re: Restricted Execution of untrusted code

2008-11-18 Thread Ben Finney
Emanuele D'Arrigo [EMAIL PROTECTED] writes: My target OS however are XP and Vista. I did find chroot-like features in various virtualization platforms for those OS, but it would definitely be overkill to request the user that he installs a virtualization software to run a small application.

Re: Sieve of Zakiya

2008-11-18 Thread jzakiya
On Nov 18, 6:15 pm, Mark Dickinson [EMAIL PROTECTED] wrote: On Nov 18, 3:58 pm, jzakiya [EMAIL PROTECTED] wrote: I am writing another paper explaining some of the mathematical basis for the SoZ, with complexity analysis, but I keep finding interesting features about the underlying math,

Re: Sieve of Zakiya

2008-11-18 Thread jzakiya
On Nov 18, 6:15 pm, Mark Dickinson [EMAIL PROTECTED] wrote: On Nov 18, 3:58 pm, jzakiya [EMAIL PROTECTED] wrote: I am writing another paper explaining some of the mathematical basis for the SoZ, with complexity analysis, but I keep finding interesting features about the underlying math,

Re: Exception difference 2.4 == 2.5

2008-11-18 Thread Chris Rebert
On Tue, Nov 18, 2008 at 8:56 PM, D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: I am having a strange problem and I can't seem to zero in on it. I am also having trouble reducing it to a small enough snippet that I can post here. I think that I am doing what the more complex script does but none

Re: Uninstall one of two Python's

2008-11-18 Thread Martin v. Löwis
I have Apache with mod_python installed as well. When Apache tries to run a Python script, I think it's using the wrong python, and that's because the /usr/local/bin path is before the /usr/bin path in the $PATH variable. Unless you compiled the module yourself, I doubt that. Ubuntu won't

Re: Programming exercises/challenges

2008-11-18 Thread Jeremiah Dodds
On Tue, Nov 18, 2008 at 7:39 PM, [EMAIL PROTECTED] wrote: Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing challenges/programs to reinforce the material

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-18 Thread Gabriel Genellina
En Wed, 19 Nov 2008 01:14:28 -0200, [EMAIL PROTECTED] escribió: On Nov 18, 10:22 am, Steve Holden [EMAIL PROTECTED] wrote in thread Python-URL! weekly Python news and links (Nov 17): [EMAIL PROTECTED] wrote: [...] One of the reasons I would like to formulate a good model of an object's value

zope vs openACS

2008-11-18 Thread gavino
what is nicer about each? -- http://mail.python.org/mailman/listinfo/python-list

python vs smalltalk 80

2008-11-18 Thread gavino
python vs smalltalk 80 which is nicer? -- http://mail.python.org/mailman/listinfo/python-list

Re: Exception difference 2.4 == 2.5

2008-11-18 Thread Ross Ridge
D'Arcy J.M. Cain [EMAIL PROTECTED] wrote: Under Python 2.4 this works fine. If an exception is raised in the looked up method it gets handled by this code just fine. Under 2.5, however, the exception is not caught here. It's as if there was no try/except here at all. Python 2.5 changed the

Re: python vs smalltalk 80

2008-11-18 Thread Lawrence D'Oliveiro
gavino wrote: which is nicer? If I were to lock you and INTERCAL in a room until only one is left alive, who do you think would survive? -- http://mail.python.org/mailman/listinfo/python-list

Python bytecode STORE_NAME

2008-11-18 Thread schwarz
As part of some research I am doing a Python Virtual Machine in Java, and the exact semantics of the STORE_NAME bytecode is unclear to be, so I was hoping somebody here could clarify it. The STORE_NAME bytecode is supposed to set a value for a name in the current scope. However, the following

[issue4326] type of UserList instance returns class instead of instance

2008-11-18 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I repeat, what is this easy condition good for? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4326 ___ ___

  1   2   >