Re: super() and multiple inheritance failure

2009-09-25 Thread Michele Simionato
On Sep 26, 8:02 am, "Gabriel Genellina" wrote: > If you decide at every invocation which method to call, it's a dispatcher;   > you may use a dictionary to map each alternative to the function to be   > invoked. If it only depends on the type of the argument, there is a hidden   > gem in pkgutil (

Re: super() and multiple inheritance failure

2009-09-25 Thread Chris Rebert
On Fri, Sep 25, 2009 at 9:30 PM, Steven D'Aprano wrote: > On Fri, 25 Sep 2009 20:15:54 -0700, Chris Rebert wrote: > >>> Inside MyClass().method(n), I dispatch to either NClass.method() or >>> PClass.method() depending on the value of the argument n. The correct >>> class is called, but then the *o

Re: Signing extensions

2009-09-25 Thread Neil Hodgson
Roger Binns: > The Windows Python distribution is signed by PGP and the normal Microsoft > way using a Verisign class 3 cert. (If you read their issuer statement it > ultimately says the cert isn't worth the bits it is printed on :-) One of > those certs is $500 per year which is out of the ques

Re: super() and multiple inheritance failure

2009-09-25 Thread Gabriel Genellina
En Sat, 26 Sep 2009 01:48:08 -0300, Steven D'Aprano escribió: I'm aiming for some sort of polymorphic inheritance: in a method, if the argument meets some condition, inherit from PClass, if it meets another condition inherit from NClass, and so on. Is there are standard name for this idea?

Re: Things to know about ‘super’ (was: super() a nd multiple inheritance failure)

2009-09-25 Thread Michele Simionato
On Sep 26, 6:56 am, Ben Finney wrote: > Michele Simionato writes: > > You may want to read "Things to know about super": > > >http://www.artima.com/weblogs/viewpost.jsp?thread=236275 > >http://www.artima.com/weblogs/viewpost.jsp?thread=236278 > >http://www.artima.com/weblogs/viewpost.jsp?thread=2

Re: super() and multiple inheritance failure

2009-09-25 Thread Ben Finney
Steven D'Aprano writes: > On Fri, 25 Sep 2009 21:03:09 -0700, Michele Simionato wrote: > > I usually recommend avoiding multiple inheritance altogether. > > In my case, PClass and NClass are actually private classes, and it > seemed like a nice way to avoid having to fill MyClass with > slightly-

Things to know about ‘super’ (was: super() and multiple inheritance failure)

2009-09-25 Thread Ben Finney
Michele Simionato writes: > You may want to read "Things to know about super": > > http://www.artima.com/weblogs/viewpost.jsp?thread=236275 > http://www.artima.com/weblogs/viewpost.jsp?thread=236278 > http://www.artima.com/weblogs/viewpost.jsp?thread=237121 Thanks for these articles. Any chance

Re: super() and multiple inheritance failure

2009-09-25 Thread Steven D'Aprano
On Fri, 25 Sep 2009 21:03:09 -0700, Michele Simionato wrote: > On Sep 26, 4:36 am, Steven D'Aprano cybersource.com.au> wrote: >> I don't understand why I'm getting the following behaviour when using >> super() with multiple inheritance. > > super is working as intended. If you do not want cooper

Re: super() and multiple inheritance failure

2009-09-25 Thread Steven D'Aprano
On Fri, 25 Sep 2009 20:15:54 -0700, Chris Rebert wrote: >> Inside MyClass().method(n), I dispatch to either NClass.method() or >> PClass.method() depending on the value of the argument n. The correct >> class is called, but then the *other* class method is called as well. >> E.g. this is what I ex

Re: super() and multiple inheritance failure

2009-09-25 Thread Daniel Stutzbach
On Fri, Sep 25, 2009 at 9:36 PM, Steven D'Aprano < st...@remove-this-cybersource.com.au> wrote: > I don't understand why I'm getting the following behaviour when using > super() with multiple inheritance. The following is a minimal example > demonstrating the behaviour. > super() does not have th

Re: super() and multiple inheritance failure

2009-09-25 Thread Michele Simionato
On Sep 26, 4:36 am, Steven D'Aprano wrote: > I don't understand why I'm getting the following behaviour when using > super() with multiple inheritance. super is working as intended. If you do not want cooperative methods, don't use super and call directly the superclass. I usually recommend avoid

Re: Format string with single quotes in it

2009-09-25 Thread Gabriel Genellina
En Fri, 25 Sep 2009 09:42:11 -0300, Bahadir escribió: still struggling to get this right: How do I format a string that contains single quotes in it? Forget single quotes. Your problem doesn't appear to be related to those quotes. I am reading a file with lines of the form: CONT%d_VIR

Signing extensions

2009-09-25 Thread Roger Binns
I would like to digitally sign the open source Python extensions I produce. I produce source code (zip file) as well as pre-built binaries for Windows (all Python versions from 2.3 to 3.1). I can sign the source using my PGP key no problem. I could also sign the Windows binaries that way but Win

Re: super() and multiple inheritance failure

2009-09-25 Thread Chris Rebert
On Fri, Sep 25, 2009 at 7:36 PM, Steven D'Aprano wrote: > I don't understand why I'm getting the following behaviour when using > super() with multiple inheritance. The following is a minimal example > demonstrating the behaviour. > > I have a diamond class hierarchy as follows: > >  o >  | >  B >

Re: Finding application data after install - a solution?

2009-09-25 Thread Gabriel Genellina
En Fri, 25 Sep 2009 06:53:18 -0300, Wolodja Wentland escribió: How do you you *install* this file within /etc ? Do users have to copy it themselves into /etc from DATA_DIR/foo/etc/fooapplication.conf.sample ? Nothing fancy here: setup(data_files=[ ('/etc/foo.conf', ['foo.conf.sample

super() and multiple inheritance failure

2009-09-25 Thread Steven D'Aprano
I don't understand why I'm getting the following behaviour when using super() with multiple inheritance. The following is a minimal example demonstrating the behaviour. I have a diamond class hierarchy as follows: o | B / \ P N \ / M where: o = object B = BaseClass P = PClass N = NClass M

Re: IDE for python similar to visual basic

2009-09-25 Thread Threader Slash
On Sat, Sep 26, 2009 at 12:58 AM, Dave Angel wrote: > Threader Slash wrote: > >> -- Forwarded message -- >>> From: J Sisson >>> To: Nobody >>> Date: Thu, 24 Sep 2009 19:18:03 -0500 >>> Subject: Re: IDE for python similar to visual basic >>> >>> >>> On Sun, Sep 13, 2009 at 6:25 A

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Florian Diesch
Ben Finney writes: > Olof Bjarnason writes: > >> - any geeks visiting my blog that are non-Ubuntu (i'll just provide >> the source code and tell them to apt-get python-pygame) > > Note that for several years now the recommended command-line tool for > package installation is not ‘apt-get’, but

Re: setting up dynamic descriptors in Python

2009-09-25 Thread Gabriel Genellina
En Thu, 24 Sep 2009 12:14:39 -0300, brian huggins escribió: I want to set up descriptors at runtine, but it isn't working the way i would expect. Does anybody know if this is possible? class TestDesc (object): x=Descriptor ("x") def __init__ (self): self.y=Descriptor("y")

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Paul Boddie
On 25 Sep, 23:14, Olof Bjarnason wrote: > > So what approach do you suggest? I've gotten as far as understanding > how to add menu-items to the Ubuntu menus, simple .desktop file format > to do that. Yes, xdg-desktop-menu will probably do the trick. > One could "cheat" and write an install.sh sc

Re: variable scope

2009-09-25 Thread Joel Juvenal Rivera Rivera
Yeah i forgot the self an try the code then i see an error that it was not defines _uno__a so that's where i define the global and see that behavior. Thanks for your answers El vie, 25-09-2009 a las 15:14 -0700, Ethan Furman escribió: > Joel Juvenal Rivera Rivera wrote: > > Hi i was playing aroun

Re: variable scope

2009-09-25 Thread Ethan Furman
Joel Juvenal Rivera Rivera wrote: Hi i was playing around with my code the i realize of this ### _uno__a = 1 class uno(): __a = 2 def __init__(self): print __a uno() ### and prints 1 So when i create class uno in the __init__ calls the global _uno

variable scope

2009-09-25 Thread Joel Juvenal Rivera Rivera
Hi i was playing around with my code the i realize of this ### _uno__a = 1 class uno(): __a = 2 def __init__(self): print __a uno() ### and prints 1 So when i create class uno in the __init__ calls the global _uno__a when i refer just __a ? it's som

Re: [Tutor] Help required

2009-09-25 Thread vince spicer
On Fri, Sep 25, 2009 at 1:56 PM, waqas ahmad wrote: > > > Hi, > > I dont know it is the right place to post this question. I need help to > change one search code line . can you help me please. > > here is my search method code: > > search=re.compile("^#acl InternationalGroup.*\n", re.M).search(

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Olof Bjarnason
2009/9/25 Paul Boddie : > On 25 Sep, 13:21, Olof Bjarnason wrote: >> >> I am thinking of two target audiences: >> >> 1. Early adopters/beta-testers. This would include: >>   - my non-computer-geek brother on a windows-machine. I'll go for py2exe. >>   - any non-geek visiting my blog using windows

Re: Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

2009-09-25 Thread Alejandro Valdez
Hello Mark, thank you a lot for your hints, I compiled python using the --enable-unicode=ucs4 parameter in configure and I could successfully install setuptools (Anyway I'm a little suspicious about my compiled binaries...). You are right about the environment variables, I have set PYTHONPATH and

Re: Most "active" coroutine library project?

2009-09-25 Thread Grant Edwards
On 2009-09-25, Jason Tackaberry wrote: > Jean-Paul made the same argument. In my view, the requirement to yield > s.connect() is a feature, not a bug. Here, IMO explicit truly is better > than implicit. I prefer to know at what specific points my routines may > branch off. > > And I maintain t

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Paul Boddie
On 25 Sep, 13:21, Olof Bjarnason wrote: > > I am thinking of two target audiences: > > 1. Early adopters/beta-testers. This would include: >   - my non-computer-geek brother on a windows-machine. I'll go for py2exe. >   - any non-geek visiting my blog using windows (py2exe) I'd really like to hea

Re: Comparison of parsers in python?

2009-09-25 Thread Nobody
On Tue, 22 Sep 2009 17:07:33 +1200, greg wrote: >> What I want: a tokeniser generator which can take a lex-style grammar (not >> necessarily lex syntax, but a set of token specifications defined by >> REs, BNF, or whatever), generate a DFA, then run the DFA on sequences of >> bytes. It must allow

Re: What does the list_folders() method of mailbox.Maildir actually ?do (if anything)?

2009-09-25 Thread Jeff McNeil
On Sep 25, 4:28 pm, Jeff McNeil wrote: > On Sep 25, 4:13 pm, tinn...@isbd.co.uk wrote: > > > > > > > Jeff McNeil wrote: > > > On Sep 25, 3:22 pm, tinn...@isbd.co.uk wrote: > > > > I can't get the list_folders() method of the mailbox.Maildir class to > > > > do anything remotely useful.  It seems

Re: What does the list_folders() method of mailbox.Maildir actually ?do (if anything)?

2009-09-25 Thread Jeff McNeil
On Sep 25, 4:13 pm, tinn...@isbd.co.uk wrote: > Jeff McNeil wrote: > > On Sep 25, 3:22 pm, tinn...@isbd.co.uk wrote: > > > I can't get the list_folders() method of the mailbox.Maildir class to > > > do anything remotely useful.  It seems to do nothing at all.  I have a > > > directory which contai

Re: Repeated output when logging exceptions

2009-09-25 Thread Vinay Sajip
On Sep 24, 8:43 pm, John Gordon wrote: > Why is this happening?  I suspect it's because I'm declaring two instances > of the exceptionLogger class, which ends up calling logger.addHandler() > twice.  Is that right? > Yes, that's why you get duplicated lines in the log. > What would be a better w

Re: What does the list_folders() method of mailbox.Maildir actually ?do (if anything)?

2009-09-25 Thread tinnews
Jeff McNeil wrote: > On Sep 25, 3:22 pm, tinn...@isbd.co.uk wrote: > > I can't get the list_folders() method of the mailbox.Maildir class to > > do anything remotely useful.  It seems to do nothing at all.  I have a > > directory which contains a number of maildir malboxes:- > > > >     chris$ ls

Re: flow control and nested loops

2009-09-25 Thread Terry Reedy
kj wrote: In Perl, one can label loops for finer flow control. For example: X: for my $x (@X) { Y: for my $y (@Y) { for my $z (@Z) { next X if test1($x, $y, $z); next Y if test2($x, $y, $z); frobnicate($x, $y, $z); } glortz($x, $y); } splat($x); } What's

Re: flow control and nested loops

2009-09-25 Thread Simon Forman
On Fri, Sep 25, 2009 at 3:01 PM, kj wrote: > > > In Perl, one can label loops for finer flow control.  For example: > > X: for my $x (@X) { >  Y: for my $y (@Y) { >    for my $z (@Z) { >      next X if test1($x, $y, $z); >      next Y if test2($x, $y, $z); >      frobnicate($x, $y, $z); >    } >  

Re: Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

2009-09-25 Thread Mark Dickinson
On Sep 25, 7:56 pm, Mark Dickinson wrote: > On Sep 25, 7:05 pm, Alejandro Valdez > wrote: > > Hello I sent this e-mail to the python-help list but I'm not sure if > > that list is active... so I post it again here: > > > I'm trying to build Python 2.6.2 from the sources downloaded from the > > py

Re: importing with .m instead of .py

2009-09-25 Thread Wanderer
On Sep 25, 2:05 pm, Andrew Svetlov wrote: > On Sep 25, 1:16 pm, Wanderer wrote: > > > execfile(x) does what I'm looking for. > > Perhaps you are looking for Python import > hook:http://www.python.org/dev/peps/pep-0302/ > > In you import hook you can do everything (and locate/import file with > a

Re: What does the list_folders() method of mailbox.Maildir actually do (if anything)?

2009-09-25 Thread Jeff McNeil
On Sep 25, 3:22 pm, tinn...@isbd.co.uk wrote: > I can't get the list_folders() method of the mailbox.Maildir class to > do anything remotely useful.  It seems to do nothing at all.  I have a > directory which contains a number of maildir malboxes:- > >     chris$ ls -l /home/chris/Mail/apex >     t

Re: Most "active" coroutine library project?

2009-09-25 Thread Jason Tackaberry
On Fri, 2009-09-25 at 15:25 -0400, Simon Forman wrote: > So Kaa is essentially implementing the trampoline function. Essentially, yeah. It doesn't require (or support, depending on your perspective) a coroutine to explicitly yield the next coroutine to be reentered, but otherwise I'd say it's the

Re: Most "active" coroutine library project?

2009-09-25 Thread Jason Tackaberry
On Fri, 2009-09-25 at 18:36 +, Grant Edwards wrote: > That's not comletely transparently. The routine fetch_google() > has to know a priori that s.connect() might want to yield and > so has to invoke it with a yield statement. With my implementation, tasks that execute asynchronously (which m

Re: Most "active" coroutine library project?

2009-09-25 Thread Simon Forman
On Fri, Sep 25, 2009 at 2:07 PM, Jason Tackaberry wrote: > On Fri, 2009-09-25 at 15:42 +, Grant Edwards wrote: >> You can't call a function that yields control back to the other >> coroutine(s).  By jumping through some hoops you can get the >> same effect, but it's not very intuitive and it s

What does the list_folders() method of mailbox.Maildir actually do (if anything)?

2009-09-25 Thread tinnews
I can't get the list_folders() method of the mailbox.Maildir class to do anything remotely useful. It seems to do nothing at all. I have a directory which contains a number of maildir malboxes:- chris$ ls -l /home/chris/Mail/apex total 24 drwx-- 5 chris chris 4096 2009-04-30 09:4

Re: nested structure with "internal references"

2009-09-25 Thread Kent Turbo
On Sep 25, 9:11 pm, Torsten Mohr wrote: > I'd like to refer to another entry and not copy that entry, i need to > know later that this is a reference to another entry, i need to find > also access that entry then. > > The references only need to refer to entries in this structure. > The lists may

flow control and nested loops

2009-09-25 Thread kj
In Perl, one can label loops for finer flow control. For example: X: for my $x (@X) { Y: for my $y (@Y) { for my $z (@Z) { next X if test1($x, $y, $z); next Y if test2($x, $y, $z); frobnicate($x, $y, $z); } glortz($x, $y); } splat($x); } What's considered

Re: Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

2009-09-25 Thread Mark Dickinson
On Sep 25, 7:05 pm, Alejandro Valdez wrote: > Hello I sent this e-mail to the python-help list but I'm not sure if > that list is active... so I post it again here: > > I'm trying to build Python 2.6.2 from the sources downloaded from the > python official site on OpenSuSE 11.1 (32 bit). After ins

Re: nested structure with "internal references"

2009-09-25 Thread akonsu
put a (name, value) pair in each list element instead of just value and reference them by name, you can use uuid to generate names konstantin -- http://mail.python.org/mailman/listinfo/python-list

Re: Most "active" coroutine library project?

2009-09-25 Thread Grant Edwards
On 2009-09-25, Jason Tackaberry wrote: > On Fri, 2009-09-25 at 15:42 +, Grant Edwards wrote: >> You can't call a function that yields control back to the other >> coroutine(s). By jumping through some hoops you can get the >> same effect, but it's not very intuitive and it sort of "feels >> w

Re: nested structure with "internal references"

2009-09-25 Thread Carl Banks
On Sep 25, 10:11 am, Torsten Mohr wrote: > Hi, > > sorry for posting in german before, that was a mistake. > > I'd like to use a nested structure in memory that consists > of dict()s and list()s, list entries can be dict()s, other list()s, > dict entries can be list()s or other dict()s. > > The li

Re: Most "active" coroutine library project?

2009-09-25 Thread Jason Tackaberry
On Fri, 2009-09-25 at 15:42 +, Grant Edwards wrote: > You can't call a function that yields control back to the other > coroutine(s). By jumping through some hoops you can get the > same effect, but it's not very intuitive and it sort of "feels > wrong" that the main routine has to know ahead

Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

2009-09-25 Thread Alejandro Valdez
Hello I sent this e-mail to the python-help list but I'm not sure if that list is active... so I post it again here: I'm trying to build Python 2.6.2 from the sources downloaded from the python official site on OpenSuSE 11.1 (32 bit). After installation the python command line interpreter seems to

Re: importing with .m instead of .py

2009-09-25 Thread Andrew Svetlov
On Sep 25, 1:16 pm, Wanderer wrote: > execfile(x) does what I'm looking for. > Perhaps you are looking for Python import hook: http://www.python.org/dev/peps/pep-0302/ In you import hook you can do everything (and locate/import file with any extension :) -- http://mail.python.org/mailman/listi

Re: nested structure with "internal references"

2009-09-25 Thread akonsu
On Sep 25, 1:11 pm, Torsten Mohr wrote: > Hi, > > sorry for posting in german before, that was a mistake. > > I'd like to use a nested structure in memory that consists > of dict()s and list()s, list entries can be dict()s, other list()s, > dict entries can be list()s or other dict()s. > > The lis

problems compiling pyscopg2 on RHEL4

2009-09-25 Thread Chris Withers
Hi All, I installed the following rpms: postgresql-libs-7.4.19-1.el4_6.1 postgresql-devel-7.4.19-1.el4_6.1 postgresql-7.4.19-1.el4_6.1 And then installed psycopg2 as follows: wget http://initd.org/pub/software/psycopg/psycopg2-2.0.12.tar.gz tar xzf psycopg2-2.0.12.tar.gz cd psycopg2-2.0.12 pyt

Re: Poll: Do you use csv.Sniffer?

2009-09-25 Thread r
On Sep 24, 9:26 pm, s...@pobox.com wrote: > If csv.Sniff was to be removed from a future version of Python, how > difficult would it be to adapt? A good response would be... What are you adding to the stdlib that requires making space by removing csv.Sniff? Oh and, i never use the Sniffer ;-) --

Re: importing with .m instead of .py

2009-09-25 Thread Wanderer
On Sep 25, 12:15 pm, Ishwor Gurung wrote: > Wanderer > Hi > Refer tohttp://docs.python.org/tutorial/modules.html#the-module-search-path. > > Particularly- > " > When a module named spam is imported, the interpreter searches for a > file named spam.py in the current directory, and then in the list

nested structure with "internal references"

2009-09-25 Thread Torsten Mohr
Hi, sorry for posting in german before, that was a mistake. I'd like to use a nested structure in memory that consists of dict()s and list()s, list entries can be dict()s, other list()s, dict entries can be list()s or other dict()s. The lists and dicts can also contain int, float, string, ... B

Re: Most "active" coroutine library project?

2009-09-25 Thread Grant Edwards
On 2009-09-25, Simon Forman wrote: > On Fri, Sep 25, 2009 at 11:42 AM, Grant Edwards > wrote: >> You can't call a function that yields control back to the other >> coroutine(s). ?By jumping through some hoops you can get the >> same effect, but it's not very intuitive and it sort of "feels >> w

Re: is this whiff/wsgi claim true?

2009-09-25 Thread Aaron Watters
regarding http://aaron.oirt.rutgers.edu/myapp/docs/W1000.concepts Michele Simionato writes: > To me, it looks like the approach Quixote used long before the coming > of WSGI > (see http://www.quixote.ca/learn/1 "How Quixote Works"). This a fair comparison and you could also note similarities with

Re: Pipelining tar create and tar extract the "Python" way...

2009-09-25 Thread Ishwor Gurung
Ray. Hi >> >   tar cvf - SrcDir | (cd /dest ; tar xvf -) Check this out Ray if you haven't done it already http://docs.python.org/library/tarfile.html " The tarfile module makes it possible to __read__ and write tar archives, including those using gzip or bz2 compression. " Try breaking it up the

Re: Most "active" coroutine library project?

2009-09-25 Thread Simon Forman
On Fri, Sep 25, 2009 at 11:42 AM, Grant Edwards wrote: > On 2009-09-25, Piet van Oostrum wrote: >>> exar...@twistedmatrix.com (e) wrote: >> >>>e> I specifically left out all "yield" statements in my version, since that's >>>e> exactly the point here. :)  With "real" coroutines, they're not ne

Re: New books: Learning Python, Python Pocket Reference 4th Eds

2009-09-25 Thread Ishwor Gurung
Thanks Mark. 2009/9/26 Mark Lutz : > I'm happy to announce new, 4th editions of the O'Reilly books > Learning Python and Python Pocket Reference. [] It was pleasant and such a fun going through LP(2nd ed for me). Python Cook book was a nice complement too. I miss those days when I hurriedly

ANN: agenda2pdf v1.0

2009-09-25 Thread Iñigo Serna
Hi, I'm proud to present you "agenda2pdf". This is a simple script which generates a book agenda file in PDF format, ready to be printed or loaded on an ebook reader. You can choose among different sections. Each section have pdf links to other parts of the agenda. I've created it for using with

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Daniel S. Braz
Yes, it work with any command that you can run on a shell. You could write a shell script to "tell" to checkinstall what to do with your program. I used to use it with java programs. I will send to your e-mail a simple sample script, so you will see how it's work. (sorry for my -- very -- b

Re: importing with .m instead of .py

2009-09-25 Thread Ishwor Gurung
Wanderer Hi Refer to http://docs.python.org/tutorial/modules.html#the-module-search-path. Particularly- " When a module named spam is imported, the interpreter searches for a file named spam.py in the current directory, and then in the list of directories specified by the environment variable PYTH

Re: Crypto and export laws

2009-09-25 Thread M.-A. Lemburg
Piet van Oostrum wrote: >> "M.-A. Lemburg" (M-L) wrote: > >> M-L> Depending on how close a country follows the Wassenaar >> M-L> Arrangement (http://www.wassenaar.org/) OpenSSL, Python >> M-L> and all other open-source software falls under the >> M-L> GENERAL SOFTWARE NOTE part 2.: > >> M-L>

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Olof Bjarnason
2009/9/25 Daniel S. Braz : > Hi, > > To create a .deb file you may use checkinstall, it's very simple and work > very well. Hi Daniel, >From what I gather browsing the web abount checkinstall, it seems to be built with "make install" in mind. Does it work with "python setup.py install" too? > >

Re: Pipelining tar create and tar extract the "Python" way...

2009-09-25 Thread Ray Van Dolson
On Wed, Sep 23, 2009 at 04:22:36PM -0700, Ray Van Dolson wrote: > On Wed, Sep 23, 2009 at 03:52:11PM -0700, Ray Van Dolson wrote: > > Hi all; > > > > In the land'o'shell, I can do something like the following: > > > > tar cvf - SrcDir | (cd /dest ; tar xvf -) > > > > Bad form replying to my o

Re: Most "active" coroutine library project?

2009-09-25 Thread Grant Edwards
On 2009-09-25, Piet van Oostrum wrote: >> exar...@twistedmatrix.com (e) wrote: > >>e> I specifically left out all "yield" statements in my version, since that's >>e> exactly the point here. :) With "real" coroutines, they're not necessary - >>e> coroutine calls look just like any other call.

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Daniel S. Braz
Hi, To create a .deb file you may use checkinstall, it's very simple and work very well. Em 25/09/2009, às 03:15, Olof Bjarnason escreveu: Hi! I write small games in Python/PyGame. I want to find a way to make a downloadable package/installer/script to put on my webpage, especially for Ubu

New books: Learning Python, Python Pocket Reference 4th Eds

2009-09-25 Thread Mark Lutz
I'm happy to announce new, 4th editions of the O'Reilly books Learning Python and Python Pocket Reference. These new editions have been thoroughly updated and expanded to cover both Python 3.1 and 2.6, and fully present features that appear in each Python line. Whether you're using Python 2.X, us

Re: importing with .m instead of .py

2009-09-25 Thread Cesar Koers
Wanderer wrote: I would like to import Matlab/Octave files of the .m sort into Python that look like this. # comment y=[1,2,3,4,5\ ,6,7,8,9]; # comment The only problem is I have to change the extensions from .m to .py. Is there a way to get python to import files that don't end in .py? Thank

Re: Most "active" coroutine library project?

2009-09-25 Thread Michele Simionato
On Sep 23, 11:53 pm, exar...@twistedmatrix.com wrote: > I specifically left out all "yield" statements in my version, since > that's exactly the point here. :)  With "real" coroutines, they're not > necessary - coroutine calls look just like any other call. Personally, I like the yield. I understa

ANNOUNCE libmsgque 3.5, ANNOUNCE (P)rogramming (L)anguage (M)icro(K)ernel 1.0

2009-09-25 Thread Andreas Otto
Dear Users; this is the ANNOUNCEMENT of: libmsgque 3.5 and the *first* public ANNOUNCEMENT of the: (P)rogramming (L)anguage (M)icro(K)ernel 1.0 libmsgque 3.5 = LibMsgque is an OS independent, programming language independent, and hardware independent

Re: [Python-Dev] surprised to "++" and "--"

2009-09-25 Thread Gary Herron
(Moving this to python-list where it should have been in the first place).) As pointed out, var++ and var-- are syntax errors, however several similar expressions are legal. These, however, are not interpreted as the C++ increment and decrement operators, but rather as a binary operator follo

Re: Most "active" coroutine library project?

2009-09-25 Thread Piet van Oostrum
> exar...@twistedmatrix.com (e) wrote: >e> I specifically left out all "yield" statements in my version, since that's >e> exactly the point here. :) With "real" coroutines, they're not necessary - >e> coroutine calls look just like any other call. With Python's enhanced >e> generators, they

Re: IDE for python similar to visual basic

2009-09-25 Thread Dave Angel
Threader Slash wrote: -- Forwarded message -- From: J Sisson To: Nobody Date: Thu, 24 Sep 2009 19:18:03 -0500 Subject: Re: IDE for python similar to visual basic On Sun, Sep 13, 2009 at 6:25 AM, Nobody wrote: On Fri, 11 Sep 2009 05:27:59 -0700, r wrote:

importing with .m instead of .py

2009-09-25 Thread Wanderer
I would like to import Matlab/Octave files of the .m sort into Python that look like this. # comment y=[1,2,3,4,5\ ,6,7,8,9]; # comment The only problem is I have to change the extensions from .m to .py. Is there a way to get python to import files that don't end in .py? Thank you -- http://mai

Re: is this whiff/wsgi claim true?

2009-09-25 Thread Michele Simionato
On Sep 25, 4:26 pm, Aaron Watters wrote: > Hi folks.  I just modified the WHIFF concepts index page > >    http://aaron.oirt.rutgers.edu/myapp/docs/W1000.concepts > > To include the following paragraph with a startling and arrogant > claim in the final sentence :) > > """ > Developers build WHIFF

is this whiff/wsgi claim true?

2009-09-25 Thread Aaron Watters
Hi folks. I just modified the WHIFF concepts index page http://aaron.oirt.rutgers.edu/myapp/docs/W1000.concepts To include the following paragraph with a startling and arrogant claim in the final sentence :) """ Developers build WHIFF applications much like they build static web content, PH

Re: Most "active" coroutine library project?

2009-09-25 Thread Grant Edwards
On 2009-09-25, Hendrik van Rooyen wrote: > On Thursday, 24 September 2009 15:42:36 Antoine Pitrou wrote: >> Grant Edwards invalid.invalid> writes: >> > Back when I worked on one of the first hand-held cellular >> > mobile phones, it used co-routines where the number of >> > coroutines was fixed a

Twisted PB: returning result as soon as ready

2009-09-25 Thread jacopo
In the following chunk of code the CLIENT receives both the results from “compute” at the same time (i.e. when the second one has finished). This way it cannot start “elaborateResult” on the first result while the SERVER is still running the second “compute”. How could I get the first result as soo

Re: Crypto and export laws

2009-09-25 Thread Ben Finney
Piet van Oostrum writes: > But Python is not in the public domain. Open source != public domain. One always needs to be aware of what bizarro-world definitions these legalese documents are using for terms we might normally understand. However, in this case it seems fairly sane and : GTN "In

Re: Crypto and export laws

2009-09-25 Thread Piet van Oostrum
> Ben Finney (BF) wrote: >BF> Piet van Oostrum writes: >>> But Python is not in the public domain. Open source != public domain. >BF> One always needs to be aware of what bizarro-world definitions these >BF> legalese documents are using for terms we might normally understand. >BF> However,

ANN: Albow 2.1

2009-09-25 Thread Greg Ewing
ALBOW - A Little Bit of Widgetry for PyGame Version 2.1 is now available. http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/ Highlights of this version: * OpenGL faciliites * Music facilities * Drop-down menus and menu bars What is Albow? Albow is a library for creating GUIs u

Re: Intercepting binding?

2009-09-25 Thread Carl Banks
On Sep 24, 5:39 am, andrew cooke wrote: > It's significant, depressing, and not at all surprising that every > person who replied to this thread told me, in one way or another, that > was I was asking was wrong or impossible or foolhardy. People on this list are volunteers, who have no obligation

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Paul Rudin
Ben Finney writes: > Olof Bjarnason writes: > >> Most tutorials on the web still (I've read mostly Ubuntu-related >> forums) mention apt-get; seems like an error? > > Not quite an error (since ‘apt-get’ continues to work), just habit of > old-timers, and cargo-cult administration by newcomers.

Re: Poll: Do you use csv.Sniffer?

2009-09-25 Thread nn
On Sep 24, 10:26 pm, s...@pobox.com wrote: > If you are a csv module user, I have a question for you:  Do you use the > csv.Sniffer class? > >     o Yes, frequently >     o Yes, on occasion >     o I tried it a few times but don't use it now >     o No, I don't need it >     o No, never heard of it

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Ben Finney
Olof Bjarnason writes: > Most tutorials on the web still (I've read mostly Ubuntu-related > forums) mention apt-get; seems like an error? Not quite an error (since ‘apt-get’ continues to work), just habit of old-timers, and cargo-cult administration by newcomers. -- \“Science

Re: Format string with single quotes in it

2009-09-25 Thread Jon Clements
On 25 Sep, 13:42, Bahadir wrote: > Hi there, > > My question is simple, but I've been spending some hours over the web > and still struggling to get this right: How do I format a string that > contains single quotes in it? > > I am reading a file with lines of the form: > > CONT%d_VIRTMEM_REGIONS

IDE for python similar to visual basic

2009-09-25 Thread Threader Slash
> -- Forwarded message -- > From: J Sisson > To: Nobody > Date: Thu, 24 Sep 2009 19:18:03 -0500 > Subject: Re: IDE for python similar to visual basic > > > On Sun, Sep 13, 2009 at 6:25 AM, Nobody wrote: > >> On Fri, 11 Sep 2009 05:27:59 -0700, r wrote: >> > > >> > Sounds like "s

Re: Format string with single quotes in it

2009-09-25 Thread Mark Tolonen
"Bahadir" wrote in message news:65b6ce03-62c7-4e56-a746-d85ce87ad...@l31g2000vbp.googlegroups.com... Hi there, My question is simple, but I've been spending some hours over the web and still struggling to get this right: How do I format a string that contains single quotes in it? I am readin

Re: Format string with single quotes in it

2009-09-25 Thread Xavier Ho
On Fri, Sep 25, 2009 at 10:42 PM, Bahadir wrote: > Hi there, > > My question is simple, but I've been spending some hours over the web > and still struggling to get this right: How do I format a string that > contains single quotes in it? > I don't know what you're doing wrong, but I've tried bo

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Olof Bjarnason
2009/9/25 Ben Finney : > Olof Bjarnason writes: > >>   - any geeks visiting my blog that are non-Ubuntu (i'll just provide >> the source code and tell them to apt-get python-pygame) > > Note that for several years now the recommended command-line tool for > package installation is not ‘apt-get’, b

Re: Crypto and export laws

2009-09-25 Thread Mel
Piet van Oostrum wrote: >> "M.-A. Lemburg" (M-L) wrote: [ ... ] >>M-L> """ >>M-L> The Lists do not control "software" which is either: >>M-L> 1. ... >>M-L> 2. "In the public domain". >>M-L> """ [ ... ] > But Python is not in the public domain. Open source != public domain. > Public domain mea

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Ben Finney
Olof Bjarnason writes: > - any geeks visiting my blog that are non-Ubuntu (i'll just provide > the source code and tell them to apt-get python-pygame) Note that for several years now the recommended command-line tool for package installation is not ‘apt-get’, but ‘aptitude’ [0]. Compatible com

Format string with single quotes in it

2009-09-25 Thread Bahadir
Hi there, My question is simple, but I've been spending some hours over the web and still struggling to get this right: How do I format a string that contains single quotes in it? I am reading a file with lines of the form: CONT%d_VIRTMEM_REGIONS 'Container %d number of virtual regions' and tr

Re: PExpect on Windows System Using Cygwin

2009-09-25 Thread Kevin Holleran
On Fri, Sep 25, 2009 at 6:09 AM, Dave Angel wrote: > Sean DiZazzo wrote: > >> On Sep 24, 4:37 pm, Dave Angel wrote: >> >> >>> >>> Why not just use the subprocess module? It's built into the Windows >>> distribution, and doesn't need cygwin. >>> >>> DaveA >>> >>> >> >> Can subprocess

Re: Crypto and export laws

2009-09-25 Thread Piet van Oostrum
> "M.-A. Lemburg" (M-L) wrote: >M-L> Depending on how close a country follows the Wassenaar >M-L> Arrangement (http://www.wassenaar.org/) OpenSSL, Python >M-L> and all other open-source software falls under the >M-L> GENERAL SOFTWARE NOTE part 2.: >M-L> """ >M-L> The Lists do not control "so

Re: Evaluate coding and style

2009-09-25 Thread Jean-Michel Pichavant
Rhodri James wrote: On Thu, 24 Sep 2009 21:11:36 +0100, Brown, Rodrick wrote: I recently started playing with Python about 3 days now (Ex Perl guy) and wanted some input on style and structure of what I'm doing before I really start picking up some bad habits here is a simple test tool I w

Re: problems trying to build python 2.6 as a shared library

2009-09-25 Thread Christian Heimes
Marco Nawijn wrote: > The dynamic loader cannot find the python shared library. There are > at least 2 options: > 1. Add path that contains the shared library to the > LD_LIBRARY_PATH environment variable. In a bash shell this can be > accomplished by: export LD_LIBRARY_PATH=/path/to/python_s

  1   2   >