Re: Converting _node* to a Code object?

2007-04-01 Thread Gabriel Genellina
En Sun, 01 Apr 2007 01:35:59 -0300, Brendon Costa <[EMAIL PROTECTED]> escribió: > How do i convert a _node* object returned from: > PyParser_SimpleParseStringFlagsFilename() > > into a code object i can use as a module to import with: > PyImport_ExecCodeModule() Using PyNode_Compile. But why do

Character set woes with binary data

2007-04-01 Thread Michael B. Trausch
I am attempting to piece together a Python client for Fotobilder, the picture management server on Livejournal. The protocol calls for binary data to be transmitted, and I cannot seem to be able to do it, because I get this error: >>> sb.UploadSinglePicture('/home/mbt/IMG_2618.JPG') Traceback (mo

tag replacement in toxml()

2007-04-01 Thread Manuel Ospina
Hi all, I am new on the list and I already have a question :-(. I have something like this: import xml.dom.minidom from xml.dom.minidom import getDOMImplementation impl = getDOMImplementation() myDoc = impl.createDocument(None, "example", None) myRoot = myDoc.documentElement myNode1 = myDoc.crea

Re: Pygame Q (linux) beginner

2007-04-01 Thread Gabriel Genellina
En Sat, 31 Mar 2007 23:37:16 -0300, enquiring mind <"enquiring mind"@braindead.com> escribió: > Running 2.4.1 Python (learning) > Running SUSE Linux 10 > > Am learning from a new books that mostly deals with windows python and > Pygames called "Game Programming" by Randy Harris (2007) His books

Re: Character set woes with binary data

2007-04-01 Thread Gabriel Genellina
En Sun, 01 Apr 2007 05:21:25 -0300, Michael B. Trausch <[EMAIL PROTECTED]> escribió: > I am attempting to piece together a Python client for Fotobilder, the > picture management server on Livejournal. > > The protocol calls for binary data to be transmitted, and I cannot seem > to be able to do

Re: shelf membership

2007-04-01 Thread Peter Otten
Aaron Brady wrote: > can you shelve objects with membership? > > this gives you: > > TypeError: object does not support item assignment > dict 0 True > Exception exceptions.TypeError: 'object does not support item assignment' > in  ignored > > > ignored is a bit mysterious.  tx in advance. >

Re: tag replacement in toxml()

2007-04-01 Thread Gabriel Genellina
En Sun, 01 Apr 2007 05:26:48 -0300, Manuel Ospina <[EMAIL PROTECTED]> escribió: > I am new on the list and I already have a question :-(. Welcome! > I have something like this: > > import xml.dom.minidom > from xml.dom.minidom import getDOMImplementation > impl = getDOMImplementation() > myDoc

Re: Mastering Python

2007-04-01 Thread Steve Holden
Hendrik van Rooyen wrote: > "Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: > > >> On Wed, 28 Mar 2007 07:55:20 +0200, "Hendrik van Rooyen" >> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >>> Pretty obvious of course, as is the pronounciation of the >>> name: "Cholmondely"

Re: socket read timeout

2007-04-01 Thread Steve Holden
Hendrik van Rooyen wrote: > <[EMAIL PROTECTED]> wrote: > > >> hg> My issue with that is the effect on write: I only want a timeout on >> hg> read ... but anyway ... >> >> So set a long timeout when you want to write and short timeout when you want >> to read. >> > > Are sockets full du

Re: Unicode list

2007-04-01 Thread Georg Brandl
Rehceb Rotkiv schrieb: > Hello, > > I have this little grep-like program: > > ++snip++ > #!/usr/bin/python > > import sys > import re > > pattern = sys.argv[1] > inputfile = file(sys.argv[2], 'r') > > for line in inputfile: > matches = re.findall(pattern, line) > if mat

Re: re.findall() hangs in python

2007-04-01 Thread irstas
On Apr 1, 6:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > But when 'data' does not contain pattern, it just hangs at > 're.findall' > > pattern = re.compile("(.*) re.S) That pattern is just really slow to evaluate. What you want is probably something more like this: re.compile(r']*src\s

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Johann C. Rocholl
Brilliant! On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote: > def foo${LATIN SMALL LETTER LAMBDA WITH STROKE}$(x${DOUBLE-STRUCK > CAPITAL C}$): > return None${ZERO WIDTH NO-BREAK SPACE}$ > > This is still easy to read and makes the full power of type-annotated Python > available t

Re: Generic logic/conditional class or library for classification of data

2007-04-01 Thread Steven D'Aprano
On Sat, 31 Mar 2007 21:54:46 -0700, Basilisk96 wrote: > As a very basic example, consider a set of uncategorized objects that > have text descriptions associated with them. The objects are some type > of tangible product, e.g., books. So the input object has a > Description attribute, and the outp

Re: saving Python process state for later debugging

2007-04-01 Thread aspineux
On 1 avr, 09:39, [EMAIL PROTECTED] wrote: > On Apr 1, 2:07 am, "aspineux" <[EMAIL PROTECTED]> wrote: > > > > > Pylon has something like > > that.http://pylonshq.com/docs/0.9.4.1/interactive_debugger.html > > > Turbogears has the same with option tg.fancy_exception > > I could get it wrong, but the

Re: Mastering Python

2007-04-01 Thread DarkBlue
Before we get to far away from the original question... as you have may have noticed you reached one of the best user groups on the net , where help from the top gurus and best minds in the python universe is only a question away. Go for it, you are in good hands. Db -- http://mail.python.org/ma

Extract information from HTML table

2007-04-01 Thread Ulysse
Hello, I'm trying to extract the data from HTML table. Here is the part of the HTML source : """ Sat, 31.03.2007 - 20:24:00 http://s2.bitefight.fr/bite/ be

Re: Generic logic/conditional class or library for classification of data

2007-04-01 Thread Michael Bentley
On Mar 31, 2007, at 11:54 PM, Basilisk96 wrote: > This topic is difficult to describe in one subject sentence... > > Has anyone come across the application of the simple statement "if > (object1's attributes meet some conditions) then (set object2's > attributes to certain outcomes)", where "obje

Re: Converting _node* to a Code object?

2007-04-01 Thread Brendon Costa
Gabriel Genellina wrote: > En Sun, 01 Apr 2007 01:35:59 -0300, Brendon Costa <[EMAIL PROTECTED]> > escribió: > >> How do i convert a _node* object returned from: >> PyParser_SimpleParseStringFlagsFilename() >> >> into a code object i can use as a module to import with: >> PyImport_ExecCodeModule

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Gustavo Carneiro
On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote: [...] Example === This is the standard ``os.path.normpath`` function, converted to type declaration syntax:: def normpathƛ(path✎)✎: """Normalize path, eliminating double slashes, etc.""" if path✎ == '':

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Gustavo Carneiro
On 4/1/07, Gustavo Carneiro <[EMAIL PROTECTED]> wrote: On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote: [...] > Example > === > > This is the standard ``os.path.normpath`` function, converted to type > declaration > syntax:: > > def normpathƛ(path✎)✎: > """Normalize path, el

Re: Extract information from HTML table

2007-04-01 Thread placid
On Apr 1, 10:13 pm, "Ulysse" <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to extract the data from HTML table. Here is the part of > the HTML source : > """ > > > type="checkbox"> > > Sat, 31.03.20

Re: Extract information from HTML table

2007-04-01 Thread irstas
On Apr 1, 3:13 pm, "Ulysse" <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to extract the data from HTML table. Here is the part of > the HTML source : > > > > Do you know the way to do it ? Beautiful Soup is an easy way to parse HTML (that may be broken). http://www.crummy.com/software/B

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Maël Benjamin Mettler
> Is this supposed to be a joke? First of April? Likely. -- http://mail.python.org/mailman/listinfo/python-list

Re: help with dates

2007-04-01 Thread Parthan SR
On 31 Mar 2007 14:21:23 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm working on a website for some firefighters that want to be able to sign-up for overtime and I need some help figuring out a date related problem. Here's the scenario: Four groups of firefighters (group1, group2, g

Re: CRC CCITT UPDATE in Python

2007-04-01 Thread Py Thorneiro
Hi Martin! OK, thanks; but its work in AVR... After compile it and work in agree with the device that I need to talk, the software work fine, but I would like port it to PC in Python... Hi Folks, So sorry, but I try find it googling, searkoding ( http://www.koders.com) and try underst

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
* Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600) > Thorsten Kampe wrote: > > I've written a script which uses Optik/Optparse to display the > > options (which works fine). The text for the help message is localised > > (with german umlauts) and when I execute the script with the localised > >

Re: Unicode list

2007-04-01 Thread Rehceb Rotkiv
> When printing a list, the individual elements are converted with repr(), > not with str(). For a string object, repr() adds escape codes for all > bytes that are not printable ASCII characters. Thanks Martin, you're right, it were the repr() calls that messed up the output. Iterating the array

SimpleXMLRPCServer - client address

2007-04-01 Thread Jan Danielsson
Hello all, I writing an application based on the SimpleXMLRPCServer class. I would like to know the IP address of the client performing the RPC. Is that possible, without having to abandon the SimpleXMLRPCServer class? -- Kind regards, Jan Danielsson -- http://mail.python.org/mailman/listinf

Re: Extract information from HTML table

2007-04-01 Thread Ulysse
On Apr 1, 2:52 pm, [EMAIL PROTECTED] wrote: > On Apr 1, 3:13 pm, "Ulysse" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm trying to extract the data from HTML table. Here is the part of > > the HTML source : > > > > > > Do you know the way to do it ? > > Beautiful Soup is an easy way to pars

Re: tag replacement in toxml()

2007-04-01 Thread Martin v. Löwis
> import xml.dom.minidom > from xml.dom.minidom import getDOMImplementation > impl = getDOMImplementation() > myDoc = impl.createDocument(None, "example", None) > myRoot = myDoc.documentElement > myNode1 = myDoc.createElement("node") > myNode2 = myDoc.createElement("nodeTwo") > myText = myDoc.crea

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-01 Thread mark . dufour
> Anyway, the only real point is that if there is a concern about the > copyright and licensing of the output of ShedSkin, then we merely need > to ask the author of it to clarify matters and move on with life. With > the exception of GNAT, to date no GPL'd compiler has ever placed a GPL > restric

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
Just an addition : when I insert this statement... print _('THIS SOFTWARE COMES WITHOUT WARRANTY, LIABILITY OR SUPPORT!') into this skript, the line is printed out. So if my Skript can output the localised text but Optparse can't it should be an optparse bug, right?! Thorsten -- http://mail.p

Re: Mastering Python (OT)

2007-04-01 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > It comes out something like "Chum-lee", with the ch like chicken... > > > > (that's what I have heard - but who knows - It may have been > > a regional dialect, a case of the blind leading the blind, or > > someone pu

Re: socket read timeout

2007-04-01 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> > Hendrik van Rooyen wrote: > > <[EMAIL PROTECTED]> wrote: > > > > > >> hg> My issue with that is the effect on write: I only want a timeout on > >> hg> read ... but anyway ... > >> > >> So set a long timeout when you want to write and short timeout w

ISO programming projects

2007-04-01 Thread kj
I'm looking for a collection of useful programming projects, at the "hobbyist" level. My online search did turn up a few collections (isolated projects are less useful to me at the moment), but these projects are either more difficult than what I'm looking for (e.g. code a C compiler) or not te

Re: how to remove specified cookie in cookie jar?

2007-04-01 Thread John J. Lee
"ken" <[EMAIL PROTECTED]> writes: > How to remove specified cookie (via a given name) in cookie jar? > > I have the following code, but how can I remove a specified cookie in > the cookie jar? > cj = cookielib.LWPCookieJar() > > if cj is not None: > if os.path.isfile(COOKIEFILE): >

Python Based API

2007-04-01 Thread Dean . Brotzel
Hi, I work on a project that is built entirely using python and Tkinter. We are at the point where we would like to give access to our functionality to others via some sort of API. People who would use our API develop in all kinds of languages from C/C++ to Pascal. Ideas that come to mind that a

Re: saving Python process state for later debugging

2007-04-01 Thread yossi . kreinin
On Apr 1, 2:57 pm, "aspineux" wrote: > > A context in python is no more than 2 dictionaries ( globals() and > locals()). > You can easily serialize both to store them. I don't think it will work with objects defined by extension modules, except if they somehow support serialization, will it? I gue

zip files as nested modules?

2007-04-01 Thread tsuraan
Supposing that I have a directory tree like so: a/ __init__.py b/ __init__.py c.py and b.py has some method (let's call it d) within it. I can, from python, do: from a.b.c import d d() And, that works. Now, suppose I want to have a zipped module under a, called b.zip. Is there any

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
I guess the culprit is this snippet from optparse.py: # used by test suite def _get_encoding(self, file): encoding = getattr(file, "encoding", None) if not encoding: encoding = sys.getdefaultencoding() return encoding def print_help(self, file=None): """print_help(file : f

Re: Cheeseshop needs mirrors

2007-04-01 Thread John J. Lee
Richard Jones <[EMAIL PROTECTED]> writes: [...] > And of course I'll reiterate the same line I always do: the Cheese Shop was > set up by a volunteer, enhanced by some other volunteers and exactly > nothing more will get done unless more volunteers offer their time. PyPI has "just worked" for me,

Re: Opening Photoshop EPS with PIL?

2007-04-01 Thread M�ta-MCI
.eps ==> vector ; not bitmap -- http://mail.python.org/mailman/listinfo/python-list

reverse engineering Excel spreadsheet

2007-04-01 Thread Duncan Smith
Hello, I am currently implementing (mainly in Python) 'models' that come to me as Excel spreadsheets, with little additional information. I am expected to use these models in a web application. Some contain many worksheets and various macros. What I'd like to do is extract the data and busi

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-01 Thread John Nagle
Kay Schluehr wrote: > Indeed. The only serious problem from an acceptance point of view is > that Mark tried to solve the more difficult problem first and hung on > it. Instead of integrating a translator/compiler early with CPython, > doing some factorization of Python module code into compilable

Re: reverse engineering Excel spreadsheet

2007-04-01 Thread irstas
On Apr 1, 6:59 pm, Duncan Smith <[EMAIL PROTECTED]> wrote: > Hello, > I am currently implementing (mainly in Python) 'models' that come > to me as Excel spreadsheets, with little additional information. I am > expected to use these models in a web application. Some contain many > worksheets

Re: I18n issue with optik

2007-04-01 Thread Steven Bethard
Thorsten Kampe wrote: > * Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600) >> Thorsten Kampe wrote: >>> I've written a script which uses Optik/Optparse to display the >>> options (which works fine). The text for the help message is localised >>> (with german umlauts) and when I execute the script

Re: Does Numpy work on QNX 4.25 with Python 2.2?

2007-04-01 Thread John J. Lee
Robert Kern <[EMAIL PROTECTED]> writes: > ZMY wrote: > > I am trying to convert some old Fortran code into Python program and > > get them work on a QNX 4.25 system. Since the program requires speed, > > I think using Numpy is really necessary. But I haven't found anything > > on web about using n

Re: I18n issue with optik

2007-04-01 Thread Steven Bethard
Thorsten Kampe wrote: > I guess the culprit is this snippet from optparse.py: > > # used by test suite > def _get_encoding(self, file): > encoding = getattr(file, "encoding", None) > if not encoding: > encoding = sys.getdefaultencoding() > return encoding > > def print_help(se

Pickling a class with a __getattr__

2007-04-01 Thread Peter Bengtsson
Hi, I'm trying to pickle an object instance of a class that is like a dict but with a __getattr__ and I'm getting pickling errors. This works but is not good enough. $ python2.4 >>> import cPickle as pickle >>> class Dict(dict): ... pass ... >>> >>> >>> friend = Dict(name='Zahid', age=40) >>>

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Collin Winter
On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote: [snip several pages of excellent ideas] > > The mapping between types and declarators is not static. It can be completely > customized by the programmer, but for convenience there are some predefined > mappings for some built-in types: > >

Re: Pickling a class with a __getattr__

2007-04-01 Thread Peter Otten
Peter Bengtsson wrote: > Hi, I'm trying to pickle an object instance of a class that is like a > dict but with a __getattr__ and I'm getting pickling errors. > This is what happens when I'm trying to be clever: > import cPickle as pickle class Dict(dict): > ... def __getattr__(self

Re: Pickling a class with a __getattr__

2007-04-01 Thread Peter Bengtsson
On Apr 1, 5:48 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > Peter Bengtsson wrote: > > Hi, I'm trying to pickle an object instance of a class that is like a > > dict but with a __getattr__ and I'm getting pickling errors. > > This is what happens when I'm trying to be clever: > > import cPickl

Re: reverse engineering Excel spreadsheet

2007-04-01 Thread Laurent Pointal
Duncan Smith wrote: > Hello, > I am currently implementing (mainly in Python) 'models' that come > to me as Excel spreadsheets, with little additional information. I am > expected to use these models in a web application. Some contain many > worksheets and various macros. > > What I'd like

Re: Python Based API

2007-04-01 Thread Laurent Pointal
[EMAIL PROTECTED] wrote: > Hi, > > I work on a project that is built entirely using python and Tkinter. > We are at the point where we would like to give access to our > functionality to others via some sort of API. People who would use > our API develop in all kinds of languages from C/C++ to P

In beloved Iraq, blood flows between brothers in the shadow of illegitimate foreign occupation Re: +++ Russia Watched 9/11 In REAL TIME on SATELLITE +++

2007-04-01 Thread lemnitzer
On 911 Yank mother fuckers of IVY LEAGUE killed their own people and blamed on other people. The mother fucker, Thomas Eager of MIT Materials Science Department and welding lab, was the first to defend the lies of the government by an IDIOTIC pancake theory. Then we have the BASTARD of Harvard, Sam

Re: Character set woes with binary data

2007-04-01 Thread Michael B. Trausch
On Sun, 2007-04-01 at 06:09 -0300, Gabriel Genellina wrote: > > When putting the MIME segments (listed line-by-line in a Python list) > > together to transmit them. The files are typically JPG or some other > > binary format, and as best as I understand the protocol, the binary data > > needs to

Re: Character set woes with binary data

2007-04-01 Thread Paul Boddie
Michael B. Trausch wrote: > > I never said it did. It just happens to be the context with which I am > working. I said I wanted to concatenate materials without regard for > the character set. I am mixing binary data with ASCII and Unicode, for > sure, but I should be able to do this. The probl

Re: re.findall() hangs in python

2007-04-01 Thread [EMAIL PROTECTED]
On Apr 1, 5:23 am, [EMAIL PROTECTED] wrote: > On Apr 1, 6:12 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > But when 'data' does not contain pattern, it just hangs at > > 're.findall' > > > pattern = re.compile("(.*) > re.S) > > That pattern is just really slow to evaluate. What you wan

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-01 Thread mark . dufour
> I don't see how that can be--we're talking about a GCC-based compiler, > right? no, Shed Skin is a completely separate entity, that outputs C++ code. it's true I only use GCC to test the output, and I use some GCC- specific extensions (__gnu_cxx::hash_map/hash_set), but people have managed to c

Re: Character set woes with binary data

2007-04-01 Thread Terry Reedy
"Michael B. Trausch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | The protocol calls for binary data to be transmitted, and I cannot seem | to be able to do it, because I get this error: | UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: | ordinal not in r

Re: ISO programming projects

2007-04-01 Thread Terry Reedy
"kj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | | | | I'm looking for a collection of useful programming projects, at | the "hobbyist" level. | | My online search did turn up a few collections (isolated projects | are less useful to me at the moment), but these projects are eit

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
* Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600) > Thorsten Kampe wrote: > > * Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600) > >> Thorsten Kampe wrote: > >>> I've written a script which uses Optik/Optparse to display the > >>> options (which works fine). The text for the help message is local

capturing system exit status

2007-04-01 Thread James
Hi folks, in a program I'm writing I have several commands I pass to the unix OS underneath the code. I want to perform error checking to make sure that the OS commands' exit gracefully, but I'm not seeing a simple python module to do this. The closest I can see is system(), as detailed here: ht

Re: Character set woes with binary data

2007-04-01 Thread John Nagle
Michael B. Trausch wrote: > In short: How do I create a string that contains raw binary content > without Python caring? Is that possible? Given where we're now at with strings in Python, Python should really have a "byte" type and a way to deal with arrays of bytes, independent of the stri

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
* Steven Bethard (Sun, 01 Apr 2007 10:26:54 -0600) > Thorsten Kampe wrote: > > I guess the culprit is this snippet from optparse.py: > > > > # used by test suite > > def _get_encoding(self, file): > > encoding = getattr(file, "encoding", None) > > if not encoding: > > encoding = sy

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
* Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100) > Yes, I could do that but I'd rather know first if my code is wrong or > the optparse code. It might be the bug mentioned in http://mail.python.org/pipermail/python-dev/2006-May/065458.html The patch although doesn't work. From my unicode-chars

Re: Pygame Q (linux) beginner

2007-04-01 Thread hlubenow
enquiring mind wrote: > Running 2.4.1 Python (learning) > Running SUSE Linux 10 > > At Chapter 5 is where the Pygame module is > introduced so I have a little time before I have to figure out what I > have to download and install. Are you asking for advice how to install pygame on SuSE 10 ? Wel

Re: Character set woes with binary data

2007-04-01 Thread Ene
On Apr 1, 11:44 am, John Nagle <[EMAIL PROTECTED]> wrote: > Michael B. Trausch wrote: > > In short: How do I create a string that contains raw binary content > > without Python caring? Is that possible? > > Given where we're now at with strings in Python, Python should > really have a "byte"

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-01 Thread Paul Rubin
[EMAIL PROTECTED] writes: > > I don't see how that can be--we're talking about a GCC-based compiler, > > right? > > no, Shed Skin is a completely separate entity, I was referring to GNAT. -- http://mail.python.org/mailman/listinfo/python-list

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
* Thorsten Kampe (Sun, 1 Apr 2007 20:08:39 +0100) > * Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100) > > Yes, I could do that but I'd rather know first if my code is wrong or > > the optparse code. > > It might be the bug mentioned in > http://mail.python.org/pipermail/python-dev/2006-May/06545

Which will come first: Perl 6 or Python 3000?

2007-04-01 Thread Fuzzyman
http://home.inklingmarkets.com/market/show/4018 (Interesting site by the way - although a bit heavily weighted towards US politics for my tastes). Anyway, I know which way my money is going :-) Fuzzyman http://www.voidspace.org.uk/python/articles.shtml -- http://mail.python.org/mailman/listinf

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-01 Thread Kay Schluehr
On Apr 1, 6:07 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Kay Schluehr wrote: > > Indeed. The only serious problem from an acceptance point of view is > > that Mark tried to solve the more difficult problem first and hung on > > it. Instead of integrating a translator/compiler early with CPython,

Re: Character set woes with binary data

2007-04-01 Thread Grant Edwards
On 2007-04-01, Ene <[EMAIL PROTECTED]> wrote: > On Apr 1, 11:44 am, John Nagle <[EMAIL PROTECTED]> wrote: >> Michael B. Trausch wrote: >> > In short: How do I create a string that contains raw binary content >> > without Python caring? Is that possible? >> >> Given where we're now at with strings

Re: I18n issue with optik

2007-04-01 Thread Thorsten Kampe
* Thorsten Kampe (Sun, 1 Apr 2007 20:22:51 +0100) > * Thorsten Kampe (Sun, 1 Apr 2007 20:08:39 +0100) > > * Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100) > > > Yes, I could do that but I'd rather know first if my code is wrong or > > > the optparse code. > > > > It might be the bug mentioned in

Re: Extract information from HTML table

2007-04-01 Thread Dotan Cohen
On 1 Apr 2007 07:56:04 -0700, Ulysse <[EMAIL PROTECTED]> wrote: > I have seen the Beautiful Soup online help and tried to apply that to > my problem. But it seems to be a little bit hard. I will rather try to > do this with regular expressions... > If you think that Beautiful Soup is difficult tha

Re: I18n issue with optik

2007-04-01 Thread Jarek Zgoda
Thorsten Kampe napisał(a): >>> Under Windows I get " File "G:\program files\python\lib\encodings >>> \cp1252.py", line 12, in encode >>>return codecs.charmap_encode(input,errors,encoding_table)" >> I'm not very experienced with internationalization, but if you change:: >> >> gettext.insta

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Guido van Rossum
+18446744073709551616 from me too. This also fits nicely in with my plan to abandon the python-dev and python-3000 mailing lists. Mailing lists are so 20th century! I propose that from now on, all Python development should be carried out on blogs, so that readers can use customized RSS feeds to re

Re: socket read timeout

2007-04-01 Thread Bryan Olson
Steve Holden wrote: > Hendrik van Rooyen wrote: >> Are sockets full duplex? >> > Yes. But you have to use non-blocking calls in your application to use > them as full-duplex in your code. Hmmm... I'm missing something. Suppose I have one thread (or process) reading from a blocking-mode socket whi

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-04-01 Thread John Nagle
Kay Schluehr wrote: > On Apr 1, 6:07 pm, John Nagle <[EMAIL PROTECTED]> wrote: > >>Kay Schluehr wrote: >> >>>Indeed. The only serious problem from an acceptance point of view is >>>that Mark tried to solve the more difficult problem first and hung on >>>it. Instead of integrating a translator/comp

Overlapping matches

2007-04-01 Thread Rehceb Rotkiv
In the re documentation, it says that the matching functions return "non- overlapping" matches only, but I also need overlapping ones. Does anyone know how this can be done? Regards, Rehceb Rotkiv -- http://mail.python.org/mailman/listinfo/python-list

Port Function crc_ccitt_update from C++

2007-04-01 Thread Py Thorneiro
Hi folks, Please, I don´t understand exactly what this function CRC CCITT UPDATE in C++ AVR can be ported to Python.. uint16_t crc_ccitt_update (uint16_t crc, uint8_t data) { data ˆ= lo8 (crc); data ˆ= data << 4; return uint16_t)data << 8) | hi8 (crc)) ˆ (uint8_t)(data >> 4) ˆ ((uin

Re: Overlapping matches

2007-04-01 Thread Ant
On Apr 1, 9:38 pm, Rehceb Rotkiv <[EMAIL PROTECTED]> wrote: > In the re documentation, it says that the matching functions return "non- > overlapping" matches only, but I also need overlapping ones. Does anyone > know how this can be done? Something like the following: import re s = "" p

Re: ISO programming projects

2007-04-01 Thread Daniel Nogradi
> I'm looking for a collection of useful programming projects, at > the "hobbyist" level. > > My online search did turn up a few collections (isolated projects > are less useful to me at the moment), but these projects are either > more difficult than what I'm looking for (e.g. code a C compiler) >

Re: I18n issue with optik

2007-04-01 Thread Leo Kislov
On Apr 1, 8:47 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > I guess the culprit is this snippet from optparse.py: > > # used by test suite > def _get_encoding(self, file): > encoding = getattr(file, "encoding", None) > if not encoding: > encoding = sys.getdefaultencoding() >

Clean "Durty" strings

2007-04-01 Thread Ulysse
Hello, I need to clean the string like this : string = """ bonne mentalité mec!:) \nbon pour info moi je suis un serial posteur arceleur dictateur ^^* \nmais pour avoir des resultats probant il faut pas faire les mariolles, comme le "fondateur" de b

Re: ISO programming projects

2007-04-01 Thread Sherm Pendley
kj <[EMAIL PROTECTED]> writes: > I'm looking for a collection of useful programming projects, at > the "hobbyist" level. > > My online search did turn up a few collections (isolated projects > are less useful to me at the moment), but these projects are either > more difficult than what I'm lookin

Re: [Python-Dev] Python 3000 PEP: Postfix type declarations

2007-04-01 Thread Shane Geiger
OMG, I was starting to reconsider Ruby. Maël Benjamin Mettler wrote: Is this supposed to be a joke? First of April? Likely. -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Econ

Question about using urllib2 to load a url

2007-04-01 Thread ken
Hi, i have the following code to load a url. My question is what if I try to load an invalide url ("http:// www.heise.de/"), will I get an IOException? or it will wait forever? Thanks for any help. opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) urllib2.install_opener(opener)

Re: Using Simple MAPI with MS Outlook 2007

2007-04-01 Thread Lenard Lindstrom
[EMAIL PROTECTED] wrote: > Hi there, > > I'd like to send emails from a Python program using Simple MAPI. I've > tried this code: > http://mail.python.org/pipermail/python-list/2004-December/298066.html > and it works well with Outlook Express 6 and Thunderbird 1.5, but it > doens't work at all w

Re: Character set woes with binary data

2007-04-01 Thread Lenard Lindstrom
John Nagle wrote: > Michael B. Trausch wrote: >> In short: How do I create a string that contains raw binary content >> without Python caring? Is that possible? > >Given where we're now at with strings in Python, Python should > really have a "byte" type and a way to deal with arrays of byt

Re: shutil.copy Problem

2007-04-01 Thread Leo Kislov
On Mar 28, 7:01 am, David Nicolson <[EMAIL PROTECTED]> wrote: > Hi John, > > That was an excellent idea and it was the cause problem. Whether this > is a bug inshutilI'm not sure. > > Here is the traceback, Python 2.4.3 on Windows XP: > > > > > > > C:\Documents and Settings\Güstav>C:\python243\py

Re: Overlapping matches

2007-04-01 Thread attn . steven . kuo
On Apr 1, 1:38 pm, Rehceb Rotkiv <[EMAIL PROTECTED]> wrote: > In the re documentation, it says that the matching functions return "non- > overlapping" matches only, but I also need overlapping ones. Does anyone > know how this can be done? Perhaps lookahead assertions are what you're looking for?

Launch script on Linux using Putty

2007-04-01 Thread Ulysse
Hello, I have a python script which runs all the time (using of library threading). I would like this scipt to run on a remote linux Os using Putty. The problem is, when I close Putty command line window running on my Win PC, the python script stops to run too. I tried to use cron tables instead.

Is this a wxPython 2.8.0 bug with GetItemText method of wxTreeCtrl?

2007-04-01 Thread eC
I use a tree control in my application and was hoping to use use the GetItemText method to read the new label of the tree item after the user has edited it. So in the EVT_TREE_END_LABEL_EDIT event handler, i call this method but the old label (previous value before the edti) is returned. Is there s

Re: Launch script on Linux using Putty

2007-04-01 Thread Michael Hoffman
Ulysse wrote: > Hello, > > I have a python script which runs all the time (using of library > threading). I would like this scipt to run on a remote linux Os using > Putty. The problem is, when I close Putty command line window running > on my Win PC, the python script stops to run too. > > I tri

How can i compare a string which is non null and empty

2007-04-01 Thread [EMAIL PROTECTED]
Hi, how can i compare a string which is non null and empty? i look thru the string methods here, but cant find one which does it? http://docs.python.org/lib/string-methods.html#string-methods In java,I do this: if (str != null) && (!str.equals("")) how can i do that in python? -- http

Re: How can i compare a string which is non null and empty

2007-04-01 Thread hlubenow
[EMAIL PROTECTED] wrote: > > Hi, > > how can i compare a string which is non null and empty? > > > i look thru the string methods here, but cant find one which does it? > > http://docs.python.org/lib/string-methods.html#string-methods > > In java,I do this: > if (str != null) && (!str.equals

Re: How can i compare a string which is non null and empty

2007-04-01 Thread Georg Brandl
[EMAIL PROTECTED] schrieb: > Hi, > > how can i compare a string which is non null and empty? > > > i look thru the string methods here, but cant find one which does it? > > http://docs.python.org/lib/string-methods.html#string-methods > > In java,I do this: > if (str != null) && (!str.equals("

Re: Pygame Q (linux) beginner

2007-04-01 Thread enquiring mind
Gabriel Genellina wrote: > > En Sat, 31 Mar 2007 23:37:16 -0300, enquiring mind <"enquiring > mind"@braindead.com> escribió: > > > Running 2.4.1 Python (learning) > > Running SUSE Linux 10 > > > > Am learning from a new books that mostly deals with windows python and > > Pygames called "Game Prog

Re: How can i compare a string which is non null and empty

2007-04-01 Thread eC
On Apr 2, 12:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > how can i compare a string which is non null and empty? > > i look thru the string methods here, but cant find one which does it? > > http://docs.python.org/lib/string-methods.html#string-methods > > In java,I do this: > i

  1   2   >