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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<    1   2