[ANN] pyjamas 0.6pre3 released

2009-08-14 Thread Luke Kenneth Casson Leighton
much as we'd very much like to declare a 0.6 stable release, really really soon and move forward, the ChangeLog just keeps growing (133 and counting) with the bugfixes, testing and contributions since 0.5p1. pyjamas is a port of GWT to python, and includes a python-to-javascript compiler and a

ANN: mpmath 0.13 released

2009-08-14 Thread Fredrik Johansson
Hi all, Version 0.13 of mpmath is now available from the website: http://code.google.com/p/mpmath/ It can also be downloaded from the Python Package Index: http://pypi.python.org/pypi/mpmath/0.13 Mpmath is a pure-Python library for arbitrary-precision floating-point arithmetic that implements

[RELEASED] Python 3.1.1 Release Candidate

2009-08-14 Thread Benjamin Peterson
On behalf of the Python development team, I'm pleased to announce the first release candidate of Python 3.1.1. This bug fix release fixes many normal bugs and several critical ones including potential data corruption in the io library. The final version should be out within the next week.

PyCon 2010: Call for Proposals

2009-08-14 Thread Aahz
Call for proposals -- PyCon 2010 -- http://us.pycon.org/2010/ === Due date: October 1st, 2009 Want to showcase your skills as a Python Hacker? Want to have hundreds of people see your talk on the subject of your choice? Have some hot

OptionParser How to: prog cmd [options] [arguments]

2009-08-14 Thread Steven Woody
Hi, I am using OptionParser, but I've not managed figure out a way to support what I wanted command line format prog cmd [options] [arguments]. E.g., svn ls -r123 http://hello.world;. Can I do this using OptionParser? Thanks. -- Life is the only flaw in an otherwise perfect nonexistence --

Re: trouble with reload

2009-08-14 Thread Carl Banks
On Aug 13, 10:36 pm, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: Actually, I've tried both of these, and I get (different) errors in both cases: In [1]: from mymath import * In [2]: reload(mymath) NameError: name 'mymath' is not defined In [3]: reload('mymath') TypeError: reload()

Re: implementing descriptors

2009-08-14 Thread Raymond Hettinger
[David] I am new to Python and I have a question about descriptors.  If I have a class as written below, is there a way to use descriptors to be certain that the datetime in start is always before the one in end? class foo(object):    def __init__(self,a = None,b = None)       self.start =

Re: How to launch a function at regular time intervals ?

2009-08-14 Thread Frank Millman
On Aug 14, 12:52 am, David davig...@googlemail.com wrote: Yes, I guess it would be more simple. Here is really what I am trying to do. I simplified the functions, but the purpose is to write some text in a local file every x seconds (here, I'm just writing the timestamp, i.e. a string

Re: Nice copy in interactive terminal

2009-08-14 Thread casebash
I mainly develop on Linux these days, but if I ever end up doing anything on windows I'll make sure to look at that. On Aug 13, 6:56 pm, Elias Fotinis \(eliasf\) efoti...@y...@h00.com wrote: casebash wrote: I've been wondering for a while if there exists an interactive terminal which has

socket.send : (11, 'Resource temporarily unavailable')

2009-08-14 Thread Gabriel Rossetti
Hello everyone, I get a (11, 'Resource temporarily unavailable') error when I try to send a file using a socket. Is there s size limit? I tried sending a smaller file and ii poses no problem. Am I doing something wrong? Here is the code: def sendMessage(host, port, msg): if

Re: OptionParser How to: prog cmd [options] [arguments]

2009-08-14 Thread Javier Collado
Hello, I think that this isn't possible with optparse library. However, it's possible with argparse (http://code.google.com/p/argparse/): http://argparse.googlecode.com/svn/trunk/doc/other-methods.html#sub-commands It's not a standard library, but it's worth to take a look at it. Best

Re: Plotting Quadratic Functions, pygame

2009-08-14 Thread Esmail
Hello Senad, You might find this style guide useful too in your toolbox of Python skills tricks. http://www.python.org/dev/peps/pep-0008/ This is a great and helpful group of people here, we are lucky to have access to groups like this. Best, Esmail --

Re: Plotting Quadratic Functions, pygame

2009-08-14 Thread Esmail
Hello Senad, You might find this style guide useful too in your toolbox of Python skills tricks. http://www.python.org/dev/peps/pep-0008/ This is a great and helpful group of people here, we are lucky to have access to groups like this. Best, Esmail --

Re: Format Code Repeat Counts?

2009-08-14 Thread jschwab
Thanks all! That was most helpful and informative. Best, Josiah -- http://mail.python.org/mailman/listinfo/python-list

Pygresql, and query meta informations

2009-08-14 Thread durumdara
Hi! Pygresql, DB-API. I search for a solution to get meta information about last query, because I must export these infos to Delphi. Delphi have TDataSet, and it have meta structure that must be defined before I create it. For char/varchar fields I must define their sizes! Pygresql is not

Re: socket.send : (11, 'Resource temporarily unavailable')

2009-08-14 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello everyone, I get a (11, 'Resource temporarily unavailable') error when I try to send a file using a socket. Is there s size limit? I tried sending a smaller file and ii poses no problem. Am I doing something wrong? Here is the code: def sendMessage(host, port,

Re: socket.send : (11, 'Resource temporarily unavailable')

2009-08-14 Thread Hendrik van Rooyen
On Friday 14 August 2009 09:15:34 Gabriel Rossetti wrote: Hello everyone, I get a (11, 'Resource temporarily unavailable') error when I try to send a file using a socket. Is there s size limit? I tried sending a smaller file and ii poses no problem. Am I doing something wrong? Here is the

Re: socket.send : (11, 'Resource temporarily unavailable')

2009-08-14 Thread Hendrik van Rooyen
On Friday 14 August 2009 09:47:50 Gabriel Rossetti wrote: Gabriel Rossetti wrote: 8 -- Actually, the original code didn't have the sock.setblocking(0), the problem I am trying to find is that the server does have sock.setblocking(0) (I can't change

Re: Plotting Quadratic Functions, pygame

2009-08-14 Thread Bearophile
Senad Ibraimoski Of Belgrade: Hello, I'm a new guy to this group, my professor recommend this group to me, because I was boring him with questions.I'm new to python, and I have problem plotting Quadratic Functions. Using module pygame. Python is a tool you use to learn something else, but

Re: trouble with reload

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 13:49:19 +0900, Terry Reedy wrote: Dr. Phillip M. Feldman wrote: According to the Python documentation, 'reload' reloads a previously imported module (so that changes made via an external editor will be effective). But, when I try to use this command, I get the following

Re: Python and behavior

2009-08-14 Thread ryles
On Aug 13, 8:36 pm, goldtech goldt...@worldpost.com wrote: Could you explain or link me to an explanation of this? http://docs.python.org/tutorial/datastructures.html#more-on-conditions Give the whole tutorial a good read. -- http://mail.python.org/mailman/listinfo/python-list

Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Hendrik van Rooyen
In the past, on this group, I have made statements that said that on Linux, the serial port handling somehow does not allow transmitting and receiving at the same time, and nobody contradicted me. I am running into the self same issue again. What I normally do is to open the port like this:

Re: trouble with reload

2009-08-14 Thread Jean-Michel Pichavant
Dr. Phillip M. Feldman wrote: Actually, I've tried both of these, and I get (different) errors in both cases: In [1]: from mymath import * In [2]: reload(mymath) NameError: name 'mymath' is not defined In [3]: reload('mymath') TypeError: reload() argument must be module Please don't top

Re: trouble with reload

2009-08-14 Thread Gabriel Genellina
En Fri, 14 Aug 2009 05:34:52 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: On Fri, 14 Aug 2009 13:49:19 +0900, Terry Reedy wrote: Besides the other answers, do not use reload. It is removed in Py3 because it cannot be made to work as people reasonably expect. That's

Re: OptionParser How to: prog cmd [options] [arguments]

2009-08-14 Thread Carl Banks
On Aug 14, 12:18 am, Javier Collado javier.coll...@gmail.com wrote: 2009/8/14 Steven Woody narkewo...@gmail.com: Hi, I am using OptionParser, but I've not managed figure out a way to support what I wanted command line format prog cmd [options] [arguments]. E.g., svn ls

Re: OptionParser How to: prog cmd [options] [arguments]

2009-08-14 Thread Gabriel Genellina
En Fri, 14 Aug 2009 03:22:49 -0300, Steven Woody narkewo...@gmail.com escribió: I am using OptionParser, but I've not managed figure out a way to support what I wanted command line format prog cmd [options] [arguments]. E.g., svn ls -r123 http://hello.world;. Can I do this using

Re: implementing descriptors

2009-08-14 Thread Jean-Michel Pichavant
Emile van Sebille wrote: On 8/13/2009 3:17 PM dippim said... I am new to Python and I have a question about descriptors. If I have a class as written below, is there a way to use descriptors to be certain that the datetime in start is always before the one in end? class foo(object): def

Re: Python and behavior

2009-08-14 Thread Duncan Booth
MRAB pyt...@mrabarnett.plus.com wrote: Operation Result |x or y| x if x else y |x and y| y if x else x |not x| False if x else False :-) That's not a terribly good definition for the 'not' operator. Try: |not x| False if x else True -- Duncan Booth

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Diez B. Roggisch
Hendrik van Rooyen schrieb: In the past, on this group, I have made statements that said that on Linux, the serial port handling somehow does not allow transmitting and receiving at the same time, and nobody contradicted me. I am running into the self same issue again. What I normally do is

Re: get the pause status from amarok 2.1

2009-08-14 Thread Diez B. Roggisch
Sleepy Cabbage schrieb: As the title says, I'm trying to find a way to get the pause status from amarok 2.1. I'm running kubuntu 9.04 with kde 4.2.2, python 2.6.2. Thanks in advance. Not at my linux-system right now, but dcop and the respective python-module should help. Diez --

Re: need help calculating point between two coordinates.

2009-08-14 Thread Steven D'Aprano
On Thu, 13 Aug 2009 14:26:54 -0700, PeteDK wrote: Hi there I'am working on a route comparison tool for carpools. The route comparison is based on 'steps' retrieved from google maps GDirection. These steps vary in length and i use the coordinates at the beginning of each step. However,

Re: Database query execution times in Python?

2009-08-14 Thread pwnedd
Look up EXPLAIN Thanks for the suggestion. I don't see any option to have EXPLAIN display the query time though? -- View this message in context: http://www.nabble.com/Database-query-execution-times-in-Python--tp24870050p24969867.html Sent from the Python - python-list mailing list archive

Re: How to reset document string

2009-08-14 Thread Anand K Rayudu
Dear Carl, Your ideas are extremely good, and I liked idea 2 especially, based on that I am considering following approach. Eg: let us say I have module named myModule and exposing myModule.myAPI So I will now rename myModule as _myModule and write a python layer with myModule So my python

python-ldap and encodings

2009-08-14 Thread Matias
Hi! I'm using python-ldap to create some entries on my openldap server. The problem is that some of those entries have accented characters and unicode text in general. I'm wondering if there is any example or documentation on how to add or modify ldap objects whose values contains non-ascii

Re: Format Code Repeat Counts?

2009-08-14 Thread MRAB
Scott David Daniels wrote: MRAB wrote: The shortest I can come up with is: [ + ][.join(letters) + ] Maybe a golf shot: ][.join(letters).join([]) Even shorter: [+][.join(letters)+] :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: python-ldap and encodings

2009-08-14 Thread Matias
Matias wrote: Hi! I'm using python-ldap to create some entries on my openldap server. The problem is that some of those entries have accented characters and unicode text in general. I'm wondering if there is any example or documentation on how to add or modify ldap objects whose values

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread greg
Hendrik van Rooyen wrote: port = open(/dev/ttyS0,r+b,0) What I would really like is to have two threads - one that does blocking input waiting for a character, and one that examines an output queue and transmits the stuff it finds. You can't read and write with the same stdio file object

anyone with genomewide microarray analysis experience ?

2009-08-14 Thread trias
Hi, I am trying to analyse some biological data from microarray experiments. Different experiments have been stored in a SQL database. One of the things I would like to do is to fetch all data from a certain distance from gene ATGs say 100+/- bp and calculate the bp average over all genes

Re: anyone with genomewide microarray analysis experience ?

2009-08-14 Thread Jochen Schulz
trias: One of the things I would like to do is to fetch all data from a certain distance from gene ATGs say 100+/- bp and calculate the bp average over all genes over this region. I know absolutely nothing about your problem domain, but if your distance function is metric, you can use

Re: trouble with reload

2009-08-14 Thread Colin J. Williams
Terry Reedy wrote: Dr. Phillip M. Feldman wrote: According to the Python documentation, 'reload' reloads a previously imported module (so that changes made via an external editor will be effective). But, when I try to use this command, I get the following error message: TypeError: reload()

Re: csv.DictWriter.write_header()

2009-08-14 Thread Alan G Isaac
On Aug 13, 1:15 pm, Alan G Isaac alan.is...@gmail.com wrote: I do not understand the reason for your silly, sarcastic response. On 8/13/2009 7:58 AM John Machin apparently wrote: Duck typing: ask a silly question, get a silly answer. Maybe if you learned to be a more generous reader, fewer

Re: implementing descriptors

2009-08-14 Thread dippim
On Aug 14, 5:45 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Emile van Sebille wrote: On 8/13/2009 3:17 PM dippim said... I am new to Python and I have a question about descriptors.  If I have a class as written below, is there a way to use descriptors to be certain that the

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Hendrik van Rooyen
On Friday 14 August 2009 12:54:32 Diez B. Roggisch wrote: How about using pyserial? With that, I never had any problems accessing the the serial ports, and AFAIK no duplex-problems as well. And I seriously doubt that these are a python-related problem - python only has a very thin, direct

Re: implementing descriptors

2009-08-14 Thread Diez B. Roggisch
dippim schrieb: On Aug 14, 5:45 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Emile van Sebille wrote: On 8/13/2009 3:17 PM dippim said... I am new to Python and I have a question about descriptors. If I have a class as written below, is there a way to use descriptors to be certain

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Hendrik van Rooyen
On Friday 14 August 2009 14:13:46 greg wrote: You can't read and write with the same stdio file object at the same time. Odd things tend to happen if you try. You need to open *two* file objects, one for reading and one for writing: fr = open(/dev/ttyS0,rb,0) fw =

Re: implementing descriptors

2009-08-14 Thread dippim
On Aug 14, 2:34 am, Raymond Hettinger pyt...@rcn.com wrote: [David] I am new to Python and I have a question about descriptors.  If I have a class as written below, is there a way to use descriptors to be certain that the datetime in start is always before the one in end? class

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread exarkun
On 01:38 pm, hend...@microcorp.co.za wrote: On Friday 14 August 2009 12:54:32 Diez B. Roggisch wrote: How about using pyserial? With that, I never had any problems accessing the the serial ports, and AFAIK no duplex-problems as well. And I seriously doubt that these are a python-related

Re: Python and behavior

2009-08-14 Thread Ethan Furman
MRAB wrote: Gary Herron wrote: goldtech wrote: Could you explain or link me to an explanation of this? Been using Python for a while but not sure I understand what's happening below. Thanks. ss=1 and f ss 'f' ss=0 and f ss 0 Python's Boolean

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Diez B. Roggisch
Hendrik van Rooyen schrieb: On Friday 14 August 2009 14:13:46 greg wrote: You can't read and write with the same stdio file object at the same time. Odd things tend to happen if you try. You need to open *two* file objects, one for reading and one for writing: fr = open(/dev/ttyS0,rb,0)

Re: Unrecognized escape sequences in string literals

2009-08-14 Thread Aahz
In article 6e13754c-1fa6-4d1b-8861-146bffec8...@h30g2000vbr.googlegroups.com, Douglas Alan darkwate...@gmail.com wrote: My friend begs to differ with the above. It would be much better for debugging if Python generated a parsing error for unrecognized escape sequences, rather than leaving them

Re: coding for multiple versions of python

2009-08-14 Thread Grant Edwards
On 2009-08-14, Martin v. L?wis mar...@v.loewis.de wrote: I'm guessing I need to configure cvs to copy files to both locations whenever I commit. Does that sound right? Is there a better way I'm not thinking of? Just use one set of source files. If the set of files doesn't change too often,

Re: socket.send : (11, 'Resource temporarily unavailable')

2009-08-14 Thread Grant Edwards
On 2009-08-14, Gabriel Rossetti gabriel.rosse...@arimaz.com wrote: I get a (11, 'Resource temporarily unavailable') error when I try to send a file using a socket. Is there s size limit? No, there's no size limit. However, there is a bandwidth limit. You can't shove bytes into the pipe

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Grant Edwards
On 2009-08-14, Hendrik van Rooyen hend...@microcorp.co.za wrote: In the past, on this group, I have made statements that said that on Linux, the serial port handling somehow does not allow transmitting and receiving at the same time, That's not true. Linux/Unix does and always has supported

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Grant Edwards
On 2009-08-14, Hendrik van Rooyen hend...@microcorp.co.za wrote: In the meantime I have had another idea which I have also not tried yet, namely to do independent opens for reading and writing, to give me two file instances instead of one, and to try with that. I have no idea if it would

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Grant Edwards
On 2009-08-14, exar...@twistedmatrix.com exar...@twistedmatrix.com wrote: One strategy you might employ to get rid of the busy looping is to use Twisted and its serial port support. This also addresses the full- duplex issue you've raised. There are no such full-dulex issues. -- Grant

Re: A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode

2009-08-14 Thread despen
Martin P. Hellwig martin.hell...@dcuktec.org writes: Sounds like a bad case of STRIS http://blog.dcuktec.com/2009/08/stris.html I believe the correct technical term for it is potty mouth. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread Grant Edwards
On 2009-08-14, greg g...@cosc.canterbury.ac.nz wrote: Hendrik van Rooyen wrote: port = open(/dev/ttyS0,r+b,0) What I would really like is to have two threads - one that does blocking input waiting for a character, and one that examines an output queue and transmits the stuff it finds.

Re: Is it possible to use python to get True Full Duplex on a Serial port?

2009-08-14 Thread exarkun
On 02:19 pm, inva...@invalid wrote: On 2009-08-14, exar...@twistedmatrix.com exar...@twistedmatrix.com wrote: One strategy you might employ to get rid of the busy looping is to use Twisted and its serial port support. This also addresses the full- duplex issue you've raised. There are no

Re: implementing descriptors

2009-08-14 Thread Dave Angel
dippim wrote: On Aug 14, 2:34 am, Raymond Hettinger pyt...@rcn.com wrote: [David] I am new to Python and I have a question about descriptors. If I have a class as written below, is there a way to use descriptors to be certain that the datetime in start is always before the one in

Re: coding for multiple versions of python

2009-08-14 Thread Dave Angel
Grant Edwards wrote: On 2009-08-14, Martin v. L?wis mar...@v.loewis.de wrote: I'm guessing I need to configure cvs to copy files to both locations whenever I commit. Does that sound right? Is there a better way I'm not thinking of? Just use one set of source files. If the set

Re: Format Code Repeat Counts?

2009-08-14 Thread Scott David Daniels
MRAB wrote: Scott David Daniels wrote: MRAB wrote: The shortest I can come up with is: [ + ][.join(letters) + ] Maybe a golf shot: ][.join(letters).join([]) Even shorter: [+][.join(letters)+] :-) I was going by PEP8 rules. ;-) --Scott David Daniels Scott David

callable virtual method

2009-08-14 Thread Jean-Michel Pichavant
Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm checking that the class of the instance calling the method has defined that method as well. Example:

Re: trouble with reload

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 09:23:17 -0400, Colin J. Williams wrote: It's typically a user module that needs to be reloaded. What's a user module? It seems that del sys.modules['moduleName'] has no effect. sys.modules is just a dictionary, I find it hard to believe that deleting from it has no

Re: Programming by Contract

2009-08-14 Thread Charles Yeomans
On Aug 14, 2009, at 12:09 AM, Scott David Daniels wrote: Charles Yeomans wrote: On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote: Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very brief look at pycontract

Re: implementing descriptors

2009-08-14 Thread dippim
On Aug 14, 10:48 am, Dave Angel da...@ieee.org wrote: dippim wrote: On Aug 14, 2:34 am, Raymond Hettinger pyt...@rcn.com wrote: [David] I am new to Python and I have a question about descriptors.  If I have a class as written below, is there a way to use descriptors to be certain that

Re: implementing descriptors

2009-08-14 Thread dippim
On Aug 14, 10:48 am, Dave Angel da...@ieee.org wrote: dippim wrote: On Aug 14, 2:34 am, Raymond Hettinger pyt...@rcn.com wrote: [David] I am new to Python and I have a question about descriptors.  If I have a class as written below, is there a way to use descriptors to be certain that

Re: callable virtual method

2009-08-14 Thread MRAB
Jean-Michel Pichavant wrote: Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm checking that the class of the instance calling the method has defined

Re: callable virtual method

2009-08-14 Thread Diez B. Roggisch
Jean-Michel Pichavant schrieb: Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm checking that the class of the instance calling the method has defined

retrieve item from nested list given index tuple

2009-08-14 Thread Alan G Isaac
`lst` is a nested list `tpl` is the indexes for an item in the list What is the nice way to retrieve the item? (Speedy access is nice.) I don't want to use NumPy, but I'd like somehow to avoid an explicit loop. I did consider using eval. E.g., eval('lst' + '[%d]'*len(tpl)%tpl). It works but

Re: callable virtual method

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 16:49:47 +0200, Jean-Michel Pichavant wrote: Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm checking that the class of the

Why does my ftp script quit after couple of hours?

2009-08-14 Thread kk
Hi This way the first time I did something with ftp stuff. I think that generally it works but it stops working(quits or disappears) after couple of hours of running. This was a personal test-trial script for my own needs which was to get my dynamic ip and broadcast to a client(I have a client

OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: I saw `cout' being shifted Hello world times to the left and stopped right there. --Steve Gonedes Assuming that's something real, and not invented for humour, I presume that's describing something possible in C++. Am I correct? What the hell

Re: Why does my ftp script quit after couple of hours?

2009-08-14 Thread Diez B. Roggisch
kk schrieb: Hi This way the first time I did something with ftp stuff. I think that generally it works but it stops working(quits or disappears) after couple of hours of running. This was a personal test-trial script for my own needs which was to get my dynamic ip and broadcast to a client(I

Re: Why does my ftp script quit after couple of hours?

2009-08-14 Thread kk
Hi Diez Thanks for your insight. The reason I chose the awkward method to parse the ip digits is that I was not familiar with the regex module and the Dyndns Ip page is pretty simple page. I guess it is time to learn more about the Re module. As far as robustness, I agree with your assestment. I

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Grant Edwards
On 2009-08-14, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: I saw `cout' being shifted Hello world times to the left and stopped right there. --Steve Gonedes Assuming that's something real, and not invented for humour, I presume

Re: Why does my ftp script quit after couple of hours?

2009-08-14 Thread Francesco Bochicchio
On 14 Ago, 18:03, kk maymunbe...@gmail.com wrote: Hi This way the first time I did something with ftp stuff. I think that generally it works but it stops working(quits or disappears) after couple of hours of running. This was a personal test-trial script for my own needs which was to get my

Natural Language Processing in Python

2009-08-14 Thread Prateek
Hi, Can somebody please provide me link to a good online resource or e- book for doing natural language processing programming in Python. Thanks, Prateek -- http://mail.python.org/mailman/listinfo/python-list

Re: Why does my ftp script quit after couple of hours?

2009-08-14 Thread Diez B. Roggisch
kk schrieb: Hi Diez Thanks for your insight. The reason I chose the awkward method to parse the ip digits is that I was not familiar with the regex module and the Dyndns Ip page is pretty simple page. I guess it is time to learn more about the Re module. As far as robustness, I agree with your

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread MRAB
Grant Edwards wrote: On 2009-08-14, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: I saw `cout' being shifted Hello world times to the left and stopped right there. --Steve Gonedes Assuming that's something real, and not invented

Re: OT Signature quote [was Re: Unrecognized escape sequences in string literals]

2009-08-14 Thread Douglas Alan
On Aug 14, 12:17 pm, Grant Edwards inva...@invalid wrote: On 2009-08-14, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Fri, 14 Aug 2009 07:07:31 -0700, Aahz wrote: I saw `cout' being shifted Hello world times to the left and stopped right there.  --Steve Gonedes

Re: callable virtual method

2009-08-14 Thread Jean-Michel Pichavant
MRAB wrote: Jean-Michel Pichavant wrote: Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm checking that the class of the instance calling the method

Re: Python Permutations Problem

2009-08-14 Thread MRAB
Asanka Wasala wrote: Hi I am developing a spell checker for my language, and I came across solving an interesing problem. It would be great if you can suggest me an optimized solution for the problem described below: I have certain group of letters like these: Group #1: c,r,b Group #2: a,z,k

Re: callable virtual method

2009-08-14 Thread Diez B. Roggisch
Jean-Michel Pichavant schrieb: MRAB wrote: Jean-Michel Pichavant wrote: Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm checking that the class of

Python Permutations Problem

2009-08-14 Thread Asanka Wasala
Hi I am developing a spell checker for my language, and I came across solving an interesing problem. It would be great if you can suggest me an optimized solution for the problem described below: I have certain group of letters like these: Group #1: c,r,b Group #2: a,z,k Group #3: h,t . .

Re: [Python-Dev] expy: an expressway to extend Python

2009-08-14 Thread Yingjie Lan
--- On Sat, 8/8/09, Stefan Behnel stefan...@behnel.de wrote: From: Stefan Behnel stefan...@behnel.de Subject: Re: [Python-Dev] expy: an expressway to extend Python To: python-...@python.org Date: Saturday, August 8, 2009, 4:55 PM More details at http://expy.sourceforge.net/ I'm clearly

Re: A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode

2009-08-14 Thread vippstar
On Aug 14, 4:36 am, Xah Lee xah...@gmail.com wrote: • A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode  http://xahlee.org/UnixResource_dir/writ/emacs_whitespace-mode_problem... Instead of writing a completely useless article you could had asked for help in an emacs newsgroup, or

Re: retrieve item from nested list given index tuple

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 15:54:54 +, Alan G Isaac wrote: `lst` is a nested list `tpl` is the indexes for an item in the list What is the nice way to retrieve the item? (Speedy access is nice.) Assuming you want to do this frequently, write a helper function, then use it: # Untested def

Re: csv.DictWriter.write_header()

2009-08-14 Thread Chris Withers
Alan G Isaac wrote: On 8/13/2009 7:58 AM John Machin apparently wrote: Duck typing: ask a silly question, get a silly answer. Maybe if you learned to be a more generous reader, fewer questions would look silly to you. If you take a look at the crap that John very patiently wades through on

Re: trouble with reload

2009-08-14 Thread Colin J. Williams
Steven D'Aprano wrote: On Fri, 14 Aug 2009 09:23:17 -0400, Colin J. Williams wrote: It's typically a user module that needs to be reloaded. What's a user module? A module written by a user, as distinguished from a libary It seems that del sys.modules['moduleName'] has no effect.

Re: httplib incredibly slow :-(

2009-08-14 Thread Chris Withers
Aahz wrote: Sorry, I mostly have been working on our Mac port, so I'm not sure what's needed to make this work on Windows. Did you try downloading the PyCurl binary? Maybe it statically links libcurl on Windows. Shame it's not available as a bdist_egg, that's what I'm really after... What

Re: A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode

2009-08-14 Thread vippstar
On Aug 14, 8:25 pm, fortunatus daniel.elia...@excite.com wrote: On Aug 14, 1:01 pm, vippstar vipps...@gmail.com wrote: Why would you fill your website with junk? The OP made it clear: Just wanted to express some frustration with whitespace-mode. You took my question out of context and

Re: callable virtual method

2009-08-14 Thread Jean-Michel Pichavant
Diez B. Roggisch wrote: Jean-Michel Pichavant schrieb: MRAB wrote: Jean-Michel Pichavant wrote: Hi fellows, Does anyone know a way to write virtual methods (in one virtual class) that will raise an exception only if called without being overridden ? Currently in the virtual method I'm

Re: A Exhibition Of Tech Geekers Incompetence: Emacs whitespace-mode

2009-08-14 Thread Jean-Michel Pichavant
vippstar wrote: On Aug 14, 8:25 pm, fortunatus daniel.elia...@excite.com wrote: On Aug 14, 1:01 pm, vippstar vipps...@gmail.com wrote: Why would you fill your website with junk? The OP made it clear: Just wanted to express some frustration with whitespace-mode.

Re: Unrecognized escape sequences in string literals

2009-08-14 Thread Steven D'Aprano
I think I've spent enough time on this discussion, so I won't be directly responding to any of your recent points -- it's clear that I'm not persuading you that there's any justification for any behaviour for escape sequences other than the way C++ deals with them. That's your prerogative, of

Re: retrieve item from nested list given index tuple

2009-08-14 Thread Colin J. Williams
Steven D'Aprano wrote: On Fri, 14 Aug 2009 15:54:54 +, Alan G Isaac wrote: `lst` is a nested list `tpl` is the indexes for an item in the list What is the nice way to retrieve the item? (Speedy access is nice.) Assuming you want to do this frequently, write a helper function, then

Re: retrieve item from nested list given index tuple

2009-08-14 Thread Alan G Isaac
On 8/14/2009 1:09 PM Steven D'Aprano apparently wrote: Try this instead: from operator import getitem reduce(getitem, (2, 1, 0), lst) 'aaa' reduce(getitem, (2, 1, 0, 0), lst) 'a' operator.getitem is less ugly too. Yes, that's better. Thanks, Alan --

Re: trouble with reload

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 13:14:16 -0400, Colin J. Williams wrote: Steven D'Aprano wrote: On Fri, 14 Aug 2009 09:23:17 -0400, Colin J. Williams wrote: It's typically a user module that needs to be reloaded. What's a user module? A module written by a user, as distinguished from a libary You

Re: callable virtual method

2009-08-14 Thread Nigel Rantor
Jean-Michel Pichavant wrote: Your solution will work, for sure. The problem is that it will dumb down the Base class interface, multiplying the number of methods by 2. This would not be an issue in many cases, in mine there's already too much meaningful methods in my class for me to add

Komodo(!)

2009-08-14 Thread David C Ullrich
Probably this isn't news to anyone but me, but just in case: Last I heard Komodo was a very highly regarded IDE that unfortunately cost money. Yesterday I discovered that they now have an editor available for free. Doesn't contain all the features of the IDE, but just having glanced at it it

Re: callable virtual method

2009-08-14 Thread Steven D'Aprano
On Fri, 14 Aug 2009 18:49:26 +0200, Jean-Michel Pichavant wrote: Sorry guys (means guys *and* gals :op ), I realized I've not been able to describe precisely what I want to do. I'd like the base class to be virtual (aka abstract). However it may be abstract but it does not mean it cannot do

  1   2   3   >