Put the output from all my programs in one place

2008-09-01 Thread Jesse Aldridge
I want to put all the output from all of my python programs in one place. I've been trying to get this working for the last few days, but there are lots of annoying little details that are making the process quite difficult. I'm wondering if anyone can help me get this working. Currently I have o

Re: The Importance of Terminology's Quality

2008-09-01 Thread Martin Gregorie
On Mon, 01 Sep 2008 12:04:05 -0700, Robert Maas, http://tinyurl.com/uh3t wrote: >> From: George Neuner <[EMAIL PROTECTED]> A friend of mine had an >> early 8080 micros that was programmed through the front panel using >> knife switches > > When you say "knife switches", do you mean the kind that

Re: enhancing/wrapping an existing instance of a duck

2008-09-01 Thread Bruno Desthuilliers
Neville Dempsey a écrit : What do I need to add to HTMLDecorator? A simpler example: import cgi class ClassX(object): pass # ... with own __repr__ class ClassY(object): pass # ... with own __repr__ inst_x=ClassX() Why do you need to prefix your variables with 'inst_' ? inst_y=ClassY(

encoding

2008-09-01 Thread Gandalf
if i want to print utf-8 string i should writre: print u"hello word" but what happen if i want to print variable? thank you -- http://mail.python.org/mailman/listinfo/python-list

Play AVI files as cut-scene... in BGE - HOW?

2008-09-01 Thread jmdeschamps
Blender Game Engine does not seem able to just play an AVI clip file... I want to play these files as cut-scenes in a game - subprocess it to the OS, and continue on return seems a good solution - but so sorry, it's been a while since I've delved in such places... I need a refresher. Must be plat

Re: encoding

2008-09-01 Thread Diez B. Roggisch
Gandalf schrieb: if i want to print utf-8 string i should writre: print u"hello word" No, you don't. You write print u"hello world".encode("utf-8") Read this: http://www.reportlab.com/i18n/python_unicode_tutorial.html but what happen if i want to print variable? Then you do print varia

Re: Py 2.6 changes

2008-09-01 Thread Alan G Isaac
[EMAIL PROTECTED] wrote: Now math has factorial: http://docs.python.org/dev/library/math.html#math.factorial That's rather underdocumented. Does it really attempt exact calculation for arbitrary integers?? Is there any way to request a nice fast approximation for large integers (e.g., with Gos

Re: encoding

2008-09-01 Thread Gandalf
On Sep 1, 11:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Gandalf schrieb: > > > if i want to print utf-8 string i should writre: > > > print u"hello word" > > No, you don't. You write > > print u"hello world".encode("utf-8") > > Read this: > > http://www.reportlab.com/i18n/python_unicode

Re: encoding

2008-09-01 Thread Christian Heimes
Gandalf wrote: if i want to print utf-8 string i should writre: print u"hello word" but what happen if i want to print variable? u"hello world" is *not* an utf-8 encoded string. It's a unicode string. I suggest you read http://www.joelonsoftware.com/articles/Unicode.html Christian -- http

Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread akineko
Hi everyone, This is a memorandum so that other people can share the info. The following methods are declared in the Tkinter Button class. tkButtonDown(), tkButtonEnter(), tkButtonInvoke(), tkButtonLeave(), tkButtonUp() However, they are not working, when you try, you will get: _tkinter.TclError

Tkinter after() under VMware player

2008-09-01 Thread akineko
Hi everyone, I wrote a Tkinter program that has a blinking widget. The blinking is controlled by the after() method available in the Tkinter. It worked very nicely. However, when I tried the program with a Unix OS that is running under VMware (hosted OS), I noticed the blinking rate is greatly re

Re: Py 2.6 changes

2008-09-01 Thread Steven D'Aprano
On Mon, 01 Sep 2008 12:15:53 -0700, bearophileHUGS wrote: > Now math has factorial: > http://docs.python.org/dev/library/math.html#math.factorial Seen how > reduce() is removed from Python 3 (I know it's in itertools), and seeing > that for me to write a productory() function was the first usage I

Re: Py 2.6 changes

2008-09-01 Thread bearophileHUGS
Steven D'Aprano: > productory() -- I don't know that function, and googling mostly comes up > with retail product searches. Do you mean product(), Darn my English, you are right, sorry, I meant a product() of course :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: The Importance of Terminology's Quality

2008-09-01 Thread George Neuner
On Mon, 1 Sep 2008 21:03:44 + (UTC), Martin Gregorie <[EMAIL PROTECTED]> wrote: >On Mon, 01 Sep 2008 12:04:05 -0700, Robert Maas, http://tinyurl.com/uh3t >wrote: > >>> From: George Neuner <[EMAIL PROTECTED]> A friend of mine had an >>> early 8080 micros that was programmed through the front pa

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 7:45 PM, akineko <[EMAIL PROTECTED]> wrote: > Hi everyone, > > This is a memorandum so that other people can share the info. > > The following methods are declared in the Tkinter Button class. > tkButtonDown(), tkButtonEnter(), tkButtonInvoke(), tkButtonLeave(), > tkButtonUp(

Re: Py 2.6 changes

2008-09-01 Thread Mensanator
On Sep 1, 6:55�pm, [EMAIL PROTECTED] wrote: > Steven D'Aprano: > > > productory() -- I don't know that function, and googling mostly comes up > > with retail product searches. Do you mean product(), > > Darn my English, you are right, sorry, I meant a product() of > course :-) But the name product

Re: Python 3.0b2 cannot map '\u12b'

2008-09-01 Thread Terry Reedy
Marc 'BlackJack' Rintsch wrote: First, thank you for the informative responses. The windows command prompt expects cp437 because that's what old DOS programs print to it. Grrr. When the interpreter runs, it opens the command prompt window with Python running, and the window closes when Py

Re: Py 2.6 changes

2008-09-01 Thread Mensanator
On Sep 1, 2:15�pm, [EMAIL PROTECTED] wrote: > I have just re-read the list of changes in Python 2.6, it's huge, > there are tons of changes and improvements, I'm really > impressed:http://docs.python.org/dev/whatsnew/2.6.html > > I'll need many days to learn all those changes! I can see it fixes >

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread akineko
On Sep 1, 5:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > Are you trying to simulate clicks ? You should be doing it using > event_generate, more below. > Actually, I was trying to implement a "sticky" button. (Button Release is done later by another event) I already tried event_generate.

Numeric literal syntax (was: Py 2.6 changes)

2008-09-01 Thread Ben Finney
[EMAIL PROTECTED] writes: > For Python 2.7/3.1 I'd now like to write a PEP regarding the > underscores into the number literals, like: 0b_0101_, 268_435_456 > etc. +1 on such a capability. -1 on underscore as the separator. When you proposed this last year, the counter-proposal was made htt

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 10:09 PM, akineko <[EMAIL PROTECTED]> wrote: > On Sep 1, 5:52 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > >> Are you trying to simulate clicks ? You should be doing it using >> event_generate, more below. >> > > Actually, I was trying to implement a "sticky" button. > (

Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-01 Thread bearophileHUGS
Ben Finney: > I don't see any good reason (other than your familiarity with the D > language) to use underscores for this purpose, and much more reason > (readability, consistency, fewer arbitrary differences in syntax, > perhaps simpler implementation) to use whitespace just as with string > liter

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread akineko
On Sep 1, 6:34 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > This is an illusion you have, calling those methods are not the way > for explicitly controlling button's behavior, not more than generating > proper events. The explicit way is to not use a button, instead > (ab)use Canvas. Some of

Re: (in memory) database

2008-09-01 Thread Zentrader
On Ubuntu you want to install something like python-sqlite (a search for "python" should turn up everything). There are 2 parts to this, SQLite and the python bindings to SQLite. So you seem to have SQLite installed but not the Python bindings. Also, on some systems you have to have python-sqlit

Re: Processes in Linux from Python

2008-09-01 Thread Derek Martin
On Mon, Sep 01, 2008 at 08:40:42AM +0200, Diez B. Roggisch wrote: > Johny schrieb: > >To get a number of the http processes running on my Linux( Debia box) > >I use > >ps -ef | grep "[h]ttpd" | wc -l [...] > The shell does the exact same thing. And by the way: i think you miss a > > grep -v grep

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread Guilherme Polo
On Mon, Sep 1, 2008 at 11:01 PM, akineko <[EMAIL PROTECTED]> wrote: > On Sep 1, 6:34 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: >> This is an illusion you have, calling those methods are not the way >> for explicitly controlling button's behavior, not more than generating >> proper events. The

python mechanize/libxml2dom question

2008-09-01 Thread bruce
hi... i've got the following situation, with the following test url: "http://schedule.psu.edu/soc/fall/Alloz/a-c/acctg.html#";. i can generate a list of the tables i want for the courses on the page. however, when i try to create the xpath query, and plug it into the xpath within python, i'm miss

python mechanize/libxml2dom question

2008-09-01 Thread bruce
hi... i've got the following situation, with the following test url: "http://schedule.psu.edu/soc/fall/Alloz/a-c/acctg.html#";. i can generate a list of the tables i want for the courses on the page. however, when i try to create the xpath query, and plug it into the xpath within python, i'm miss

Re: Tkinter: tkButtonDown, tkButtonEnter, tkButtonInvoke, tkButtonLeave, tkButtonUp

2008-09-01 Thread akineko
On Sep 1, 8:28 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > Can you clarify what is this "sticky" behavior ? Are you referring to > a toggle button ? If yes, then you might be after a simple > Checkbutton: > > checkbutton = Tkinter.Checkbutton(indicatoron=False, text='test') I wouldn't spend

Re: Numeric literal syntax

2008-09-01 Thread Ben Finney
[EMAIL PROTECTED] writes: > Ben Finney: > > I don't see any good reason (other than your familiarity with the > > D language) to use underscores for this purpose, and much more > > reason (readability, consistency, fewer arbitrary differences in > > syntax, perhaps simpler implementation) to use w

Re: How to print first(national) char from unicode string encoded inutf-8?

2008-09-01 Thread Mark Tolonen
"Marco Bizzarri" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Mon, Sep 1, 2008 at 3:25 PM, <[EMAIL PROTECTED]> wrote: When I do ${urllib.unquote(c.user.firstName)} without encoding to latin-1 I got different chars than I will get: no Łukasz but Å ukasz -- http://mail.pytho

Re: Numeric literal syntax

2008-09-01 Thread Fredrik Lundh
Ben Finney wrote: I would argue that the precedent, already within Python, for using a space to separate pieces of a string literal, is more important than precedents from other programming languages. that precedent also tells us that the whitespace approach is a common source of errors. tak

Re: Process "Killed"

2008-09-01 Thread dieter h
On Sat, Aug 30, 2008 at 11:07 AM, Eric Wertman <[EMAIL PROTECTED]> wrote: >> I'm doing some simple file manipulation work and the process gets >> "Killed" everytime I run it. No traceback, no segfault... just the >> word "Killed" in the bash shell and the process ends. The first few >> batch runs w

python XPATH question - mechanize/libxml2dom

2008-09-01 Thread bruce
hi... i can use an xpath query to create a node from an html/dom representation. however, if i have a node, is there a way to generate an xpath query from the node. in testing with firefox/dom inspector, i can use "ancestor::*", but i can't determine where/how to implement this using mechanize/li

Re: python mechanize/libxml2dom question

2008-09-01 Thread Stefan Behnel
bruce wrote: > i've got the following situation, with the following test url: > "http://schedule.psu.edu/soc/fall/Alloz/a-c/acctg.html#";. > > i can generate a list of the tables i want for the courses on the page. > however, when i try to create the xpath query, and plug it into the xpath > withi

Re: Put the output from all my programs in one place

2008-09-01 Thread alex23
On Sep 2, 6:30 am, Jesse Aldridge <[EMAIL PROTECTED]> wrote: > I want to put all the output from all of my python programs in one > place. Have you considered using the python logging module? http://docs.python.org/lib/module-logging.html http://www.onlamp.com/pub/a/python/2005/06/02/logging.html

Re: Numeric literal syntax (was: Py 2.6 changes)

2008-09-01 Thread Steven D'Aprano
On Tue, 02 Sep 2008 11:13:27 +1000, Ben Finney wrote: > [EMAIL PROTECTED] writes: > >> For Python 2.7/3.1 I'd now like to write a PEP regarding the >> underscores into the number literals, like: 0b_0101_, 268_435_456 >> etc. > > +1 on such a capability. > > -1 on underscore as the separator

Re: Getting an objetcs dict?

2008-09-01 Thread alex23
On Sep 2, 4:31 am, ssecorp <[EMAIL PROTECTED]> wrote: > X.__dict__() and ngot a dict of its variables. > > Now i get errors doing this. what am i doing wrong? The immediate problem is you're not reading the error messages. >>> X.__dict__() Traceback (most recent call last): File "", line 1, in

<    1   2