Re: Tkinter text widget

2007-10-07 Thread ezd
On Oct 6, 11:18 pm, goldtech <[EMAIL PROTECTED]> wrote: > I thought the "DISABLED" made it so I could not edit it. But it also > makes it so I can not scroll down. If you make the window smaller than > the content then try to put a cursor in there to use up/down arrow you > can't. > > What I want i

Re: Need help to understand garbage collection

2007-10-07 Thread David Tremouilles
Thanks Gabriel! I get it now. With your help I was able to focus on the real problem. Here is the correctly working example for the record: import gc class Test(object): def __init__(self): pass gc.collect() original_objects_id = [id(x) for x in gc.get_objects()] #create object a a

ANN: pyparsing 1.4.8 released

2007-10-07 Thread Paul McGuire
I'm happy to announce that I have just uploaded the latest release (v1.4.8) of pyparsing. This release has a few new features and corresponding demonstration examples. There are also a few minor bug-fixes, and a performance speedup in the operatorPrecedence method. Here are the notes: - Added n

Re: Top Programming Languages of 2013

2007-10-07 Thread Alan Gauld
"Dick Moores" <[EMAIL PROTECTED]> wrote > > Interesting, but I'm not sure what the criteria for "top" is. Is it a measure of power, popularity, usage? Scary that HTML/CSS should be so high though given its not a programming language at all! Ala

Re: Top Programming Languages of 2013

2007-10-07 Thread James Matthews
What are these stats based on? On 10/7/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > > > "Dick Moores" <[EMAIL PROTECTED]> wrote > > > > > > > Interesting, but I'm not sure what the criteria for "top" is. > Is it a measure of power, popularity, usage? >

Re: supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

2007-10-07 Thread David
On 10/5/07, timw.google <[EMAIL PROTECTED]> wrote: > Hi > > I want to write a python script that runs rsync on a given directory > and host. I build the command line string, but when I try to run > subprocess.call(cmd), or p=subprocess.Popen(cmd, shell=True),or > os.system(cmd), I get prompted for

Re: supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

2007-10-07 Thread David
Typo. > Another method is to setup an ssh service on the server (perhaps in Should be: > Another method is to setup an rsync service on the server (perhaps in -- http://mail.python.org/mailman/listinfo/python-list

Re: Mysql class works like php

2007-10-07 Thread gardsted
Bruno Desthuilliers wrote: > Andrey a écrit : >> Hi >> >> just a quick question about using MySQL module... are there any api / >> class available to give a higher level in working with Mysql in python? >> such as >> db.fetch_array(), >> db.fetch_rows(), >> db.query(), >> for eachrow in db.fetch_a

Re: How to create a file on users XP desktop

2007-10-07 Thread Craig Howard
On Oct 6, 2007, at 11:31 PM, goldtech wrote: > Can anyone link me or explain the following: > > I open a file in a python script. I want the new file's location to be > on the user's desktop in a Windows XP environment. fileHandle = open > (., 'w' ) what I guess I'm looking for is an enviro

configure urllib.urlretrieve timeout

2007-10-07 Thread Abandoned
Hi.. I want to set 30 second urllib.urlretrieve timeout.. Because if urllib.urlretrieve can't connect to page wait 1-2 hour... I download the images to my server with urlretrieve if you know the better way please help me. I'm sorry my bad english.. -- http://mail.python.org/mailman/listinfo/pyth

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread genro
On Oct 7, 8:35 am, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Oct 6, 12:57 pm, Bruno Desthuilliers > > > Michele Simionato a écrit : > > > > I looked at the source code and it seems fine to me, but I have > > > not used it directly, not stressed it. I need a > > > production-level WSGI sessi

Problem using subprocess.Popen on windows

2007-10-07 Thread jorma kala
Hi, I get an error that I don't understand when using the subprocess module on Windows. I guess I'm missing out something very basic. For instance, to execute and capture the output of the ms-dos dir command, I tried the following: from subprocess import * p1 = Popen(["dir"], stdout=PIPE) outp

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread James Matthews
But the question is when will the cheap hosting company's start to host normal python files! On 10/7/07, genro <[EMAIL PROTECTED]> wrote: > > On Oct 7, 8:35 am, Michele Simionato <[EMAIL PROTECTED]> > wrote: > > On Oct 6, 12:57 pm, Bruno Desthuilliers > > > > > Michele Simionato a écrit : > > > >

Re: Python + Shoutpy + Twisted Locks

2007-10-07 Thread Michel Albert
On Oct 6, 4:21 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 05 Oct 2007 04:55:55 -0300, exhuma.twn <[EMAIL PROTECTED]> escribi?: > > > [...] What I found > > is that "libshout" is blocking, which should be fine as the whole > > thing runs in it's separate thread. But the application

ANN: Pyrex 0.9.6

2007-10-07 Thread Greg Ewing
Pyrex 0.9.6 is now available: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ There is a *lot* of new stuff in this version, too much to fit into this announcement. Read all about it here: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/changes-0.9.6.html What is Pyrex?

Newbie packages Q

2007-10-07 Thread MarkyMarc
Hi All, I do not understand the packages system in python. I have read this http://docs.python.org/tut/node8.html a 100 times and I can not get it to work. I make a test app like this: *** Test/ __init__.py (a empty file) apack/ __init__.py (

a good website for softwares,movies and music etc.

2007-10-07 Thread panguohua
www.space666.com support!!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter text widget

2007-10-07 Thread goldtech
> You can scroll, but you can't see the cursor. Use > > for x in range(30): > text.insert(END, "%3d " % x + i) > > to check. > > ED I tried it w/the line numbers. On my system I see 0-23. But there is no way to scroll. Still the same result. -- http://mail.python.org/mailman/listinfo/pytho

Re: Off Topic: Gmail hates newsgroups!!!

2007-10-07 Thread Danyelle Gragsone
I just delete what people say.. so.. no ">" at all :D. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using subprocess.Popen on windows

2007-10-07 Thread Tim Golden
jorma kala wrote: > I get an error that I don't understand when using the subprocess module > on Windows. > I guess I'm missing out something very basic. > For instance, to execute and capture the output of the ms-dos dir > command, I tried the following: > > from subprocess import * > > p1 = P

Re: [Tutor] Top Programming Languages of 2013

2007-10-07 Thread Ricardo Aráoz
Alan Gauld wrote: > "Dick Moores" <[EMAIL PROTECTED]> wrote > >> >> > > Interesting, but I'm not sure what the criteria for "top" is. > Is it a measure of power, popularity, usage? > > Scary that HTML/CSS should be so high though > given its not a

Re: How to create a file on users XP desktop

2007-10-07 Thread goldtech
> > This is really a Windows question, not a Python question. You should > have been able to figure it out yourself by examining existing > environment variables. I agree, you're right. I learn more by figuring out the code myself. After Google briefly: In a DOS box type: SET This was too eas

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Steve Holden
Lawrence Oluyede wrote: > Jorge Godoy <[EMAIL PROTECTED]> wrote: >> What is good, since a lot of good things from Pylons will work with TG and a >> lot of good TG things will remain (and possibly be compatible with Pylons). >> If you take a better look at "the next version", you'll also see that th

Re: How to create a file on users XP desktop

2007-10-07 Thread Ricardo Aráoz
Matimus wrote: > On Oct 6, 8:31 pm, goldtech <[EMAIL PROTECTED]> wrote: >> Can anyone link me or explain the following: >> >> I open a file in a python script. I want the new file's location to be >> on the user's desktop in a Windows XP environment. fileHandle = open >> (., 'w' ) what I gues

Putting a line from a text file into a variable, then moving to next line

2007-10-07 Thread Vernon Wenberg III
I'm not really sure how readline() works. Is there a way to iterate through a file with multiple lines and then putting each line in a variable in a loop? -- http://mail.python.org/mailman/listinfo/python-list

Re: configure urllib.urlretrieve timeout

2007-10-07 Thread Steve Holden
Abandoned wrote: > Hi.. > I want to set 30 second urllib.urlretrieve timeout.. > Because if urllib.urlretrieve can't connect to page wait 1-2 hour... > I download the images to my server with urlretrieve if you know the > better way please help me. > > I'm sorry my bad english.. > import socket s

Re: Top Programming Languages of 2013

2007-10-07 Thread J. Cliff Dyer
James Matthews wrote: > What are these stats based on? > This survey here: http://app.sgizmo.com/reports/4762/6895/QJK8UD9C9371P37EOQ7V8OIC1RP39O/ Now how was this survey advertised? Who was asked to participate? Dunno. Clearly not MacFans, given the high number of 1 scores given to Objective

Re: Putting a line from a text file into a variable, then moving to next line

2007-10-07 Thread Jorge Godoy
Vernon Wenberg III wrote: > I'm not really sure how readline() works. Is there a way to iterate > through a file with multiple lines and then putting each line in a > variable in a loop? To know how something works you can always check the docs about this specific functionality: >>> a = open('a'

Re: Newbie packages Q

2007-10-07 Thread Steve Holden
MarkyMarc wrote: > Hi All, > > I do not understand the packages system in python. I have read this > http://docs.python.org/tut/node8.html a 100 times and I can not get it > to work. > > I make a test app like this: > *** > Test/ > __init__.py (a empty file) >

Re: Putting a line from a text file into a variable, then moving to next line

2007-10-07 Thread Tim Chase
> I'm not really sure how readline() works. Is there a way to iterate > through a file with multiple lines and then putting each line in a > variable in a loop? You can use readlines() to get the whole line (including the newline): lines = file('x.txt').readlines() or you can iterate over th

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Bruno Desthuilliers
Steve Holden a écrit : > Lawrence Oluyede wrote: (snip) >> We (Michele, myself and our colleagues) have a series of stuff we need >> to stick to so the choosing of a web framework ain't that easy. Most of >> the frameworks are a vision of the author of how to do things from >> scratch but a framewo

Re: Mysql class works like php

2007-10-07 Thread Bruno Desthuilliers
gardsted a écrit : > Bruno Desthuilliers wrote: >> Andrey a écrit : >>> Hi >>> >>> just a quick question about using MySQL module... are there any api / >>> class available to give a higher level in working with Mysql in python? >>> such as >>> db.fetch_array(), >>> db.fetch_rows(), >>> db.query()

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Michele Simionato
On Oct 7, 8:36 am, Bruno Desthuilliers > Indeed. But AFAICT, Lawrence and Michele problems is not to port an > existing web application, but to choose a web framework that will play > well with their existing *system* (RDBMS, existing apps and libs etc). > Which is quite another problem, and may el

Re: Putting a line from a text file into a variable, then moving to next line

2007-10-07 Thread Michal Bozon
On Sun, 07 Oct 2007 12:00:44 +, Vernon Wenberg III wrote: > I'm not really sure how readline() works. Is there a way to iterate > through a file with multiple lines and then putting each line in a > variable in a loop? There are always more ways how to do it.. one of them is: f = open(file

Pil image module, "mode" bug..

2007-10-07 Thread Abandoned
Hi.. I find the picture color with: im=Image.open("/%s" %name) color=im.mode #p=black & beyaz rgb=color L=grey This usually work true but in these pictures: http://malatya.meb.gov.tr/images/alt/ilsis_logo.gif http://malatya.meb.gov.tr/images/meb.gif Say me P (black&white) but these pictures are

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread lhb
Wildemar Wildenburger <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > While I agree that the word "free" implies "free of monetary cost" to > many people societies, that is by no means set in stone (talk to native > americans, blacks, jews, palestinians, etc. about the word free, see >

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 2:16 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Would it hep to observe that the atest and btest submodules attemot to > import each other? > > There is no reason I can see for apack and bpack to be subpackages. Why > not just rename atest.py as apack.py at the same level as the Test >

Re: ANN: Pyrex 0.9.6

2007-10-07 Thread Colin J. Williams
Greg Ewing wrote: > Pyrex 0.9.6 is now available: > >http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ > > There is a *lot* of new stuff in this version, too much > to fit into this announcement. Read all about it here: > >http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/chang

Override 'and' and 'or'

2007-10-07 Thread Dekker
Is it possible to override 'and' and/or 'or'? I cannot find a special method for it... __and__ and __rand__ and __or__ and __ror__ are for binary manipulation... any proposals? Have marvelous sunday, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: Pil image module, "mode" bug..

2007-10-07 Thread Michal Bozon
On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote: > Hi.. > I find the picture color with: > im=Image.open("/%s" %name) > color=im.mode #p=black & beyaz rgb=color L=grey > > This usually work true but in these pictures: > http://malatya.meb.gov.tr/images/alt/ilsis_logo.gif > http://malatya.me

Re: Override 'and' and 'or'

2007-10-07 Thread Lawrence Oluyede
Dekker <[EMAIL PROTECTED]> wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? If you want to customize the truth value testing you have to implement __nonzero_

Re: Override 'and' and 'or'

2007-10-07 Thread Bruno Desthuilliers
Dekker a écrit : > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? http://docs.python.org/ref/customization.html """ __nonzero__(self) Called to implement t

Re: Override 'and' and 'or'

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: > Is it possible to override 'and' and/or 'or'? Not without hacking the Python source code, in which case what you've got is no longer Python. Why do you want to do so? -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Dekker wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? > > Have marvelous sunday, > Marco > I guess you're looking for __nonzero__() http://docs.python.or

Re: Newbie packages Q

2007-10-07 Thread Bruno Desthuilliers
MarkyMarc a écrit : (snip) > And the atest and btest, shouldn't they be able to import each > other?? import is a statement. It's executed, like any other top-level code, when the module is imported (or the script loaded into the interpreter if it's called directly). So if A.py imports B.py and

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Wildemar Wildenburger wrote: > [whate everyone else wrote :(] > > /W Dangit! 4th of 4. Gotta type quicker. /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 4:24 pm, Bruno Desthuilliers wrote: > MarkyMarc a écrit : > (snip) > > > And the atest and btest, shouldn't they be able to import each > > other?? > > import is a statement. It's executed, like any other top-level code, > when the module is imported (or the script loaded into the interp

Re: Override 'and' and 'or'

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 16:24:35 +0200, Wildemar Wildenburger wrote: > Wildemar Wildenburger wrote: >> [whate everyone else wrote :(] >> >> /W > > Dangit! 4th of 4. > Gotta type quicker. That's okay, in two weeks time there will be 139 messages in this thread, it will have devolved into an argume

Re: Override 'and' and 'or'

2007-10-07 Thread Dekker
On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: > > Is it possible to override 'and' and/or 'or'? > > Not without hacking the Python source code, in which case what you've got > is no longer Python. > > Why do you w

weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Hi. I have a problem with weak refs and bound methods. The best explanation for the problem is a short bit of code. I have the three classes Wrapper, Foo and Bar: import weakref class Wrapper(object): def __init__(self,x): self.x = weakref.ref(x) def __call__(sel

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
When I change the class Wrapper to following, the class Foo works: class Wrapper(object): def __init__(self,x): self.func_name = x.func_name self.x = weakref.ref(x.im_self) def __call__(self,*args,**kwargs): x = self.x()

Re: Tkinter text widget

2007-10-07 Thread Simon Forman
On Oct 6, 11:18 pm, goldtech <[EMAIL PROTECTED]> wrote: > I thought the "DISABLED" made it so I could not edit it. But it also > makes it so I can not scroll down. If you make the window smaller than > the content then try to put a cursor in there to use up/down arrow you > can't. > > What I want i

Re: Newbie packages Q

2007-10-07 Thread Wildemar Wildenburger
MarkyMarc wrote: > On Oct 7, 4:24 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: >> MarkyMarc a écrit : >> import is a statement. It's executed, like any other top-level code, >> when the module is imported (or the script loaded into the interpreter >> if it's called directly). So if A.py impor

Re: Override 'and' and 'or'

2007-10-07 Thread Wildemar Wildenburger
Dekker wrote: > Well... I have to live with the (binary) __and__, __or__ option and > the user has to write: > > SqlValueInt(4) & SqlValueInt(5) --> SqlOpAnd(SqlValueInt(4), > SqlValueInt(5)) > > Thanks for your input, but __nonzero__ is not of any help in this > case... I want to abuse the "magi

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Istvan Albert
IMO this is not as much a framework comparison rather than an evaluation of the individual components that make up Pylons. The framework is the sum of all its parts. Programmers should not need to know that that a package named Beaker is used for sessions, Routes for url mapping, PasteDeploy for

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 5:22 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > MarkyMarc wrote: > > On Oct 7, 4:24 pm, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > >> MarkyMarc a écrit : > >> import is a statement. It's executed, like any other top-level code, > >> when the module is imported (or the

Re: Override 'and' and 'or'

2007-10-07 Thread Kay Schluehr
On Oct 7, 4:48 pm, Dekker <[EMAIL PROTECTED]> wrote: > On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED] > > cybersource.com.au> wrote: > > On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: > > > Is it possible to override 'and' and/or 'or'? > > > Not without hacking the Python source code, in w

Re: Override 'and' and 'or'

2007-10-07 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Sun, 07 Oct 2007 16:24:35 +0200, Wildemar Wildenburger wrote: > >> Wildemar Wildenburger wrote: >>> [whate everyone else wrote :(] >>> >>> /W >> Dangit! 4th of 4. >> Gotta type quicker. > > > That's okay, in two weeks time there will be 139 messages in this thread,

Re: Top Programming Languages of 2013

2007-10-07 Thread Kay Schluehr
On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > > > Dick Moores Despite my doubts that Ajax and .NET will be programming languages in 2013 a more interesting question is: what could push Python forward s.t. it eats such a large piece of th

Re: Newbie packages Q

2007-10-07 Thread Wildemar Wildenburger
MarkyMarc wrote: > *** > atest.py: > > def printA(): > print "This is Atest from Apack" > *** > btest.py: > from Test.apack import atest > > def printB(): > print "This is Btest from Bpack" > > def printatest(): > p

Re: ANN: Pyrex 0.9.6

2007-10-07 Thread Diez B. Roggisch
Colin J. Williams schrieb: > Greg Ewing wrote: >> Pyrex 0.9.6 is now available: >> >>http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ >> >> There is a *lot* of new stuff in this version, too much >> to fit into this announcement. Read all about it here: >> >> >> http://www.cosc.canterbu

Re: Top Programming Languages of 2013

2007-10-07 Thread Wildemar Wildenburger
Kay Schluehr wrote: > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: >> >> >> Dick Moores > > Despite my doubts that Ajax and .NET will be programming languages in > 2013 a more interesting question is: what could push Python forward > s.t.

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Wildemar Wildenburger <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > >> While I agree that the word "free" implies "free of monetary cost" to >> many people societies, that is by no means set in stone (talk to native >> americans, blacks, jews, palestinians,

Re: Override 'and' and 'or'

2007-10-07 Thread Diez B. Roggisch
Kay Schluehr schrieb: > On Oct 7, 4:48 pm, Dekker <[EMAIL PROTECTED]> wrote: >> On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED] >> >> cybersource.com.au> wrote: >>> On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote: Is it possible to override 'and' and/or 'or'? >>> Not without hacking the

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 5:49 pm, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > MarkyMarc wrote: > > *** > > atest.py: > > > def printA(): > > print "This is Atest from Apack" > > *** > > btest.py: > > from Test.apack import atest > > > def pri

Re: Top Programming Languages of 2013

2007-10-07 Thread chris . monsanto
On Oct 7, 11:54 am, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote: > Kay Schluehr wrote: > > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > >> > > >> Dick Moores > > > Despite my doubts that Ajax and .NET will be programming languages in

Re: Pil image module, "mode" bug..

2007-10-07 Thread Abandoned
On Oct 7, 4:47 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: > On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote: > > Hi.. > > I find the picture color with: > > im=Image.open("/%s" %name) > > color=im.mode #p=black & beyaz rgb=color L=grey > > > This usually work true but in these pictures: > >h

Re: Newbie packages Q

2007-10-07 Thread Bruno Desthuilliers
MarkyMarc a écrit : (snip) > It was simply to make a point. But then lets say the to files looks > like this: > > *** > atest.py: > > def printA(): > print "This is Atest from Apack" > *** > btest.py: > from Test.apack import atest

Re: Top Programming Languages of 2013

2007-10-07 Thread [EMAIL PROTECTED]
On Oct 7, 11:00?am, [EMAIL PROTECTED] wrote: > On Oct 7, 11:54 am, Wildemar Wildenburger > > > > > > <[EMAIL PROTECTED]> wrote: > > Kay Schluehr wrote: > > > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > > >> > > > >> Dick Moores > > > >

Re: tkinter question

2007-10-07 Thread Kevin Walzer
Hendrik van Rooyen wrote: > "Kevin Walzer" <[EMAIL PROTECTED]> wrote: > >> I find "pack" to be more flexible than "grid," so I prefer it for >> complex layouts. "grid" is better for simple layouts. > > *does a double take* are you serious? - my experience is that > pack is only good for simple

Re: tkinter question

2007-10-07 Thread Kevin Walzer
Kevin Walzer wrote: > Well, I guess it depends on your viewpoint. I find "pack" flexible > because it allows me to think in terms of top, bottom, right, and left > in terms of arranging UI elements--it's an elegant way to do it in my > view. I tend to use "grid" if I have, say, a window with se

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 6:04 pm, Bruno Desthuilliers wrote: > MarkyMarc a écrit : > (snip) > > > It was simply to make a point. But then lets say the to files looks > > like this: > > > *** > > atest.py: > > > def printA(): > > print "This is Atest from Apack" > > **

Re: How to create a file on users XP desktop

2007-10-07 Thread [EMAIL PROTECTED]
On Oct 7, 1:24 am, Scott David Daniels <[EMAIL PROTECTED]> wrote: > goldtech wrote: > > ... I want the new file's location to be on the user's desktop in > > a Windows XP environment > > How about: > import os.path > handle = open(os.path.expanduser(r'~\DeskTop\somefile.txt'), 'w') >

Re: Yet another comparison of Python Web Frameworks

2007-10-07 Thread Michele Simionato
On Oct 7, 11:31 am, Istvan Albert <[EMAIL PROTECTED]> wrote: > IMO this is not as much a framework comparison rather than an > evaluation of the individual components that make up Pylons. More in general let's say that I am interested in the evaluation of WSGI-compatible components. > The framewo

Re: weakrefs and bound methods

2007-10-07 Thread Marc 'BlackJack' Rintsch
On Sun, 07 Oct 2007 16:51:33 +0200, Mathias Panzenboeck wrote: > import weakref > > class Wrapper(object): > def __init__(self,x): > self.x = weakref.ref(x) > > def __call__(self,*args,**kwargs): > x = self.x() > if x is None: >

Re: Top Programming Languages of 2013

2007-10-07 Thread John Nagle
Alan Gauld wrote: > > "Dick Moores" <[EMAIL PROTECTED]> wrote >> >> > > Interesting, but I'm not sure what the criteria for "top" is. > Is it a measure of power, popularity, usage? > > Scary that HTML/CSS should be so high though given its not a pro

Re: Top Programming Languages of 2013

2007-10-07 Thread Byung-Hee HWANG
On Sun, 2007-10-07 at 17:54 +0200, Wildemar Wildenburger wrote: > Kay Schluehr wrote: > > On Oct 7, 8:05 am, Dick Moores <[EMAIL PROTECTED]> wrote: > >> > >> > >> Dick Moores > > > > Despite my doubts that Ajax and .NET will be programming languages i

newbie swig c++ to python

2007-10-07 Thread whatazor
Hi all, I must wrap some c++ code in python with swig. I try the swig examples for VC++ , but when I build the project it gives me that error: example fatal error LNK1181: cannot open input file 'C:\Programmi \Python25\libs.obj' Any idea? thank you w -- http://mail.python.org/mailman/listinfo/

Re: weakrefs and bound methods

2007-10-07 Thread Michele Simionato
On Oct 7, 12:26 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Drop all those `__del__()` methods as they prevent the garbage collector > from collecting "cycles". I fully agree and I will add that __del__ methods are always a bad idea. Also notice that recently Raymond Hetting said in

Re: How to create a file on users XP desktop

2007-10-07 Thread Tim Chase
> You are assuming the system is not localized, that won't work if you > distribute your applications internationally. In my system it is not > "Desktop", it is "Escritorio", and I guess it will vary with every > locale. Does someone know a way to find out what name does the desktop > have? I beli

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Marc 'BlackJack' Rintsch wrote: > On Sun, 07 Oct 2007 16:51:33 +0200, Mathias Panzenboeck wrote: > >> import weakref >> >> class Wrapper(object): >> def __init__(self,x): >> self.x = weakref.ref(x) >> >> def __call__(self,*args,**kwargs): >> x = self.x() >>

Re: weakrefs and bound methods

2007-10-07 Thread Mathias Panzenboeck
Marc 'BlackJack' Rintsch wrote: > ``del b`` just deletes the name `b`. It does not delete the object. > There's still the name `_` bound to it in the interactive interpreter. > `_` stays bound to the last non-`None` result in the interpreter. > Actually I have the opposite problem. The referen

Re: newbie swig c++ to python

2007-10-07 Thread whatazor
Now it works, the problem was in the project configuration of the example, that put the directory in Addictional Dependencies while it must be in Addictional Library Directories bye w n 7 Ott, 18:35, whatazor <[EMAIL PROTECTED]> wrote: > Hi all, > I must wrap some c++ code in python with swig. I

Re: weakrefs and bound methods

2007-10-07 Thread Steven D'Aprano
On Sun, 07 Oct 2007 16:38:23 +, Michele Simionato wrote: > On Oct 7, 12:26 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > >> Drop all those `__del__()` methods as they prevent the garbage >> collector from collecting "cycles". > > I fully agree and I will add that __del__ methods

Re: weakrefs and bound methods

2007-10-07 Thread Steven Bethard
Mathias Panzenboeck wrote: > Marc 'BlackJack' Rintsch wrote: >> ``del b`` just deletes the name `b`. It does not delete the object. >> There's still the name `_` bound to it in the interactive interpreter. >> `_` stays bound to the last non-`None` result in the interpreter. > > Actually I have

Re: How to create a file on users XP desktop

2007-10-07 Thread Tim Golden
Tim Chase wrote: >> You are assuming the system is not localized, that won't work if you >> distribute your applications internationally. In my system it is not >> "Desktop", it is "Escritorio", and I guess it will vary with every >> locale. Does someone know a way to find out what name does the de

Re: How to create a file on users XP desktop

2007-10-07 Thread Tim Golden
Tim Chase wrote: >> You are assuming the system is not localized, that won't work if you >> distribute your applications internationally. In my system it is not >> "Desktop", it is "Escritorio", and I guess it will vary with every >> locale. Does someone know a way to find out what name does the de

Re: Pil image module, "mode" bug..

2007-10-07 Thread Michal Bozon
On Sun, 07 Oct 2007 09:02:09 -0700, Abandoned wrote: > On Oct 7, 4:47 pm, Michal Bozon <[EMAIL PROTECTED]> wrote: >> On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote: >> > Hi.. >> > I find the picture color with: >> > im=Image.open("/%s" %name) >> > color=im.mode #p=black & beyaz rgb=color L=

Re: weakrefs and bound methods

2007-10-07 Thread Michele Simionato
On Oct 7, 1:14 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 07 Oct 2007 16:38:23 +, Michele Simionato wrote: > > On Oct 7, 12:26 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > >> Drop all those `__del__()` methods as they prevent the garbage > >> coll

Re: Top Programming Languages of 2013

2007-10-07 Thread Wildemar Wildenburger
Byung-Hee HWANG wrote: > On Sun, 2007-10-07 at 17:54 +0200, Wildemar Wildenburger wrote: >> import friends >> import sex >> >> try: >> sex.have() >> except ErrectionError, PrematureError: >> pass >> finally: >> sex.brag(friends) > > Good! But. > I think a ki

Re: Putting a line from a text file into a variable, then moving to next line

2007-10-07 Thread Tim Williams
On 07/10/2007, Tim Chase <[EMAIL PROTECTED]> wrote: > > I'm not really sure how readline() works. Is there a way to iterate > > through a file with multiple lines and then putting each line in a > > variable in a loop? > > You can use readlines() to get the whole line (including the > newline): > >

Re: supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

2007-10-07 Thread Michael Torrie
timw.google wrote: > Hi > > I want to write a python script that runs rsync on a given directory > and host. I build the command line string, but when I try to run > subprocess.call(cmd), or p=subprocess.Popen(cmd, shell=True),or > os.system(cmd), I get prompted for my login password. I expected t

Re: Newbie packages Q

2007-10-07 Thread Bruno Desthuilliers
MarkyMarc a écrit : > On Oct 7, 6:04 pm, Bruno Desthuilliers > But how do I get this to work? >> You failed to specify how your files are organized, and what is "not >> working". >> >> But anyway, if >> - atest.py is in /Test/apack, >> - both Test and apack have a __init__.py >> - is in the sys.pa

Problem of Readability of Python

2007-10-07 Thread Licheng Fang
Python is supposed to be readable, but after programming in Python for a while I find my Python programs can be more obfuscated than their C/C ++ counterparts sometimes. Part of the reason is that with heterogeneous lists/tuples at hand, I tend to stuff many things into the list and *assume* a stru

Re: Problem of Readability of Python

2007-10-07 Thread Steven Bethard
Licheng Fang wrote: > Python is supposed to be readable, but after programming in Python for > a while I find my Python programs can be more obfuscated than their C/C > ++ counterparts sometimes. Part of the reason is that with > heterogeneous lists/tuples at hand, I tend to stuff many things into

Re: Problem of Readability of Python

2007-10-07 Thread Bruno Desthuilliers
Licheng Fang a écrit : > Python is supposed to be readable, but after programming in Python for > a while I find my Python programs can be more obfuscated than their C/C > ++ counterparts sometimes. Part of the reason is that with > heterogeneous lists/tuples at hand, I tend to stuff many things in

Re: Problem of Readability of Python

2007-10-07 Thread Bjoern Schliessmann
Licheng Fang wrote: > struct nameval { > char * name; >int val; > } a; > > a.name = ... > a.val = ... > > becomes cryptic > > a[0] = ... > a[1] = ... ?! (1) a = {} a["name"] = ... a["val"] = ... (2) NAME = 0 VAL = 1 a=[] a[NAME] = ... a[VAL] = ... > Python Tutorial says an empty cla

Re: Problem of Readability of Python

2007-10-07 Thread George Sakkis
On Oct 7, 2:14 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Licheng Fang wrote: > > Python is supposed to be readable, but after programming in Python for > > a while I find my Python programs can be more obfuscated than their C/C > > ++ counterparts sometimes. Part of the reason is that with >

Re: Problem of Readability of Python

2007-10-07 Thread Steven Bethard
George Sakkis wrote: > On Oct 7, 2:14 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Licheng Fang wrote: >>> Python is supposed to be readable, but after programming in Python for >>> a while I find my Python programs can be more obfuscated than their C/C >>> ++ counterparts sometimes. Part of th

Re: Newbie packages Q

2007-10-07 Thread MarkyMarc
On Oct 7, 8:00 pm, Bruno Desthuilliers wrote: > > > And sys.path is /python/Test/bpack > > And you do wonder why you can't import ? Please reread with attention > the first and third points listed above (following the 'But anyway'). > The 'Test' package is *not* in your sys.path. I can say yes

  1   2   >