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

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

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: 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

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 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 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: 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

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: 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

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: 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

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 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: [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(

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: 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

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: 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: 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 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: 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

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: 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

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 >

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: 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

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: 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 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 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

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 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-

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 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: 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 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: 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: Most "active" coroutine library project?

2009-09-25 Thread Hendrik van Rooyen
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 at 2 (one for each register set in a Z80 > > CPU)

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Javier Collado
Hello, I recommend you to check this: https://wiki.ubuntu.com/PackagingGuide/Complete The best way to release the software to Ubuntu users is by means of a PPA (https://help.launchpad.net/Packaging/PPA) so that people can track your application updates automatically. Before the PPA is created you

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Donn
On Friday 25 September 2009 08:15:18 Olof Bjarnason wrote: > Does anyone have any hint on a more economic way of creating > single-file distribution packages You could use distutils (setup.py) and include a readme that explains what apt-get commands to use to install pygame, etc. Generally it's be

Re: DBHandler class for logging?

2009-09-25 Thread Nebur
With a similar requirement, I made a small logging tool (usable as handler) which logs into nearly every DB (including Postgres - thanks to the SQLAlchemy library.) It has BSD license. You may use it (or parts of the code): http://www.reifenberg.de/rrlog/ (It does some more things you may not need,

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Jean Daniel
Maybe the distutils list is more adapted for this question: The Zope community uses zc.sourcerelease to build rpm http://www.mail-archive.com/distutils-...@python.org/msg06599.html Buildout is said to have undocumented features to build packages. Tarek Ziade is working debian package with 'distr

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Olof Bjarnason
2009/9/25 Jean Daniel : > Maybe the distutils list is more adapted for this question: Yes > > The Zope community uses zc.sourcerelease to build rpm > http://www.mail-archive.com/distutils-...@python.org/msg06599.html > > Buildout is said to have undocumented features to build packages. > > Tarek

Re: Read header and data from a binary file [LONG]

2009-09-25 Thread Gabriel Genellina
En Tue, 22 Sep 2009 18:18:16 -0300, Jose Rafael Pacheco escribió: Hello, I want to read from a binary file called myaudio.dat Then I've tried the next code: import struct name = "myaudio.dat" f = open(name,'rb') f.seek(0) chain = "< 4s 4s I 4s I 20s I I i 4s I 67s s 4s I" s = f.read(4*1+4*1

Re: Poll: Do you use csv.Sniffer?

2009-09-25 Thread Tim Chase
Why do you need the sniffer? If your client can't do "save as" the same way twice, just read the spreadsheets directly! If I only had one contact and one client, it would be this easy...If you can get multiple points of contact at multiple client sites to reliably & competently agree on a form

Python und Referenzen auf Variablen?

2009-09-25 Thread Torsten Mohr
Hallo, ich möchte im Speicher eine verschachtelte Struktur aufbauen in der dict()s und list()s verwendet werden und tief ineinander verschachtelt sind. D.h. mehrere lists und dicts können jeweils wieder lists und dicts enthalten. Ich möchte als Einträge hauptsächlich int, float und string verwen

Re: Python und Referenzen auf Variablen?

2009-09-25 Thread Martin
Hi, this list is english only. I won't translate for you as I think you wouldn't be happy with it - as you can't read the recommendations - if you don't speak english. In that case you might want to try python...@python.net) (die Liste ist eigentlich nur english, ich übersetze das mal nicht, da d

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Ben Finney
Olof Bjarnason writes: > 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 Ubuntu users. As a program developer, you should be less concerned with the specifics of any particular distribution, and a

lxml and xmlsec

2009-09-25 Thread Roland Hedberg
Hi! Anyone know if it is possible to use xmlsec together with lxml ? -- Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Crypto and export laws

2009-09-25 Thread M.-A. Lemburg
Austin Bingham wrote: > I'm trying to get a handle on how python intersects with > crypto-related export control laws in the US and elsewhere. My current > understanding, per the PSF's wiki, is that any crypto related and > potentially export-sensitive code is in the ssl wrapper, and that, in > fac

Re: iterate over list while changing it

2009-09-25 Thread Warpcat
iterate over a copy of the list: for i, x in enumerate(a[:]): Always worked for me ;) -- http://mail.python.org/mailman/listinfo/python-list

can i use the browser to show the result of python

2009-09-25 Thread Hacken
I have write some python script i want to use browser(IE or FF) to call it, an show the returns! how to? -- http://mail.python.org/mailman/listinfo/python-list

Re: Poll: Do you use csv.Sniffer?

2009-09-25 Thread John Machin
On 25/09/2009 7:04 PM, Tim Chase wrote: Why do you need the sniffer? If your client can't do "save as" the same way twice, just read the spreadsheets directly! If I only had one contact and one client, it would be this easy...If you can get multiple points of contact at multiple client sites t

Re: Date using input

2009-09-25 Thread Dave Angel
flebber.c...@gmail.com wrote: I don't think I am using re.compile properly, but thought as this would make my output an object it would be better for later, is that correct? #Obtain date def ObtainDate(date): date = raw_input("Type Date dd/mm/year: ") re.split('[/]+', date) date year = date[-1

Re: Finding application data after install - a solution?

2009-09-25 Thread Wolodja Wentland
On Fri, Sep 25, 2009 at 02:24 -0300, Gabriel Genellina wrote: > En Thu, 24 Sep 2009 08:21:59 -0300, Wolodja Wentland > >How do *you* deal with application data in your programs? Is there a way > >that works on as many platforms as possible? > On linux, using a configuration file like /etc/fooappli

Re: PExpect on Windows System Using Cygwin

2009-09-25 Thread Dave Angel
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 pass things like passwords to running processes like pexpect can? ~Sean I don't kn

Re: can i use the browser to show the result of python

2009-09-25 Thread Dave Angel
Hacken wrote: I have write some python script i want to use browser(IE or FF) to call it, an show the returns! how to? You don't say much about your environment, nor the nature of your script. So my response will be very generic. If your script writes a valid html/xml/xhtml format to st

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Paul Boddie
On 25 Sep, 08:15, Olof Bjarnason wrote: > 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 Ubuntu users. > > I've skimmed a couple of tutorials on how to generate .deb-files, but, > wow, it's

problems trying to build python 2.6 as a shared library

2009-09-25 Thread Chris Withers
Hi All, I'm trying to build Python 2.6 as a shared library, so I did: ./configure --enable-shared make make altinstall No obvious signs of failure, but when I try and use the resulting python, I get: python2.6: error while loading shared libraries: libpython2.6.so.1.0: cannot open sha

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Olof Bjarnason
2009/9/25 Paul Boddie : > On 25 Sep, 08:15, Olof Bjarnason wrote: >> 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 Ubuntu users. >> >> I've skimmed a couple of tutorials on how to gene

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Paul Boddie
On 25 Sep, 09:26, Donn wrote: > > You could use distutils (setup.py) and include a readme that explains what > apt-get commands to use to install pygame, etc. Generally it's better to *not* > include the kitchen-sink with your apps; rather expect the user to have those > libraries already or be ab

Re: Distributing Python-programs to Ubuntu users

2009-09-25 Thread Olof Bjarnason
2009/9/25 Paul Boddie : > On 25 Sep, 09:26, Donn wrote: >> >> You could use distutils (setup.py) and include a readme that explains what >> apt-get commands to use to install pygame, etc. Generally it's better to >> *not* >> include the kitchen-sink with your apps; rather expect the user to have

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

2009-09-25 Thread Marco Nawijn
On Sep 25, 1:08 pm, Chris Withers wrote: > Hi All, > > I'm trying to build Python 2.6 as a shared library, so I did: > >    ./configure --enable-shared >    make >    make altinstall > > No obvious signs of failure, but when I try and use the resulting > python, I get: > > python2.6: error while l

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

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: 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: 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

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: 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

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 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: 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: 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

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 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

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: 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 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: 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

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: 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,

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

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: 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

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

  1   2   >