Re: XML / Unicode / SAX question

2007-07-03 Thread Stefan Behnel
IamIan wrote: > I am using SAX to parse XML that has numeric html entities I need to > convert and feed to JavaScript as part of a CGI. I can get the > characters to print correctly, but not without being surrounded by > linebreaks: > > def characters(self, ch): > if self.isNews: > ch =

Re: XML / Unicode / SAX question

2007-07-03 Thread Stefan Behnel
Stefan Behnel wrote: > Note that you have to merge character sequences yourself in SAX. > There is no guarantee into how many chunks the textual context of a single tag ^ content ^ > is broken before it is passed to the characters() SAX method.

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Peter J. Holzer
On 2007-07-04 00:14, Dr.Ruud <[EMAIL PROTECTED]> wrote: > Peter J. Holzer schreef: >> Since a day with a leap second has 86401 seconds (or 86399, but that >> hasn't happened yet) > > Many systems allow a seconds value of 0..61, so minutes (actually > months) with two leap seconds are foreseen. Tha

Re: import mysteries

2007-07-03 Thread Peter Otten
David Abrahams wrote: > > on Thu Jun 21 2007, Peter Otten <__peter__-AT-web.de> wrote: > >> David Abrahams wrote: >> >>> I'm pretty comfortable with Python, but recently I'm constantly >>> finding mysterious issues with import. For example, looking at >>> >>> http://genshi.edgewall.org/brows

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Peter J. Holzer
On 2007-07-03 23:15, CBFalconer <[EMAIL PROTECTED]> wrote: > "Peter J. Holzer" wrote: >> Richard Heathfield <[EMAIL PROTECTED]> wrote: >> > ... snip ... >> >>> In that case, the obvious choice is Greenwich Mean Time. :-) >> >> Hardly. That hasn't been in use for over 35 years (according to >> Wik

Re: Building a Python app with Mozilla

2007-07-03 Thread [EMAIL PROTECTED]
On Jul 4, 2:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thorsten Kampe wrote: > > Hi, > > > I've already sent this to the Komodo mailing list (which seemed to me > > the more appropriate place) but unfortunately I got no response. > > > I'd like to build a Python GUI app. Neither Tkinte

Re: How can i change an Object type ?

2007-07-03 Thread Tim Roberts
KuhlmannSascha <[EMAIL PROTECTED]> wrote: > >i tried now for several hours to read through a win32com API to access >Itunes and read out myplaylists. > >First of all the Code: >... >The current Logic is to access first Itunes and then a Playlist >Collection. >This Playlist collection returns differ

XML / Unicode / SAX question

2007-07-03 Thread IamIan
I am using SAX to parse XML that has numeric html entities I need to convert and feed to JavaScript as part of a CGI. I can get the characters to print correctly, but not without being surrounded by linebreaks: from xml.sax import make_parser from xml.sax.handler import ContentHandler import htmle

Re: using boost to extend python with c++

2007-07-03 Thread Volodya
Please see http://lists.boost.org/boost-build/2007/05/1.php -- the solution is to add "using python ;" to tools/build/v2/user-config.jam. -- http://mail.python.org/mailman/listinfo/python-list

Re: import mysteries

2007-07-03 Thread Martin v. Löwis
> Yeah, of course. I just don't think anything that perverse is > happening in these cases. Take, for another example, > http://trac.edgewall.org/ticket/5646#comment:3 [that perverse == putting a name into globals()] When you do gettext.install(...), it will put the name _ into the __builtins__

Re: ActivePython

2007-07-03 Thread MC
Hi! > Why might one choose to use ActivePython instead of using the free CPython? quiet installation? -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Building a Python app with Mozilla

2007-07-03 Thread [EMAIL PROTECTED]
Thorsten Kampe wrote: > Hi, > > I've already sent this to the Komodo mailing list (which seemed to me > the more appropriate place) but unfortunately I got no response. > > I'd like to build a Python GUI app. Neither Tkinter nor Wxpython nor > PyQT are actually what I want (because the lack of GUI

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-03 Thread greg
Paul Rubin wrote: > E.g. your program might pass its test and run properly for years > before some weird piece of input data causes some regexp to not quite > work. Then you get a bug report, you fix it, and you add a test for it so that particular bug can't happen again. > Once I got the > funct

Re: ActivePython

2007-07-03 Thread [EMAIL PROTECTED]
On Jul 4, 2:03 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > Frank Swarbrick <[EMAIL PROTECTED]> wrote: > > Why might one choose to use ActivePython instead of using the free CPython? > > I believe ActivePython is also free, and it's packaged up differently > (with more 3rd party modules accompany

Re: ActivePython

2007-07-03 Thread Alex Martelli
Frank Swarbrick <[EMAIL PROTECTED]> wrote: > Why might one choose to use ActivePython instead of using the free CPython? I believe ActivePython is also free, and it's packaged up differently (with more 3rd party modules accompanying it than the standard Python distribution), which might make it a

Re: Questions about input lines (maximum length and continuation)

2007-07-03 Thread Dan Bishop
On Jul 3, 10:41 pm, Robert Dodier <[EMAIL PROTECTED]> wrote: > Hello, > > I'm planning to write a program which automatically generates > Python code. > > (1) Is there a limit on the length of a line in a Python program? No. > (2) From what I understand, symbols, operators, and numbers > cannot b

Re: Python compilation ??

2007-07-03 Thread VSmirk
On Jul 3, 10:42 pm, Frank Swarbrick <[EMAIL PROTECTED]> wrote: > John Nagle wrote: > > Evan Klitzke wrote: > >> On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: > > >>> Is python a compiler language or interpreted language. If it is > >>> interpreter > >>> , then why do we have to compile it? > >

Questions about input lines (maximum length and continuation)

2007-07-03 Thread Robert Dodier
Hello, I'm planning to write a program which automatically generates Python code. (1) Is there a limit on the length of a line in a Python program? (2) From what I understand, symbols, operators, and numbers cannot be broken across lines continued with the backslash character. Is there any way t

Re: How can i change an Object type ?

2007-07-03 Thread Jerry Hill
On 7/3/07, KuhlmannSascha <[EMAIL PROTECTED]> wrote: > I am focussing on the Playlists of the object UserPlaylist. > (CodeLine: if curPlaylist.Kind == 2:) > After that i should be sure to have a UserPlaylist, but Python stops > with an exception that the requested Attribute "Smart" is not > avai

UTF-8 Support of Curses in Python 2.5

2007-07-03 Thread shrek2099
Hi All, Recently I ran into a problem with UTF-8 surrport when using curses library in python 2.5 in Fedora 7. I found out that the program using curses cannot print out unicode characters correctly on UTF-8 enabled console. I googled around and got an impression that the reason for this problem i

Re: Python compilation ??

2007-07-03 Thread Frank Swarbrick
John Nagle wrote: > Evan Klitzke wrote: >> On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: >> >>> Is python a compiler language or interpreted language. If it is >>> interpreter >>> , then why do we have to compile it? >> > Iron Python compiles to Microsoft's byte code as used by their > ".NE

ActivePython

2007-07-03 Thread Frank Swarbrick
Why might one choose to use ActivePython instead of using the free CPython? -- http://mail.python.org/mailman/listinfo/python-list

How can i change an Object type ?

2007-07-03 Thread KuhlmannSascha
Hi, i tried now for several hours to read through a win32com API to access Itunes and read out myplaylists. First of all the Code: import os, sys, pythoncom, win32com.client, pywintypes, sets def showplaylists(): iTunes = win32com.client.Dispatch("iTunes.Application") playlists = iTunes

Re: Tiny/small/minimalist Python?

2007-07-03 Thread Frank Swarbrick
rtk wrote: > > I did look briefly at Python 1.5.2, since it is simpler, but I'm > taking the trouble I've had as an excuse to learn a new language. So > far, I'm liking Lua, save the big pet peeve of starting indices at 1 > and not 0 as all sane people do. Hmm, that in and of itself sounds like

Plugging a pseudo-memory leak

2007-07-03 Thread Adam Atlas
I have a program that seemed to be leaking memory, but after debugging, it seemed it just wasn't getting around to collecting the objects in question often enough. The objects are very long-lived, so they probably end up in generation 2, and don't get collected for a long time. Is there any way I c

Re: error return without exception set

2007-07-03 Thread Marcus
Will McGugan wrote: > Thanks for the explanation. It happens when I'm debugging a wxWidgets > application with Komodo, but I can't trap it. I'm guessing it must be a > Komodo issue, because I dont get it if I run it without the debugger. The error happens in PyDev for Eclipse also -- only while de

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Dr.Ruud
Peter J. Holzer schreef: > Since a day with a leap second has 86401 seconds (or 86399, but that > hasn't happened yet) Many systems allow a seconds value of 0..61, so minutes (actually months) with two leap seconds are foreseen. A leap second may be introduced at the end of any month, the prefer

Re: Building a Python app with Mozilla

2007-07-03 Thread Todd Whiteman
Thorsten Kampe wrote: > Hi, > > I've already sent this to the Komodo mailing list (which seemed to me > the more appropriate place) but unfortunately I got no response. Hi Thorsten, I'm sorry that we (Komodo team) missed it, but I did not see such a message on the Komodo mailing list. > > I'

converting datetime object in UTC to local time

2007-07-03 Thread Matt
Hi all, So a lot of digging on doing this and still not a fabulous solution: import time # this takes the last_modified_date naive datetime, converts it to a # UTC timetuple, converts that to a timestamp (seconds since the # epoch), subtracts the timezone offset (in seconds), and then converts #

Re: Ask for a password with OptParse

2007-07-03 Thread John Machin
On Jul 4, 8:50 am, Mariano Mara <[EMAIL PROTECTED]> wrote: > Hi everyone. > I'm building a script with optparse. One of the parameters will be a > password. > How can I code the optparse to accept/handle/format the password so that > the user does not have to write it in plain/visible text in the t

Re: object references/memory access

2007-07-03 Thread Terry Reedy
"Karthik Gurusamy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |If all you had is just two processes, P and C and the amount of data |flowing is less (say on the order of 10's of buffer-size ... e.g. 20 |times 4k), *a lot* may not be right quantifier. Have pipe buffer sizes real

Re: Ask for a password with OptParse

2007-07-03 Thread Robert Kern
Mariano Mara wrote: > Hi everyone. > I'm building a script with optparse. One of the parameters will be a > password. > How can I code the optparse to accept/handle/format the password so that > the user does not have to write it in plain/visible text in the terminal? You wouldn't ask for the pa

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread CBFalconer
"Peter J. Holzer" wrote: > Richard Heathfield <[EMAIL PROTECTED]> wrote: > ... snip ... > >> In that case, the obvious choice is Greenwich Mean Time. :-) > > Hardly. That hasn't been in use for over 35 years (according to > Wikipedia). I am glad to see you depend on absolutely reliable sources.

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-07-03 Thread Paul Boddie
Paul Boddie wrote: > [chroot "jail" solutions] > I don't have the details with me now, but I'll probably upload the > code in the near future and post some kind of explanation of what it > does here. I've now uploaded the code to the Python Package Index: http://www.python.org/pypi/jailtools I

Re: import mysteries

2007-07-03 Thread David Abrahams
on Thu Jun 21 2007, Peter Otten <__peter__-AT-web.de> wrote: > David Abrahams wrote: > >> I'm pretty comfortable with Python, but recently I'm constantly >> finding mysterious issues with import. For example, looking at >> >> http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.p

Ask for a password with OptParse

2007-07-03 Thread Mariano Mara
Hi everyone. I'm building a script with optparse. One of the parameters will be a password. How can I code the optparse to accept/handle/format the password so that the user does not have to write it in plain/visible text in the terminal? TIA, Mariano. -- http://mail.python.org/mailman/listin

Re: import mysteries

2007-07-03 Thread David Abrahams
on Thu Jun 21 2007, Ben Finney wrote: > David Abrahams <[EMAIL PROTECTED]> writes: > >> I'm pretty comfortable with Python, but recently I'm constantly >> finding mysterious issues with import. For example, looking at >> >> http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py

Re: import mysteries

2007-07-03 Thread David Abrahams
on Fri Jun 22 2007, "Steven D'Aprano" wrote: > There are ways to bypass the import system. The most obvious would be to > write directly to globals. > spanish_inquisition > Traceback (most recent call last): > File "", line 1, in ? > NameError: name 'spanish_inquisition' is not defined

Re: Python and ARexx (was Re: Tiny/small/minimalist Python?)

2007-07-03 Thread Irmen de Jong
Dennis Lee Bieber wrote: > On 3 Jul 2007 10:03:45 GMT, Jorgen Grahn > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > >> How does Python combine with ARexx? Can you control applications >> which provide an ARexx interface? >> > Irmen had supplied a Python module that ha

Re: object references/memory access

2007-07-03 Thread Karthik Gurusamy
On Jul 3, 2:33 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > If the problem does not require two way communication, which is > > typical of a producer-consumer, it is a lot faster to allow P to fully > > run before C is started. > > Why do you say it's *a lot* faster. I find that it is a lit

Re: Restarting a Python Application

2007-07-03 Thread Matimus
On Jul 3, 2:27 pm, [EMAIL PROTECTED] wrote: > Hi, > > I packaged up an application I am developing into an executable. In > the application, it has user configurable options. I would like a way > to restart the application so that the new options the user chooses > can be applied. Firefox can resta

Re: mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
On Jul 4, 12:42 am, Ben Cartwright <[EMAIL PROTECTED]> wrote: > On Jul 3, 11:14 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > > > The following (pinched > > > > from Dive Into Python) seems to work perfectly in Idle, but > > > > falls at the final hurdle when run as a cgi script > > > Put this

Re: object references/memory access

2007-07-03 Thread Martin v. Löwis
> If the problem does not require two way communication, which is > typical of a producer-consumer, it is a lot faster to allow P to fully > run before C is started. Why do you say it's *a lot* faster. I find that it is a little faster. The only additional overhead from switching forth and back be

Restarting a Python Application

2007-07-03 Thread kyosohma
Hi, I packaged up an application I am developing into an executable. In the application, it has user configurable options. I would like a way to restart the application so that the new options the user chooses can be applied. Firefox can restart itself. Does anyone know how to accomplish this in P

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-07-03 Thread Chris Barts
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote on Monday 25 June 2007 15:43 in comp.emacs <[EMAIL PROTECTED]>: > > Eclipse has something that generates "import" statements with > a few keystrokes, and for me that's almost in the "killer app > [feature]" class. This is a sign of a weak programming

Re: error return without exception set

2007-07-03 Thread Will McGugan
Peter Otten wrote: > > The "error return without exception set" part looks like a failed > consistency check in ceval.c -- perhaps caused by a broken extension > written in C. > > But you'd have to give some more context. Thanks for the explanation. It happens when I'm debugging a wxWidgets ap

Re: mysteries of urllib/urllib2

2007-07-03 Thread O.R.Senthil Kumaran
* Adrian Smith <[EMAIL PROTECTED]> [2007-07-03 08:14:32]: > some access. Apparently there's a way to change the user-agent string > by subclassing urllib's URLopener class, but that's beyond my comfort > zone at present. Read the urllib2 how-to located at ActiveState Documentation pages. That giv

Re: Programming Idiomatic Code

2007-07-03 Thread Bruno Desthuilliers
Nathan Harmston a écrit : >> > Using a module global for this kind of data is usually a bad idea >> > (except eventually for run-once throw-away scripts, and even then...) >> > >> > Why is this a bad idea? >> >> Don't you have any idea ? > > Not really.problem with access, using unneeded memor

Re: try/finally in threads

2007-07-03 Thread George Sakkis
On Jul 3, 5:05 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > I posted this on the Pyro list but I'm not sure if it's related > > specifically to Pyro. The "finally" clause below is not executed when > > f() runs on on a (daemon) thread and the program exits. DAEMON h

Re: The best platform and editor for Python

2007-07-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, kimiraikkonen <[EMAIL PROTECTED]> wrote: >Thanks for the replies so far. Also i have to learn: > >What is the most reliable and easy way to start learning Ptyhon? >Books? Trusted code sammples(where?)? . .

Re: what is the PythonWin

2007-07-03 Thread Trent Mick
Dennis Lee Bieber wrote: > PythonWin is (or was) part of the win32 extension library for > Python. It is a separate download -- unless you downloaded the > ActiveState Windows build of Python. The ActiveState build includes the > win32 libraries and "PythonWin" (but lacks a few of the, otherw

Re: Python compilation ??

2007-07-03 Thread Evan Klitzke
On 7/3/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Evan Klitzke a écrit : > > On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: > >> Is python a compiler language or interpreted language. If it is > >> interpreter > >> , then why do we have to compile it? > > > > It's an interpreted langu

Re: object references/memory access

2007-07-03 Thread Karthik Gurusamy
On Jul 2, 10:57 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >>> I have found the stop-and-go between two processes on the same machine > >>> leads to very poor throughput. By stop-and-go, I mean the producer and > >>> consumer are constantly getting on and off of the CPU since the pipe > >>>

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread MC
Hi! >> non-Ascii characters in identifiers > > And this change may be already in a Python 2.x before P3K. Good new! (if it's True...) -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: The best platform and editor for Python

2007-07-03 Thread ed
for my part, i'm a big fan of DrPython for writing python code (especially on windows). http://drpython.sourceforge.net/ you will need wxPython to have it running though It's not per se an IDE but it has a lot of feature to help you writing with some interesting plug- ins. You can launch code in

Re: Help building GUI with Tix - solution

2007-07-03 Thread infidel
I figured it out after finding an example somewhere: >>> import Tix >>> app = Tix.Tk("Demo") >>> panes = Tix.PanedWindow(app) >>> left = panes.add('left') >>> right = panes.add('right') >>> tree = Tix.Tree(left) >>> notebook = Tix.NoteBook(right) >>> tree.pack() >>> notebook.pack() >>> panes.pack(

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Neil Cerutti
On 2007-07-03, Méta-MCI <[EMAIL PROTECTED]> wrote: > Hi! > >> Python 3000 doesn't include many significant changes to the language > > One exemple : non-Ascii characters in identifiers (= no significatif > change?) It is one of not many? -- Neil Cerutti -- http://mail.python.org/mailman/listi

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Marc 'BlackJack' Rintsch
On Tue, 03 Jul 2007 19:54:57 +0200, Méta-MCI wrote: >> Python 3000 doesn't include many significant changes to the language > > One exemple : non-Ascii characters in identifiers (= no significatif > change?) Not in the sense that old code doesn't work anymore. ASCII sources still work in Pyth

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> "Clipper-derived unreadable drivel" > > I'm intrigued, what language are you working in? > > Clipper v5 was a pretty impressive development language for 1990 - with > code blocks, a flexible pre-processor, garbage collection, exception > handling, decent speed and an API to allow easy integration

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> > Using a module global for this kind of data is usually a bad idea > > (except eventually for run-once throw-away scripts, and even then...) > > > > Why is this a bad idea? > > Don't you have any idea ? > -- Not really.problem with access, using unneeded memory... I grasping at straws here.

Help building GUI with Tix

2007-07-03 Thread infidel
I am trying to build a GUI using the Tix module. What I want is a paned window with a tree in the left pane and a notebook in the right pane. I keep getting an error that I don't understand when adding these widgets to the panes: PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32

Re: error return without exception set

2007-07-03 Thread Peter Otten
Will McGugan wrote: > Can anyone suggest a likely cause for the following exception... > > Exception exceptions.SystemError: 'error return without exception set' > in ignored The "Exception ... ignored" part is probably caused by an exception in a finally block during garbage collection: >>> d

Re: object references/memory access

2007-07-03 Thread John Nagle
Steve Holden wrote: > Karthik Gurusamy wrote: > >> On Jul 1, 12:38 pm, dlomsak <[EMAIL PROTECTED]> wrote: > > [...] > >> >> I have found the stop-and-go between two processes on the same machine >> leads to very poor throughput. By stop-and-go, I mean the producer and >> consumer are constantly

Re: how to send files via bluetooth with python to a mobile

2007-07-03 Thread Drex
Hi, I tried the example from the site http://dev.zuckschwerdt.org/openobex/wiki/ObexFtpExampleClientPython but I am getting the following error: /home/daniel/projekty/_moje/python/send_txt_to_mobile.py Traceback (most recent call last): File "/home/daniel/projekty/_moje/python/send_txt_to_mobil

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread M�ta-MCI
Hi! > Python 3000 doesn't include many significant changes to the language One exemple : non-Ascii characters in identifiers (= no significatif change?) Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython Cannot convert from the charset 'latin-1'

2007-07-03 Thread kyosohma
On Jul 3, 11:16 am, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to teach "dugui.py" (a tiny GUI for restructuredtext written in > wxPython) to accept files in isolatin-1 encoding. It displays e.g. German > umlauts correctly but then I get a popup window saying > Python Error >

Re: object references/memory access

2007-07-03 Thread John Nagle
dlomsak wrote: > Paul Rubin wrote: > >>dlomsak <[EMAIL PROTECTED]> writes: >> >>>knowledge of the topic to help. If the above are not possible but you >>>have a really good idea for zipping large amounts of data from one >>>program to another, I'd like to hear it. > Well, I was using the regular

Re: allow scripts to use .pth files?

2007-07-03 Thread half . italian
On Jul 3, 7:35 am, Alan Isaac <[EMAIL PROTECTED]> wrote: > Suppose I have a directory `scripts`. > I'd like the scripts to have access to a package > that is not "installed", i.e., it is not on sys.path. > On this list, various people have described a variety > of tricks they use, but nobody has pr

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Neil Cerutti
On 2007-07-03, Paul McGuire <[EMAIL PROTECTED]> wrote: > 2. Change the parse actions to deref the 0'th element of t for > binop and with_. > > num.setParseAction(lambda t: Num(int(t.number))) > id_.setParseAction(lambda t: Id(t.name)) > binop.setParseAction(lambda t: BinOp(t[0].op, t[0].lhs, t[0].r

python app to emulate terminal to dialup bulletin board

2007-07-03 Thread Sells, Fred
We need to automate the download of data that is now done manually via a terminal session to a dialup bulletin board. The user uses this to upload and download files. Hard to believe in this day and age, but true. I've tried google, but the terms are just too common; all I get is clutter. So I

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread sla29970
On Jul 3, 1:10 am, Paul Rubin wrote: > Well, if you're trying to pick just one timestamp standard, I'd say > you're better off using a worldwide one rather than a national one, no > matter how the bureaucracies work. TAI is derived from atomic clocks > all over the world

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Paul McGuire
By the way, the next release of pyparsing will allow you to shortcut all of these .setResultsName calls, using this notation instead: binop = ( LPAR + oneOf("+ -")('op') + wae('lhs') + wae('rhs') + RPAR ) with_ = ( LPAR + "with" + LPAR + id_('bound_i

PyObjC and Xcode

2007-07-03 Thread Horace Enea
I'm trying to use Python on a Mac running OSX 10.4.9. I installed Python 2.5 along with Idle. My problem is that Xcode no longer works with PyObjC. It gives an error message: ImportError: No module named PyObjCTools. I've down-loaded PyObjC and re-installed it along with PyObjCTools, but still

Re: POpen - Wait For Process To Complete

2007-07-03 Thread Yongjian Xu
That's by using the P3/P4 classes not the function. the function does not provide wait() call, it simply does it for you by default. Jim On 7/3/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: Hello guys, Quite a simple one I'm hoping. I've got a process that I run using popen whi

Re: mysteries of urllib/urllib2

2007-07-03 Thread John Nagle
Adrian Smith wrote: > I'm trying to use urllib2 to download a page (I'd rather use urllib, > but I need to change the User-Agent header to look like a browser or > G**gle won't send it to me, the big meanies). The following (pinched > from Dive Into Python) seems to work perfectly in Idle, but fall

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Paul McGuire
On Jul 3, 11:08 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > C:\WINNT\system32\cmd.exe /c python wae.py > ** > File "wae.py", line 6, in __main__ > Failed example: > parse('(+ 3 45)') > Exception raised: > Traceback (mos

wxPython Cannot convert from the charset 'latin-1'

2007-07-03 Thread Helmut Jarausch
Hi, I'm trying to teach "dugui.py" (a tiny GUI for restructuredtext written in wxPython) to accept files in isolatin-1 encoding. It displays e.g. German umlauts correctly but then I get a popup window saying Python Error Cannot convert from the charset 'latin-1'! How can I find out where this

Re: Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 08:54:25 -0700, Samuel <[EMAIL PROTECTED]> wrote: >On Jul 3, 3:03 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> EPIPE results when writing to a socket for which writing has been shutdown. >> This most commonly occurs when the socket has closed. You need to handle >> thi

RE: MySQL -->Python-->XML for JSviz

2007-07-03 Thread Sells, Fred
Sometimes sneaky is better than elegant. You could shell down to a command line invocation of mysql and specify -xml as the output format. I'm not sure how close that format is to what you need or how much you could leverage views (if using mysql 5.0). You could also use a command line xslt proce

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Neil Cerutti
On 2007-07-03, Paul McGuire <[EMAIL PROTECTED]> wrote: > Here is my alternative solution (not using results names). I used > the base WAE class to accept the tokens as the initialization var, > then unpack the list into variables in each respective calc() > method. I did not see the need for a su

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 15:51:30 -, ddtm <[EMAIL PROTECTED]> wrote: >On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: >> >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> > [snip] >> >> >Thank yo

ANN: Leo 4.4.3.1 released

2007-07-03 Thread Edward K Ream
Leo 4.4.3.1 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.3.1: - Fixed a

Re: Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Samuel
On Jul 3, 3:03 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > EPIPE results when writing to a socket for which writing has been shutdown. > This most commonly occurs when the socket has closed. You need to handle > this exception, since you can't absolutely prevent the socket from being > cl

Re: Python IRC bot using Twisted

2007-07-03 Thread ddtm
On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: > >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > [snip] > > >Thank you very much! It's a very useful information. One more > >question: can I c

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 15:13:46 -, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >Hi >I'm considering learning Python...but with the python 3000 comming >very soon, is it worth waiting for?? I know that the old style of >coding python will run parallel with the new, but I mean, its going to >com

Re: ebay

2007-07-03 Thread jim
On 6 20 , 11 20 , jim <[EMAIL PROTECTED]> wrote: > hello: madam and sir . we sell all kinds of laptops and digital > cam .our product is a quantity best, the price is the lowest in the > world, i think you will be interested in our product . thanks a lot! > Our Website:http://www.prs-123.com/Msn:

Re: mysteries of urllib/urllib2

2007-07-03 Thread Ben Cartwright
On Jul 3, 11:14 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > The following (pinched > > > from Dive Into Python) seems to work perfectly in Idle, but > > > falls at the final hurdle when run as a cgi script > > Put this at the top of your cgi script: > > > import cgitb; cgitb.enable() Did you

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm considering learning Python...but with the python 3000 comming > very soon, is it worth waiting for?? I know that the old style of > coding python will run parallel with the new, but I mean, its going to > come to an end eventually. It will be ye

error return without exception set

2007-07-03 Thread Will McGugan
Hi, Can anyone suggest a likely cause for the following exception... Exception exceptions.SystemError: 'error return without exception set' in ignored Thanks Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Daniel Nogradi
> Hi > I'm considering learning Python...but with the python 3000 comming > very soon, is it worth waiting for?? I know that the old style of > coding python will run parallel with the new, but I mean, its going to > come to an end eventually. > > What do you think?? > Chris 99% of what you would

Re: mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
On Jul 3, 11:25 pm, Ben Cartwright <[EMAIL PROTECTED]> wrote: > On Jul 3, 9:43 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > The following (pinched > > from Dive Into Python) seems to work perfectly in Idle, but > > falls at the final hurdle when run as a cgi script - can > > anyone suggest any

python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread [EMAIL PROTECTED]
Hi I'm considering learning Python...but with the python 3000 comming very soon, is it worth waiting for?? I know that the old style of coding python will run parallel with the new, but I mean, its going to come to an end eventually. What do you think?? Chris -- http://mail.python.org/mailman/li

POpen - Wait For Process To Complete

2007-07-03 Thread Robert Rawlins - Think Blue
Hello guys, Quite a simple one I'm hoping. I've got a process that I run using popen which writes to a file, I'm then going to read the file and parse its contents. However, getting the application to wait until the process is complete and finished writing before it reads and parses the file is

Re: trouble with sqlite under debian etch

2007-07-03 Thread Gerhard Häring
Rustom Mody wrote: > I was trying to follow the sqlalchemy tutorial on my debian etch box > and got stuck with installation. Any help/pointers will be welcome. > > First after installing sqlalchemy needed some sqlite package > synaptic showed me packages python-pysqlite, python-pysqlite1.1 and >

allow scripts to use .pth files?

2007-07-03 Thread Alan Isaac
Suppose I have a directory `scripts`. I'd like the scripts to have access to a package that is not "installed", i.e., it is not on sys.path. On this list, various people have described a variety of tricks they use, but nobody has proposed a pretty way to allow this. I am therefore assuming there i

Re: mysteries of urllib/urllib2

2007-07-03 Thread Ben Cartwright
On Jul 3, 9:43 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > The following (pinched > from Dive Into Python) seems to work perfectly in Idle, but falls at > the final hurdle when run as a cgi script - can anyone suggest > anything I may have overlooked? > > request = urllib2.Request(some_URL) > req

Re: Correct abstraction for TK

2007-07-03 Thread Luke Hoersten
Thanks for all the suggestions guys. I'm realizing that I need to chose more of a specific paradigm. With closures, I was able to stay away from unneeded classes before but Tk brings it to a whole other level. Thanks again, Luke On Jul 3, 2:50 am, Paul Rubin wrote: > [E

Re: Programming Idiomatic Code

2007-07-03 Thread Douglas Woodrow
On Tue, 3 Jul 2007 10:19:07, Nathan Harmston <[EMAIL PROTECTED]> wrote > >i m in the UK and dont have the experience but hey 10 minutes of >programming python beats 12 hours of programming in Clipper-derived >unreadable drivel (you dont know how much I appreciate Python atm). "Clipper-derived unr

Fwd: Infotech Enterprises Limited

2007-07-03 Thread Vivek Kumar
-- Forwarded message -- From: Mahendra <[EMAIL PROTECTED]> Date: Jul 3, 2007 5:17 PM Subject: Infotech Enterprises Limited To: [EMAIL PROTECTED] Hi Further to our discussions, We are looking for Python developers/ C++ who are willing to work in Hyderabad. Infotech Enterprises L

MySQL -->Python-->XML for JSviz

2007-07-03 Thread Picio
Hello all, I need some advice to choose an xml generator for jsviz a tool in javascript to create some wonderful graphs (SnowFlake or Force directed). Starting from a SQL table (mysql) I need to create a XML file with a structure like this:

  1   2   >