Python-URL! - weekly Python news and links (May 5)

2009-05-06 Thread Gabriel Genellina
QOTW: ... [S]omebody's gotta put up some resistance to cute shortcuts, or we'll find ourselves back with Perl. - Peter Pearson http://groups.google.com/group/comp.lang.python/msg/2ce1b43e4d40528f How much memory occupies an object?

SQLObject 0.10.5

2009-05-06 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.10.5, a minor bugfix release of 0.10 branch of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

SQLObject 0.9.10

2009-05-06 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.9.10, a minor bugfix release of 0.9 branch of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

sqlparse 0.1.1 released

2009-05-06 Thread Andi Albrecht
I'm happy to announce sqlparse 0.1.1. sqlparse is a non-validating SQL parser module. Download: http://python-sqlparse.googlecode.com/files/sqlparse-0.1.1.tar.gz This is a bug fix release. Changes since 0.1.0 * Lexers preserves original line breaks (issue1). * Improved identifier parsing:

[RELEASED] Python 3.1 beta 1

2009-05-06 Thread Benjamin Peterson
On behalf of the Python development team, I'm thrilled to announce the first and only beta release of Python 3.1. Python 3.1 focuses on the stabilization and optimization of features and changes Python 3.0 introduced. For example, the new I/O system has been rewritten in C for speed. File

Re: list comprehension question

2009-05-06 Thread alex23
On May 6, 2:10 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: It's precisely the indentation and colons (plus newlines) that makes nested for-loops easier to read than list-comps with multiple fors. You can get back *nearly* all the readability by splitting the list comp

Re: Self function

2009-05-06 Thread Arnaud Delobelle
On May 5, 10:20 pm, Aaron Brady castiro...@gmail.com wrote: def auto( f ):     def _inner( *ar, **kw ):         return f( _inner, *ar, **kw )     return _inner Quoting myself near the start of this thread: Here's an idea: def bindfunc(f): ... def boundf(*args, **kwargs): ...

Re: Code works fine except...

2009-05-06 Thread MRAB
John Yeung wrote: On May 5, 11:37 pm, Ross ross.j...@gmail.com wrote: On May 5, 10:33 am, MRAB goo...@mrabarnett.plus.com wrote: Here's my approach (incomplete): FYI... I was testing your code further and discovered a strange outcome... when there are 16 people for 7 courts, every 7th round

Re: Cannot start a thread in atexit callback

2009-05-06 Thread Graham Dumpleton
On May 6, 3:18 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 05 May 2009 23:52:25 -0300, Zac Burns zac...@gmail.com escribió: It seems that one cannot start a thread in an atexit callback. My use case is that I have a IO heavy callback that I want to run in a thread so that

Pybuez Client sending messages to j2me Server

2009-05-06 Thread CkurtM
I have a problem with recieving requests on j2me based bluetooth server using RFCOMM. I can send messages from the j2me client to python server, but cant receive from the python bluetooth client to j2me server, it only connects but doesnt receive??.I can send copy of code on request. I'm using

Re: Which one is best Python or Java for developing GUI applications?

2009-05-06 Thread Tim Rowe
2009/5/6 Dennis Lee Bieber wlfr...@ix.netcom.com: (the near is because I feel Ada is stricter than any other language) Try SPARK -- it's Ada based, but /much/ stricter. It's just right for some really critical stuff, but is no sort of an answer to Which one is best Python or Java for

Re: thc v0.3 - txt to html converter - better code?

2009-05-06 Thread Richard Brodie
Stefan Behnel stefan...@behnel.de wrote in message news:4a008996$0$31862$9b4e6...@newsspool3.arcor-online.net... language_map = {'English': 'EN', 'Deutsch': 'DE'} strict_or_transitional = {True: 'Transitional', False: 'Strict'} # this will raise a KeyError for unknown languages

Re: desperately looking for a howto on running my wxPython app on Vista

2009-05-06 Thread Paul Sijben
Mike Driscoll wrote: Hmmm...I'm not familiar with that DLL, but a little googling seems to indicate that you may be able to get it off your installation CD: it actually is there on my system. So this may be the red herring the Dependency Walker FAQ is warning for maybe I should leave

Re: pyc files problem

2009-05-06 Thread Dave Angel
Gabriel Genellina wrote: div class=moz-text-flowed style=font-family: -moz-fixedEn Wed, 06 May 2009 00:43:25 -0300, Mohamed Lrhazi lrh...@gmail.com escribió: My code sends a pointer to a Python function to a C library, using ctypes module. When my program restarts, after a crash or normal

Checking for required arguments when instantiating class.

2009-05-06 Thread Lacrima
Hello! For example I have two classes: class First: def __init__(self, *args, **kwargs): pass class Second: def __init__(self, somearg, *args, **kwargs): self.somearg = somearg How can I test that First class takes 1 required argument and

Re: Checking for required arguments when instantiating class.

2009-05-06 Thread Lacrima
class First:         def __init__(self, *args, **kwargs):                 pass class Second:         def __init__(self, somearg, *args, **kwargs):                 self.somearg = somearg How can I test that First class takes 1 required argument and Second class takes no required

Re: what's the best way to call a method of object without a guarantee of its existence

2009-05-06 Thread Marco Mariani
Leon wrote: So I need to go back to the module including parent class to define the objects that I maybe use in future as None, You can assign them to a placeholder, with a method that always exists but does nothing. class NullObject(object): def method(self, *args, **kw): pass

Re: Checking for required arguments when instantiating class.

2009-05-06 Thread Chris Rebert
On Wed, May 6, 2009 at 3:08 AM, Lacrima lacrima.ma...@gmail.com wrote: Hello! For example I have two classes: class First:        def __init__(self, *args, **kwargs):                pass class Second:        def __init__(self, somearg, *args, **kwargs):                self.somearg =

Re: object query assigned variable name?

2009-05-06 Thread Sion Arrowsmith
John O'Hagan resea...@johnohagan.com wrote: I guess what I meant was that if I type: brian = Brian() in the python shell and then hit return, it seems to me that _somewhere_ (in the interpreter? I have no idea how it's done) it must be written that the new Brian object will later be assigned

Re: Checking for required arguments when instantiating class.

2009-05-06 Thread Lie Ryan
Lacrima wrote: class First: def __init__(self, *args, **kwargs): pass class Second: def __init__(self, somearg, *args, **kwargs): self.somearg = somearg How can I test that First class takes 1 required argument and Second class takes no

Re: Self function

2009-05-06 Thread Lie Ryan
Luis Zarrabeitia wrote: Btw, is there any way to inject a name into a function's namespace? Following the python tradition, maybe we should try to create a more general solution! How about a mechanism to pass arguments that are optional to accept? So (in the general case) the caller can call

Re: object query assigned variable name?

2009-05-06 Thread Piet van Oostrum
John O'Hagan resea...@johnohagan.com (JO) wrote: JO I guess what I meant was that if I type: JO brian = Brian() JO in the python shell and then hit return, it seems to me that JO _somewhere_ (in the interpreter? I have no idea how it's done) it JO must be written that the new Brian object will

Re: Install Python 3.0 dmg to macos 10.5

2009-05-06 Thread Diez B. Roggisch
silverburgh wrote: Hi, If I install python 3.0 dmg, will it wipe out the existing python installation on macos 10.5 (i don't know how the original python was installed ( i think it is version 2.5). No. The original is under /System/Library/Frameworks/Python.framework (and should be kept

Re: Checking for required arguments when instantiating class.

2009-05-06 Thread Piet van Oostrum
Lacrima lacrima.ma...@gmail.com (L) wrote: L Hello! L For example I have two classes: class First: L def __init__(self, *args, **kwargs): L pass class Second: L def __init__(self, somearg, *args, **kwargs): L self.somearg = somearg L How can I test that First

Re: Checking for required arguments when instantiating class.

2009-05-06 Thread Chris Rebert
On Wed, May 6, 2009 at 5:24 AM, Piet van Oostrum p...@cs.uu.nl wrote: Lacrima lacrima.ma...@gmail.com (L) wrote: L Hello! L For example I have two classes: class First: L     def __init__(self, *args, **kwargs): L             pass class Second: L     def __init__(self, somearg, *args,

Re: Self function

2009-05-06 Thread Aaron Brady
On May 6, 2:23 am, Arnaud Delobelle arno...@googlemail.com wrote: On May 5, 10:20 pm, Aaron Brady castiro...@gmail.com wrote: def auto( f ):     def _inner( *ar, **kw ):         return f( _inner, *ar, **kw )     return _inner Quoting myself near the start of this thread: Here's an

Re: Self function

2009-05-06 Thread Aaron Brady
On May 6, 6:49 am, Lie Ryan lie.1...@gmail.com wrote: Luis Zarrabeitia wrote: Btw, is there any way to inject a name into a function's namespace? Following the python tradition, maybe we should try to create a more general solution! How about a mechanism to pass arguments that are

Re: object query assigned variable name?

2009-05-06 Thread Aaron Brady
On May 6, 12:56 am, John O'Hagan resea...@johnohagan.com wrote: On Tue, 5 May 2009, Sion Arrowsmith wrote: John O'Hagan  resea...@johnohagan.com wrote: I can see that it's tantalizing, though, because _somebody_ must know about the assignment; after all, we just executed it! Except we

Separate Windows versions of Python

2009-05-06 Thread OldGrantonian
I use Windows Vista Home Premium. I have Python 2.6 currently installed. I'm not a techy. I want to use virtualenv. When I try to install the latest version of virtualenv for Windows, I get the message that Python 2.5 is not found. How do I install Python 2.5 (or anything else except 2.6) so

pyinstaller and logging

2009-05-06 Thread Mike
Pyinstaller seems to have a problem with logging ... I installed pyinstaller 1.3 - using it together with Python 2.6. I used pyinstaller for a small project, the created .exe worked fine. After some additional changes to my project I got strange run time errors when running the .exe (but no

Re: problem in using sendmail in multi thread

2009-05-06 Thread Jean-Paul Calderone
On Tue, 5 May 2009 22:17:35 -0700 (PDT), gganesh ganesh@gmail.com wrote: On May 5, 9:25 pm, Piet van Oostrum p...@cs.uu.nl wrote: gganesh ganesh@gmail.com (g) wrote: g hi, g I'm a beginner in using Python script g I'm trying to send mails using multi-thread g I wrote g FROM =

Control a process interactively (pexpect) and save data

2009-05-06 Thread Piotrek G.
Hi, I'm trying to use something like pexpect.interact() but I want to save all my inputs and save all outputs from the process (/bin/sh Linux). The main goal is to record all sequence of commands and responses in order to automatically generate pexpect script. My script is like below so far,

Re: python docs for beginner programmer?

2009-05-06 Thread Aahz
In article 81f82d8c-80fa-4ba0-a402-3a8b5757a...@s16g2000vbp.googlegroups.com, Deep_Feelings doctore...@gmail.com wrote: anyone did that ? learning from python docs straight away ? Yes. Admittedly that was ten years ago and the docs have improved some since then -- Aahz

Re: list comprehension question

2009-05-06 Thread Boris Borcic
Ross wrote: If I have a list of tuples a = [(1,2), (3,4), (5,6)], and I want to return a new list of each individual element in these tuples, I can do it with a nested for loop but when I try to do it using the list comprehension b = [j for j in i for i in a], my output is b = [5,5,5,6,6,6]

Re: pyc files problem

2009-05-06 Thread Scott David Daniels
Dave Angel wrote: Gabriel Genellina wrote: ... 06 May 2009 00:43:25 -0300, Mohamed Lrhazi lrh...@gmail.com escribió: My code sends a pointer to a Python function to a C library, using ctypes module. When my program restarts, after a crash or normal exit... it cannot start again without

Re: python docs for beginner programmer?

2009-05-06 Thread Michele Simionato
On May 5, 10:37 pm, Deep_Feelings doctore...@gmail.com wrote: that is good ,thank you anyone did that ? learning from python docs straight away ? A lot of people did. I did, but I usually prefer reading user manuals over books, and YMMV. -- http://mail.python.org/mailman/listinfo/python-list

Re: Separate Windows versions of Python

2009-05-06 Thread Scott David Daniels
OldGrantonian wrote: I use Windows Vista Home Premium. I have Python 2.6 currently installed. I'm not a techy. I want to use virtualenv. When I try to install the latest version of virtualenv for Windows, I get the message that Python 2.5 is not found. How do I install Python 2.5 (or anything

Pyhton script to call another program

2009-05-06 Thread Ben Keshet
Hi, I am trying to write a simple python script to manipulate files and call other programs. I have a program installed (rocs) which I run using cygwin on my XP (but is not in python). Can I run the pyhton script and then call the other program in the same script? For example: Python Code

Re: Pyhton script to call another program

2009-05-06 Thread Diez B. Roggisch
Ben Keshet wrote: Hi, I am trying to write a simple python script to manipulate files and call other programs. I have a program installed (rocs) which I run using cygwin on my XP (but is not in python). Can I run the pyhton script and then call the other program in the same script?

Re: pyinstaller and logging

2009-05-06 Thread Vinay Sajip
On May 6, 2:41 pm, Mike tornadoma...@gmx.net wrote: Pyinstaller seems to have a problem withlogging... I installed pyinstaller 1.3 - using it together with Python 2.6. I used pyinstaller for a small project, the created .exe worked fine. After some additional changes to my project I got

Re: thc v0.3 - txt to html converter - better code?

2009-05-06 Thread Florian Wollenschein
Richard Brodie wrote: Stefan Behnel stefan...@behnel.de wrote in message news:4a008996$0$31862$9b4e6...@newsspool3.arcor-online.net... language_map = {'English': 'EN', 'Deutsch': 'DE'} strict_or_transitional = {True: 'Transitional', False: 'Strict'} # this will raise a KeyError for

Re: Separate Windows versions of Python

2009-05-06 Thread OldGrantonian
Many thanks for the very detailed answer :) I will go ahead right now and implement all your suggestions. On May 6, 4:35 pm, Scott David Daniels scott.dani...@acm.org wrote: OldGrantonian wrote: I use Windows Vista Home Premium. I have Python 2.6 currently installed. I'm not a techy.

Re: Problem with case insensitive volumes

2009-05-06 Thread spillz
On May 5, 10:24 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: I use this function on Windows to obtain the true case name of a file: very nice. I think the python bindings to the gnome GIO library *might* provide what I need on the linux side. --

Re: pyinstaller and logging

2009-05-06 Thread Mike
On 6 Mai, 18:14, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On May 6, 2:41 pm, Mike tornadoma...@gmx.net wrote: Pyinstaller seems to have a problem withlogging...  I installed pyinstaller 1.3 - using it together with Python 2.6. I used pyinstaller for a small project, the created .exe

Re: Pyhton script to call another program

2009-05-06 Thread norseman
a dos box!###%*!!!) Python 2.5.1 ... on win32 import os result = os.spawnl( os.P_WAIT, d:\\winmcad\\mcad,) Runs the program mcad. Returns to python when mcad exits. Today: 20090506 Python ver as snippets show. OS is Linux Slackware 10.2 OS is Windows XP Pro Steve -- http://mail.python.org

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Tim Chase
for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to terminate the selection; and selections are blockwise rectangular rather than linewise or

Re: Pyhton script to call another program

2009-05-06 Thread David
Il Wed, 06 May 2009 11:31:58 -0400, Ben Keshet ha scritto: Hi, I am trying to write a simple python script to manipulate files and call other programs. I have a program installed (rocs) which I run using cygwin on my XP (but is not in python). Can I run the pyhton script and then call

hex(dummy)[2:] - issue...

2009-05-06 Thread Florian Wollenschein
Hi there, I need some advice :-) I'm using hex(dummy)[2:] to represent a color in hexadecimal format for the bgcolor in an html file. dummy is the color value in RGB of course... Now, if there's an R, G or B value of zero, this command only prints one single 0 instead of two. What's wrong

IIR filter conversion routines for Python?

2009-05-06 Thread wzab
Hi, I'm looking for procedures converting the IIR filters into cascade and/ or parallel forms. Something like dir2cas.m or dir2par.m known in the Matlab/Octave world. Unfortunately SciPy does not contain such functions. If they are not available, I would be grateful for any hints helping me to

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Shawn Milochik
On Wed, May 6, 2009 at 1:54 PM, Tim Chase python.l...@tim.thechases.com wrote: for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to terminate the

Re: hex(dummy)[2:] - issue...

2009-05-06 Thread MRAB
Florian Wollenschein wrote: Hi there, I need some advice :-) I'm using hex(dummy)[2:] to represent a color in hexadecimal format for the bgcolor in an html file. dummy is the color value in RGB of course... Now, if there's an R, G or B value of zero, this command only prints one single 0

Re: Iphone Going 3G!

2009-05-06 Thread stermen
Notebooks stocks priced http://rover.ebay.com/rover/1/711-53200-19255-0/1?type=3campid=5336229480toolid=10001customid=ext=notebooksatitle=notebook Shafiq jgk_7...@yahoo.com ha scritto nel messaggio news:4908115...@news.tm.net.my... apalah kau ni tak belajar ke bahasa menunjukkan

Parsing text

2009-05-06 Thread iainemsley
Hi, I'm trying to write a fairly basic text parser to split up scenes and acts in plays to put them into XML. I've managed to get the text split into the blocks of scenes and acts and returned correctly but I'm trying to refine this and get the relevant scene number when the split is made but I

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Grant Edwards
On 2009-05-06, Shawn Milochik sh...@milochik.com wrote: I know I'm coming to the conversation late, but here's what I do*: 1. Use Cygwin. (http://www.cygwin.com/) 2. Use PuttyCYG (http://code.google.com/p/puttycyg/) That way, you can basically use PuTTY to shell into your Windows box.

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Shawn Milochik
On Wed, May 6, 2009 at 2:39 PM, Grant Edwards inva...@invalid wrote: On 2009-05-06, Shawn Milochik sh...@milochik.com wrote: I know I'm coming to the conversation late, but here's what I do*: 1. Use Cygwin. (http://www.cygwin.com/) 2. Use PuttyCYG (http://code.google.com/p/puttycyg/) That

Re: Parsing text

2009-05-06 Thread Shawn Milochik
On Wed, May 6, 2009 at 2:32 PM, iainemsley iainems...@googlemail.com wrote: Hi, I'm trying to write a fairly basic text parser to split up scenes and acts in plays to put them into XML. I've managed to get the text split into the blocks of scenes and acts and returned correctly but I'm trying

Re: Parsing text

2009-05-06 Thread Scott David Daniels
iainemsley wrote: Hi, I'm trying to write a fairly basic text parser to split up scenes and acts in plays to put them into XML. I've managed to get the text split into the blocks of scenes and acts and returned correctly but I'm trying to refine this and get the relevant scene number when the

Re: Parsing text

2009-05-06 Thread MRAB
iainemsley wrote: Hi, I'm trying to write a fairly basic text parser to split up scenes and acts in plays to put them into XML. I've managed to get the text split into the blocks of scenes and acts and returned correctly but I'm trying to refine this and get the relevant scene number when the

Re: Parsing text

2009-05-06 Thread Tim Chase
I'm trying to write a fairly basic text parser to split up scenes and acts in plays to put them into XML. I've managed to get the text split into the blocks of scenes and acts and returned correctly but I'm trying to refine this and get the relevant scene number when the split is made but I keep

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Grant Edwards
On 2009-05-06, Shawn Milochik sh...@milochik.com wrote: That way, you can basically use PuTTY to shell into your Windows box. Better yet, set up sshd in your Cygwin install, and then use whatever terminal you normally use on your Linux/MacOS box to ssh into the Cygwin box. ??When run that

Re: Parsing text

2009-05-06 Thread Stefan Behnel
iainemsley wrote: for scene in text.split('Scene'): num = re.compile(^\s\[0-9, i{1,4}, v], re.I) textNum = num.match(scene) Not related to your problem, but to your code - I'd write this as follows: match_scene_num = re.compile(^\s\[0-9, i{1,4}, v], re.I).match for

Re: Separate Windows versions of Python

2009-05-06 Thread Terry Reedy
Scott David Daniels wrote: On windows, major versions (..., 2.5, 2.6, 2.7, , 3.0, 3.1, ...) can coexist quite successfully. Find and run an installer for the latest version of 2.5 (2.5.4, I believe) on the Python download page. That will make 2.5 your default Python. believe the

Re: fcntl and siginfo_t in python

2009-05-06 Thread Philip
ma mabdelkader at gmail.com writes: Ok! So, I decided to write a C-extension instead of using ctypes... This works beautifully. Now, I want to release this to the public, so I'm thinking of making a bit of code cleanup. Should I just pack the entire siginfo_t struct, right now I just use

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Mensanator
On May 6, 12:54 pm, Tim Chase python.l...@tim.thechases.com wrote: for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to terminate the selection; and

SQLObject 0.10.5

2009-05-06 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.10.5, a minor bugfix release of 0.10 branch of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

SQLObject 0.9.10

2009-05-06 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.9.10, a minor bugfix release of 0.9 branch of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

About ODFPY links

2009-05-06 Thread shruti surve
hey all, For my project, i am using ODFpy open office spreadsheets. I am creating ledgers in python ie.ledger.py. So when i run ledger.py, spreadsheet will be opened in open office. since ledger is made of number of accounts, i am creating multiple tables for all accounts in single spreadsheet.

Re: Code works fine except...

2009-05-06 Thread John Yeung
On May 5, 10:49 am, Ross ross.j...@gmail.com wrote: I'm interested to see what you did. From your description, it sounds like I've tried what you've done, but when I implemented my version, it took minutes to evaluate for bigger numbers. If that isn't the case with yours, I'd be interested in

Re: list comprehension question

2009-05-06 Thread John Yeung
On May 5, 11:36 pm, alex23 wuwe...@gmail.com wrote: Apart from the presence of 'item' at the beginning of the list comprehension as opposed to 'b.append(item)' at the end of the for-loop, how exactly does the listcomp force you to bounce [..] back and forth to follow the logic? It's

Re: list comprehension question

2009-05-06 Thread J Kenneth King
Emile van Sebille em...@fenx.com writes: On 5/5/2009 9:15 AM J Kenneth King said... List comprehensions can make a reader of your code apprehensive because it can read like a run-on sentence and thus be difficult to parse. The Python documentation discourages their use and I believe for

Re: list comprehension question

2009-05-06 Thread Roel Schroeven
John Yeung schreef: Essentially, if you see [B A] over and over and over again, when finally confronted with LCs of more elements, it's not immediately clear that the pattern of increasing nestedness is [B A] = [C A B] = [D A B C] = etc. rather than [B A] = [C B A] = [D C B A] =

[ANN] Completion of The Python Papers Volume 4 Issue 1

2009-05-06 Thread mauricel...@acm.org
Welcome to Issue 4 Volume 1 of The Python Papers. This marks our 4th year in business. It is my pleasure to announce 4 improvements made to The Python Papers Anthology. Firstly, we had created a class of editorial members in our team – the Editorial Reviewers (ER). This is in addition to the

Re: Completion of The Python Papers Volume 4 Issue 1

2009-05-06 Thread Maurice Ling
My apologies. It should be Volume 4 Issue 1 instead of Issue 4 Volume 1. Thank you Scott for pointing this out. Regards Maurice On May 6, 10:08 pm, mauricel...@acm.org mauricel...@gmail.com wrote: Welcome to Issue 4 Volume 1 of The Python Papers. This marks our 4th year in business. It is my

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Dave Angel
Tim Chase wrote: div class=moz-text-flowed style=font-family: -moz-fixed for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to terminate the selection;

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Dave Angel
Mensanator wrote: snip And when prompted, do (.) modify shortcut that started this window After which, you can dispense with the menus (except when pasting), just select the text and hit enter. To paste into a DOS box, once Quick Edit is enabled, use Right-Click. They keystrokes will

Re: list comprehension question

2009-05-06 Thread Emile van Sebille
On 5/6/2009 6:48 AM J Kenneth King said... Emile van Sebille em...@fenx.com writes: On 5/5/2009 9:15 AM J Kenneth King said... The Python documentation discourages their use and I believe for good reason. Can you provide a link for this? I'd like to see specifically what's being

Re: Parsing text

2009-05-06 Thread Rhodri James
On Wed, 06 May 2009 19:32:28 +0100, iainemsley iainems...@googlemail.com wrote: Hi, I'm trying to write a fairly basic text parser to split up scenes and acts in plays to put them into XML. I've managed to get the text split into the blocks of scenes and acts and returned correctly but I'm

Re: Self function

2009-05-06 Thread Rhodri James
On Wed, 06 May 2009 04:59:59 +0100, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 05 May 2009 22:35:08 -0300, Rhodri James rho...@wildebst.demon.co.uk escribió: On Tue, 05 May 2009 21:43:16 +0100, bearophileh...@lycos.com wrote: wolfram.hinde...: It is easy to change all

Re: fcntl and siginfo_t in python

2009-05-06 Thread ma
Sure, I'll send you the source files when I get a chance! --Sent from my iPhone On May 6, 2009, at 4:03 PM, Philip phi...@subaru.naoj.org wrote: ma mabdelkader at gmail.com writes: Ok! So, I decided to write a C-extension instead of using ctypes... This works beautifully. Now, I want to

SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-06 Thread J
Hi list, My goals is to have concurrent and separated client sessions using xmlrpc. Initially my though was that SimpleXMLRPCServer was able to create a new object instance for each incoming request. But this doesn't appear to be the case, unless I'm overlooking something, if so please point me

Re: call function of class instance with no assigned name?

2009-05-06 Thread Carl Banks
On May 5, 7:55 pm, Dave Angel da...@ieee.org wrote: George Oliver wrote: On May 5, 11:59 am, Dave Angel da...@ieee.org wrote: 1) forget about getattr() unless you have hundreds of methods in your map.  The real question is why you need two maps. What good is the command string doing you?

Re: Copy Paste in a Dos box (was: Pyhton script to call another program)

2009-05-06 Thread Mensanator
On May 6, 3:46 pm, Dave Angel da...@ieee.org wrote: Mensanator wrote: snip And when prompted, do (.) modify shortcut that started this window After which, you can dispense with the menus (except when pasting), just select the text and hit enter. To paste into a DOS box, once Quick

SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-06 Thread Jelle Smet
Hi list, My goals is to have concurrent and separated client sessions using xmlrpc. Initially my though was that SimpleXMLRPCServer was able to create a new object instance for each incoming request. But this doesn't appear to be the case, unless I'm overlooking something, if so please point me

Re: call function of class instance with no assigned name?

2009-05-06 Thread Carl Banks
On May 5, 12:17 pm, George Oliver georgeolive...@gmail.com wrote: A handler would be something like a key input handler. The key input handler is defined separately from the command handler in the case I want to use a different method of input, for example a mouse or joystick. In the

Re: Code works fine except...

2009-05-06 Thread John Yeung
On May 6, 3:29 am, MRAB goo...@mrabarnett.plus.com wrote: I have the feeling that if the number of rounds is restricted then the difference between the minimum and maximum number of byes could be 2 because of the requirement that players shouldn't play each other more than once, meaning that

Python 2.6 worth the hassle?

2009-05-06 Thread Evan Kroske
I'm planning on learning Python, and I'd like to know which version to start with. I know that Python 3.0 isn't ready for production and it doesn't have enough libraries yet, so I thought I should learn Python 2.6. Unfortunately, installing Python 2.6 on my Linux distro (Ubuntu Intrepid Ibex)

removing row from table. PyQT

2009-05-06 Thread Ani
I'm trying to remove the selected rows from the table, but it's not working, i've tried many ways, don't know what I'm missing. code below: class MonitorUi(QWidget): def __init__(self,parent = None): QWidget.__init__(self,parent) self._initalTable =

Re: Self function

2009-05-06 Thread Luis Alberto Zarrabeitia Gomez
Quoting Rhodri James rho...@wildebst.demon.co.uk: I'm sorry, but while I'm mildly positive towards the proposal (and more so towards Aaron's decorator), I don't buy this argument at all. What is broken about your editor's global search-and-replace function that makes it usually useless

Re: Python 2.6 worth the hassle?

2009-05-06 Thread Terry Reedy
Evan Kroske wrote: I'm planning on learning Python, and I'd like to know which version to start with. I know that Python 3.0 isn't ready for production and it 3.1 will be. The first beta will be out very soon and 3.1 in less than 2 months. doesn't have enough libraries yet, That will

Re: Copy Paste in a Dos box

2009-05-06 Thread norseman
Shawn Milochik wrote: On Wed, May 6, 2009 at 1:54 PM, Tim Chase python.l...@tim.thechases.com wrote: for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to

Re: About ODFPY links

2009-05-06 Thread Terry Reedy
shruti surve wrote: hey all, For my project, i am using ODFpy open office spreadsheets. I am creating ledgers in python ie.ledger.py http://ie.ledger.py. So when i run ledger.py, spreadsheet will be opened in open office. since ledger is made of number of accounts, i am creating multiple

Re: Copy Paste in a Dos box

2009-05-06 Thread norseman
Mensanator wrote: On May 6, 12:54 pm, Tim Chase python.l...@tim.thechases.com wrote: for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to terminate the

Re: Python 2.6 worth the hassle?

2009-05-06 Thread Gary Herron
Evan Kroske wrote: I'm planning on learning Python, and I'd like to know which version to start with. I know that Python 3.0 isn't ready for production and it doesn't have enough libraries yet, so I thought I should learn Python 2.6. Unfortunately, installing Python 2.6 on my Linux distro

Re: SimpleXMLRPCServer and creating a new object on for each new client request.

2009-05-06 Thread Martin P. Hellwig
Jelle Smet wrote: Hi list, My goals is to have concurrent and separated client sessions using xmlrpc. Initially my though was that SimpleXMLRPCServer was able to create a new object instance for each incoming request. But this doesn't appear to be the case, unless I'm overlooking something, if

Re: Copy Paste in a Dos box

2009-05-06 Thread MRAB
Mensanator wrote: On May 6, 3:46 pm, Dave Angel da...@ieee.org wrote: Mensanator wrote: snip And when prompted, do (.) modify shortcut that started this window After which, you can dispense with the menus (except when pasting), just select the text and hit enter. To paste into a DOS box, once

Could this expression parser be more 'Pythonic'?

2009-05-06 Thread Amr
Hello all, I've been spending the last few weeks learning Python, and I've just started to use it to write a simple BASIC compiler. I'm writing a mathematical expression parser and wrote a function that would take a string and split it into high level tokens. The code can be found at

Re: Copy Paste in a Dos box

2009-05-06 Thread norseman
Dave Angel wrote: Tim Chase wrote: div class=moz-text-flowed style=font-family: -moz-fixed for windows this works: (can't cut and paste from a dos box!###%*!!!) Depending on how it was spawned, you can either right-click in the window and choose Mark/Paste (when marking, use enter to

Re: Copy Paste in a Dos box

2009-05-06 Thread Mensanator
On May 6, 6:15 pm, MRAB goo...@mrabarnett.plus.com wrote: Mensanator wrote: On May 6, 3:46 pm, Dave Angel da...@ieee.org wrote: Mensanator wrote: snip And when prompted, do (.) modify shortcut that started this window After which, you can dispense with the menus (except when pasting),

Simple way of handling errors

2009-05-06 Thread TomF
As a relative newcomer to Python, I like it a lot but I'm dismayed at the difficulty of handling simple errors. In Perl if you want to anticipate a file-not-found error you can simply do: open($file) or die(open($file): $!); and you get an intelligible error message. In Python, to get the

How do I escape slashes the string formatting operator? (or: why is it behaving this way?)

2009-05-06 Thread Dustan
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. 'HELP!%(xyz)/' % {'xyz':' PLEASE! '} Traceback (most recent call last): File stdin, line 1, in module ValueError: unsupported format character '/'

  1   2   3   >