Re: global variables

2007-10-02 Thread Bruno Desthuilliers
Colin J. Williams a écrit : > TheFlyingDutchman wrote: >> Does anyone know how the variables label and scale are recognized >> without a global statement or parameter, in the function resize() in >> this code: >> >> >> >> #!/usr/bin/env python >> >> from Tkinter import * >> >> def resize(ev=None):

Re: List Question

2007-10-02 Thread Bruno Desthuilliers
brad a écrit : > How is this expressed in Python? > > If x is in y more than three times: > print x > > y is a Python list. if y.count(x) > 3: print x -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-10-02 Thread Martin v. Löwis
> a certificate that is signed by OpenSSL's own CA( certification > authority), that is not recognized in the program's list of root CAs, > causes an exception to be raised. What is "the program"? What programming language is it written in? What library does it use to maintain a list of root CAs,

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Martin v. Löwis
> So, that leaves me wondering, why is Tkinter still getting so much > focus in the Python standard library? > > Maybe a better question is, how has Tk managed to keep beating up the > newer, more modern, more featureful, better documented toolkits > encroaching on his territory? What's Tk's secre

Re: Can't seem to find a Python Key detector.

2007-10-02 Thread Gabriel Genellina
En Wed, 03 Oct 2007 00:02:03 -0300, Lamonte Harris <[EMAIL PROTECTED]> escribi�: > I'm looking for a module that acts on the input of the keyboard. > Something > similar to pygame's key events, but something just easier to use not > based > on pygame stuff. If that makes any since. This w

Re: Python and SSL

2007-10-02 Thread Johny
Thank you all for your replies. I am still a newbie with SSL issues but I found out that: a certificate that is signed by OpenSSL's own CA( certification authority), that is not recognized in the program's list of root CAs, causes an exception to be raised. (That is a different behaviour from the

Re: hello! I am a spammer

2007-10-02 Thread Danyelle Gragsone
Ok this is dead.. move along people.. nothing to see here.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to put the import command in the file?

2007-10-02 Thread Gabriel Genellina
En Tue, 02 Oct 2007 19:01:27 -0300, wang frank <[EMAIL PROTECTED]> escribi�: > I am writing Python script now. The project will grow bigger in future. > I need to import some packages for several functions, such as numpy. > Where is the best plalce to put the import numpy command? Is it fine

Re: s.split() on multiple separators

2007-10-02 Thread [david]
Gabriel Genellina wrote: > En Sun, 30 Sep 2007 16:16:30 -0300, <[EMAIL PROTECTED]> escribi�: > >>> From my POV, if I want sequence from here to there, it should include >> both here and there. >> >> I do understand the consequences of making high bound exclusive, which >> is more elegant code: xra

Re: Using fractions instead of floats

2007-10-02 Thread [EMAIL PROTECTED]
On Oct 2, 10:12?pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 02 Oct 2007 01:59:35 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribi : > > > How does gmpy make the conversion from float to rational? > > Well, you know, these days valuable software usually comes with something

Re: win32com COMAdminCatalogObject Value method

2007-10-02 Thread Gabriel Genellina
En Tue, 02 Oct 2007 12:12:09 -0300, rc <[EMAIL PROTECTED]> escribi�: >> Try objCOMAdminCatalogObject.SetValue("ID", AppID). > When I try that I get exception: > AttributeError: Add.SetValue I think you would get more help asking in [EMAIL PROTECTED] -- Gabriel Genellina -- http://mail.python.

Re: setuptools without unexpected downloads

2007-10-02 Thread Gabriel Genellina
En Tue, 02 Oct 2007 10:11:24 -0300, <[EMAIL PROTECTED]> escribi�: > Holden indicates that VS2003 is the current compiler used for the > official Python distribution. Do you know how to use that program to > compile an exe? Open the program, press F1 and read the documentation provided by its ve

Re: LastWriteTime in windows registry

2007-10-02 Thread Gabriel Genellina
En Tue, 02 Oct 2007 04:20:47 -0300, Tim Golden <[EMAIL PROTECTED]> escribi�: > Peters, Matthew J. ET3 wrote: >> I'm looking for a way to read the lastwritetime property of >> a windows registry key. ... I found the function in perl > > So what does the Perl source say? It presumably

Re: hello! I am a spammer

2007-10-02 Thread Nigel Rowe
On Wed, 3 Oct 2007 11:17, panguohua wrote in comp.lang.python > more information for making money with your blog Wow! Truth in advertising! -- Nigel Rowe A pox upon the spammers that make me write my address like.. rho (snail) fisheggs (stop) name -- http://mai

Re: Using fractions instead of floats

2007-10-02 Thread Gabriel Genellina
En Tue, 02 Oct 2007 01:59:35 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribi�: > How does gmpy make the conversion from float to rational? Well, you know, these days valuable software usually comes with something people call "documentation". Incomprehensible documents in strange formats

Can't seem to find a Python Key detector.

2007-10-02 Thread Lamonte Harris
I'm looking for a module that acts on the input of the keyboard. Something similar to pygame's key events, but something just easier to use not based on pygame stuff. If that makes any since. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Kamen TOMOV wrote: > On Sun, Sep 30 2007, Klaus Schilling wrote: > >> private property is unethical > > How I craved to read that! > > Viva la revolution! Ewige Blumenkraft! French-Canadian bean soup! -- http://mail.python.org/mailman/listinfo/python-list

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Grant Edwards
On 2007-10-02, Chris Mellon <[EMAIL PROTECTED]> wrote: > PyGtk has poor cross platform support, a very large footprint (the > largest of all these libraries) It's larger than wxWidgets on top of Gtk? > as well as a complicated runtime environment. It's probably > the closest to suitable for stan

hello! I am a spammer

2007-10-02 Thread panguohua
more information for making money with your blog www.space666.com goodwebsite for making money www.space666.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Select as dictionary...

2007-10-02 Thread Steve Holden
Abandoned wrote: > Also if i need a list id what can i do ? > > aia.execute("SELECT id, w from list") > links=aia.fetchall() > > I want to.. > > idlist=[1, 2, 3] ( I don't want to use FOR and APPEND because the > query have 2 million result and i want to speed) > It may not be practical for you

Re: Question about quoting style.

2007-10-02 Thread Steve Holden
James Stroud wrote: > Bruno Desthuilliers wrote: >> First point is that Python has no "variable interpolation". > > If you squint, it kind of does*: > > >>> print '%(language)s has %(#)03d quote types.' % \ > {'language': "Python", "#": 2} > Python has 002 quote types. > >

Django for database driven web application is OK?

2007-10-02 Thread cuongvt
Hello I'm new to both Django and Python. I'm mainly developing on PHP. I tend to move to Django. But I want to confirm as below: I heard that Django is mainly used for something like content management, CMS or something like that and Rails is mainly for web applications. So my question: is it

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread bramble
On Oct 2, 11:07 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > PyGtk has poor cross platform support, a very large footprint (the > largest of all these libraries) as well as a complicated runtime > environment. What's complicated about it? -- http://mail.python.org/mailman/listinfo/python-li

Re: global variables

2007-10-02 Thread Colin J. Williams
TheFlyingDutchman wrote: > Does anyone know how the variables label and scale are recognized > without a global statement or parameter, in the function resize() in > this code: > > > > #!/usr/bin/env python > > from Tkinter import * > > def resize(ev=None): > label.config(font='Helvetica

Re: global variables

2007-10-02 Thread Erik Jones
On Oct 2, 2007, at 5:20 PM, TheFlyingDutchman wrote: > Does anyone know how the variables label and scale are recognized > without a global statement or parameter, in the function resize() in > this code: > > > > #!/usr/bin/env python > > from Tkinter import * > > def resize(ev=None): > lab

Re: Using fractions instead of floats

2007-10-02 Thread Robert Kern
[EMAIL PROTECTED] wrote: > On Oct 2, 1:12 am, Robert Kern <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> How does gmpy make the conversion from float to rational? >> gmpy has a configurable transformation between floats and the internal >> representation. I believe the default goes thr

Re: global variables

2007-10-02 Thread Steven Bethard
TheFlyingDutchman wrote: > Does anyone know how the variables label and scale are recognized > without a global statement or parameter, in the function resize() in > this code: [snip] > def resize(ev=None): > label.config(font='Helvetica -%d bold' % \ > scale.get()) You're just cal

Re: Using fractions instead of floats

2007-10-02 Thread [EMAIL PROTECTED]
On Oct 2, 5:43 pm, [EMAIL PROTECTED] wrote: > On Oct 2, 5:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > But it is still wrong to say "0.6 is definitely not the same as 3/5". > > Out of context, I'd certainly agree. But from the context, I assumed > it was clear that the 0.6 was a Pyt

Re: readline() - problem

2007-10-02 Thread Ricardo Aráoz
Paul Hankin wrote: > On Oct 2, 12:25 pm, [EMAIL PROTECTED] wrote: >> Hi! >> I'm a new user of python, and have problem. >> I have a plain ascii file: >> 11..1 >> 12..1 >> 11..1 >> I want to create a new file which contains only lines with '1' on 15th

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Paul Boddie
On 2 Okt, 22:35, bramble <[EMAIL PROTECTED]> wrote: > > Ahh... Ok. Thanks, that explains it. At first, it hadn't ocurred to me > that anyone would want to provide a GUI toolkit binding along with a > popular general purpose programming language implementation. Moreover, > it *really* wouldn't occur

Re: global variables

2007-10-02 Thread Carsten Haese
On Tue, 2007-10-02 at 15:20 -0700, TheFlyingDutchman wrote: > Does anyone know how the variables label and scale are recognized > without a global statement or parameter, in the function resize() in > this code: > [...] The answer to your question is "Yes." -- Carsten Haese http://informixdb.sou

Re: Using fractions instead of floats

2007-10-02 Thread richyjsm
On Oct 2, 5:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > But it is still wrong to say "0.6 is definitely not the same as 3/5". Out of context, I'd certainly agree. But from the context, I assumed it was clear that the 0.6 was a Python float. I probably should have made this clearer.

Re: module confusion

2007-10-02 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Not all of the modules in a package are imported by importing the >> top-level package. > > You can't import packages, only modules. > >> os.path is a particularly weird case because it is just an alias to the

Re: List Question

2007-10-02 Thread Paul McGuire
On Oct 2, 4:58 pm, Pablo Ziliani <[EMAIL PROTECTED]> wrote: > Paul Hankin wrote: > > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > > >> How is this expressed in Python? > > >> If x is in y more than three times: > >> print x > > >> y is a Python list. > > > Simple and readable: > > if

global variables

2007-10-02 Thread TheFlyingDutchman
Does anyone know how the variables label and scale are recognized without a global statement or parameter, in the function resize() in this code: #!/usr/bin/env python from Tkinter import * def resize(ev=None): label.config(font='Helvetica -%d bold' % \ scale.get()) top = Tk(

Re: List Question

2007-10-02 Thread Paul McGuire
On Oct 2, 4:20 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > > > How is this expressed in Python? > > > If x is in y more than three times: > > print x > > > y is a Python list. > > Simple and readable: > if len([a for a in y if x == a]) > 3

logging module and trailing newlines

2007-10-02 Thread Russell Warren
I was just setting up some logging in a make script and decided to give the built-in logging module a go, but I just found out that the base StreamHandler always puts a newline at the end of each log. There is a comment in the code that says "The record is then written to the stream with a trailin

Where to put the import command in the file?

2007-10-02 Thread wang frank
Hi, I am writing Python script now. The project will grow bigger in future. I need to import some packages for several functions, such as numpy. Where is the best plalce to put the import numpy command? Is it fine to put on the first line in the file? Is it better to put it into each function

Re: List Question

2007-10-02 Thread Pablo Ziliani
Paul Hankin wrote: > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > >> How is this expressed in Python? >> >> If x is in y more than three times: >> print x >> >> y is a Python list. >> > > Simple and readable: > if len([a for a in y if x == a]) > 3: > print x > > Or the sli

Re: readline() - problem

2007-10-02 Thread Wayne Brehaut
On Tue, 02 Oct 2007 12:13:21 -, [EMAIL PROTECTED] wrote: >On 2 Pa , 13:39, Ben Finney <[EMAIL PROTECTED]> >wrote: >> [EMAIL PROTECTED] writes: >> > import string >> >> Why import 'string' if you're not using it? >> >> > f=open('/test/test.asc','r') >> > o=open('/test/out.asc','w') >> > for lin

Re: Using fractions instead of floats

2007-10-02 Thread [EMAIL PROTECTED]
On Oct 2, 1:12 am, Robert Kern <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Oct 1, 8:17?pm, [EMAIL PROTECTED] wrote: > >> On Oct 1, 9:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > >>> On Oct 1, 7:20 pm, [EMAIL PROTECTED] wrote: > On Oct 1, 8:30 am, Nick Craig-Wood <

Re: Using ImageGrab (PIL) to capture screen of remote computer

2007-10-02 Thread Michael Bentley
On Oct 2, 2007, at 2:33 AM, jorma kala wrote: Is it possible to use ImageGrab of the Python Imaging Library to capture the screen of a remote computer? I'm running my python program on a computer that is connected directly via a ethernet crossover cable to another computer. Can I somehow g

Re: List Question

2007-10-02 Thread Paul Hankin
On Oct 2, 10:20 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > > > How is this expressed in Python? > > > If x is in y more than three times: > > print x > > > y is a Python list. > > Simple and readable: > if len([a for a in y if x == a]) >

Re: List Question

2007-10-02 Thread Paul Hankin
On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote: > How is this expressed in Python? > > If x is in y more than three times: > print x > > y is a Python list. Simple and readable: if len([a for a in y if x == a]) > 3: print x Or the slightly-too-flashy version: if sum(1 for a in y if x

Re: List Question

2007-10-02 Thread Michael Bentley
On Oct 2, 2007, at 2:06 PM, brad wrote: > How is this expressed in Python? > > If x is in y more than three times: > print x > > y is a Python list. # Try using help -- help(list) or help(list.count) for instance... if y.count(x) > 3: print x -- http://mail.python.org/mailman/listinf

Re: Mysqldb printing sql and params ... NEVER MIND

2007-10-02 Thread Steve Holden
Sells, Fred wrote: > el stupido here "accidently" put a couple of print statements into a > mysqldb module when eclipse opened it from the link in the stacktrace; > :-) -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb

List Question

2007-10-02 Thread brad
How is this expressed in Python? If x is in y more than three times: print x y is a Python list. -- http://mail.python.org/mailman/listinfo/python-list

Re: toprettyxml messes up with whitespaces

2007-10-02 Thread kyosohma
On Oct 2, 11:43 am, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Hi all, > > I parse an XML file, replace a node with a new one (like updating > cache) and write it back. Every write, new spaces are added. For > example, first read - update - write cycle; > > > My First App > > > Second cycle

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread James Stroud
bramble wrote: > Maybe a better question is, how has Tk managed to keep beating up the > newer, more modern, more featureful, better documented toolkits > encroaching on his territory? What's Tk's secret weapon? On the OS vendor level, it may not be beating Tkinter. OSX 10.4 comes out of the box

Re: Algebraic Modules For Python

2007-10-02 Thread Shawn Milochik
On 10/1/07, Brandon McGinty <[EMAIL PROTECTED]> wrote: > > > Hi All, > I know that there is probably a great deal of literature on this on the net, > but I don't have any time to go searching. -- > Brandon McGinty > McGinty Soft Ltd. > Website design, configuration, and maintenance > Python and

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread bramble
On Oct 2, 7:33 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Tue, 2007-10-02 at 03:04 +, bramble wrote: > > But Py3k is all about breaking compatibility > > That's a complete distortion of Python 3.0's mission. Python 3.0 breaks > backwards compatibility only where there exist good reasons

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread bramble
On Oct 2, 5:29 am, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 2 Okt, 04:54, bramble <[EMAIL PROTECTED]> wrote: > > > Maybe the key I'm missing is this: maybe GvR and company think that a > > language absolutely should come off-the-shelf with GUI toolkit > > bindings. So, given that, they feel they

RE: Mysqldb printing sql and params ... NEVER MIND

2007-10-02 Thread Sells, Fred
el stupido here "accidently" put a couple of print statements into a mysqldb module when eclipse opened it from the link in the stacktrace; -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a custom python python distribution

2007-10-02 Thread azrael
Maybe you should check the Slax distro. Go to www.slax.org. There is one special slax distro caled Frodo. I think that it includes nearly nothing but the core. There are also several packages for the distro that you can put inside the distro and create your own distribution. There are also detailed

Re: Can you please give me some advice?

2007-10-02 Thread Bruno Desthuilliers
Thorsten Kampe a écrit : > * Bruno Desthuilliers (Sat, 29 Sep 2007 19:17:43 +0200) > >>[EMAIL PROTECTED] a écrit : >>(snip) >> >>>I know nothing of Ruby, but just the fact that in Ruby the Hello World >>>program is >>> >>>puts 'Hello, World!' >>> >>>whereas the Python Hello World program is >>> >>

WCCM8 & ECCOMAS 2008 - Mini-Symposium on Computational Bioimaging and Visualization - Announce & Call for Contributions

2007-10-02 Thread [EMAIL PROTECTED]
___ Mini-Symposium on Computational Bioimaging and Visualization Within the WCCM8 & ECCOMAS 2008 International Conference (http://www.iacm-eccomascongress2008.org ) Venice, Italy, 30 June - 5 July 2008 _

Re: Question on overriding implicit lookups

2007-10-02 Thread Bruno Desthuilliers
David Ells a écrit : > In Python we have a wonderful facility for customizing attribute > access by defining __getattr__ or __getattribute__ in our classes. > Unfortunately (or perhaps fortunately, for reasons I don't know), this > facility only works for explicit attribute access, i.e. accessing >

wana watch latest hindi hot videos?

2007-10-02 Thread diprat7
wana watch latest hindi hot videos? than www.yedil.com is the site you are looking for have a nice time with www.yedil.com .Log on now -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding behaviour for managing "task" dependencies

2007-10-02 Thread Paddy
On Oct 2, 3:28 pm, [EMAIL PROTECTED] wrote: > Hi, > > I'm currently writing an animation pipeline in Python which is a > system for controlling the flow of work and assets for a team of > people working on a computer animated film. The system will be fairly > large with a database backend. > > One

Re: I earn $36800 a month with google adsense

2007-10-02 Thread Wildemar Wildenburger
panguohua wrote: > I am only a publisher!!! > > > really it is useful > Wow! That has got to be the first response by a spammer with some form of "meaningful" remark. I'm impressed. Dude, you, even as a spammer, can learn a lot from this group. As Diez pointed out, you will want to quote the

Re: Creating a custom python python distribution

2007-10-02 Thread Wildemar Wildenburger
shailesh wrote: > Hi, > I wish to create a Python distribution includind Python and some other > libraries (Zope 3, PyWin32, numpy, lxml, etc.) which are required for > my applications. e.g. there are Enthough and ASPN distributions of > Python. > > Unfortunately, I have not been able to find the

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Wildemar Wildenburger
Kamen TOMOV wrote: > On Sun, Sep 30 2007, Klaus Schilling wrote: > >> ... >> private property is unethical > > How I craved to read that! > > Viva la revolution! > > Ест человек - ест проблем, > Нет человек - нет проблем! > > The End justify the means! > > Long live communism! > ENDUT! HOC

Re: Combine two dictionary...

2007-10-02 Thread George Sakkis
On Oct 1, 2:01 pm, Abandoned <[EMAIL PROTECTED]> wrote: > I want to total score.. > For example > > > > dict1={1: 4, 3: 5}... and 2 millions element > > > dict2={3: 3, 8: 6}... and 3 millions element > > result should be dict3={1:4, 3:8, 8:6} Unless you have some prior knowledge about the dicts

Corrupted C Runtime on app exit via Dispatch

2007-10-02 Thread rsybel
I'm new to Python, but I am trying to support a product at work. We're running under Win XP, using Python 2.4. We're using Python to run optimizations, generating a bunch of test conditions and having existing products evaluate the solutions. The programs we're running are MFC apps, built with VS

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Duncan Booth
Tim Chase <[EMAIL PROTECTED]> wrote: > The parser also has to accomodate "raw" and "unicode" string > prefixes, as they're valid too: > >def f(x): > r"raw!" > pass > >def f(x): > u"Unicode" > pass > > > in addition. Okay...in most of these cases, the pathological

Re: Adding behaviour for managing "task" dependencies

2007-10-02 Thread m . pricejones
Stargaming: Thanks, that's given me plenty to think about. Some wise words. I guess I should appreciate that with my particular goal there aren't going to be easy solutions but I definitely don't want to dive down the wrong track if it can be avoided. Cheers, Mike -- http://mail.python.org/mail

Mysqldb printing sql and params no matter what I do

2007-10-02 Thread Sells, Fred
I had some code originally that printed the sql and params when I called the .execute method. I removed it but it still prints. I rebooted and renamed files and still it prints. I am totally stumped; I tried google but perhaps didn't use the right search; got a lot of hits but no clues. I'm usi

Air Conditioners

2007-10-02 Thread freeaircon
http://freeaircon.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using fractions instead of floats

2007-10-02 Thread Neil Cerutti
On 2007-10-02, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Oct 2, 12:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> On 2007-10-01, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> > Scheme has prefix numeric operators, so that 1/2 is >> > unambiguously (for the interpreter and the user) a lit

Re: module confusion

2007-10-02 Thread Robert Kern
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Robert > Kern wrote: > >> Not all of the modules in a package are imported by importing the >> top-level package. > > You can't import packages, only modules. > >> os.path is a particularly weird case because it is just an alias to the

Re: Adding behaviour for managing "task" dependencies

2007-10-02 Thread Stargaming
On Tue, 02 Oct 2007 14:28:35 +, m.pricejones wrote: > Hi, > > I'm currently writing an animation pipeline in Python which is a system > for controlling the flow of work and assets for a team of people working > on a computer animated film. The system will be fairly large with a > database bac

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Tim Chase
> The original request was to do it without using the function's > name, but you are depending on that name so your code is easy > enough to break. e.g. change the definition of f1 to: > >def f2(func): > "this is f1" > s = func() > print s > return s >f1 = f2 >del f

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-10-02 Thread Frank Goenninger
On 2007-10-01 23:37:28 +0200, Wildemar Wildenburger <[EMAIL PROTECTED]> said: > Frank Goenninger wrote: >> On 2007-09-29 01:27:04 +0200, Damien Kick <[EMAIL PROTECTED]> said: >> >>> If you were referring to the "free" in "free Mumia Abu Jamal", I would >>> agree with you. I don't think anyone

Re: Using fractions instead of floats

2007-10-02 Thread Arnaud Delobelle
On Oct 2, 12:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-10-01, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > Scheme has prefix numeric operators, so that 1/2 is > > unambiguously (for the interpreter and the user) a litteral for > > 'the fraction 1/2'. You can't avoid the confusion

toprettyxml messes up with whitespaces

2007-10-02 Thread Jorgen Bodde
Hi all, I parse an XML file, replace a node with a new one (like updating cache) and write it back. Every write, new spaces are added. For example, first read - update - write cycle; My First App Second cycle:

Re: Can you please give me some advice?

2007-10-02 Thread Thorsten Kampe
* Bruno Desthuilliers (Sat, 29 Sep 2007 19:17:43 +0200) > [EMAIL PROTECTED] a écrit : > (snip) > > I know nothing of Ruby, but just the fact that in Ruby the Hello World > > program is > > > > puts 'Hello, World!' > > > > whereas the Python Hello World program is > > > > print 'Hello, World!' >

Re: I earn $36800 a month with google adsense

2007-10-02 Thread Diez B. Roggisch
> > Wow ! I have a question though. > > If you really make $38600 a month, how come you even bother to spam > us? Please, don't reply - and especially, don't reply quoting the spammer's site, so his page-rank inncreases... diez -- http://mail.python.org/mailman/listinfo/python-list

Re: random keypress bounce in a terminal

2007-10-02 Thread Bjoern Schliessmann
István wrote: > It works fine as long as I hit keys normally, but gives extra > characterts if I keep pressing some key, e.g. up or down arrow > keys. It runs on a Linux system. What's the wrong with it? Nothing. Linux VTs will generate multiple characters for special keys. Regards, Björn --

Re: I earn $36800 a month with google adsense

2007-10-02 Thread panguohua
I am only a publisher!!! really it is useful -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheriting from int or long

2007-10-02 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I started creating a simple "bits" class, intended to act like a array | of bits. This was my initial idea, basically just overriding the | string representation to display the bitmask (so far): For this purpose, for the reason you dis

Re: ANN: PyPE 2.8.7

2007-10-02 Thread Josiah Carlson
On Sep 26, 12:50 am, stef <[EMAIL PROTECTED]> wrote: > thebjorn wrote: > > On Sep 25, 12:37 pm, stef <[EMAIL PROTECTED]> wrote: > > >> Josiah Carlson wrote: > > >>> === What isPyPE? === > >>>PyPE(Python Programmers' Editor) was written in order to offer a > >>> lightweight but powerful editor for t

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Duncan Booth
Tim Chase <[EMAIL PROTECTED]> wrote: >> So basically, my question is: is there a way to access a function from >> within itself without using its name? > > > Well, I don't know if it's the best way to do it, but the > following code I just threw together does the trick for me: The original req

Question on overriding implicit lookups

2007-10-02 Thread David Ells
In Python we have a wonderful facility for customizing attribute access by defining __getattr__ or __getattribute__ in our classes. Unfortunately (or perhaps fortunately, for reasons I don't know), this facility only works for explicit attribute access, i.e. accessing foo.bar. What I am in need of,

Re: win32com COMAdminCatalogObject Value method

2007-10-02 Thread rc
> Try objCOMAdminCatalogObject.SetValue("ID", AppID). > > Roger- Hide quoted text - > > - Show quoted text - When I try that I get exception: AttributeError: Add.SetValue I think the only valid methods are: Key(), Name(), Valid() and Value() The thing I'm most confused about is that it

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-02 Thread John Nagle
Filip Salomonsson wrote: > On 02/10/2007, John Nagle <[EMAIL PROTECTED]> wrote: >> But there's something in there now that robotparser doesn't like. >> Any ideas? > > Wikipedia denies _all_ access for the standard urllib user agent, and > when the robotparser gets a 401 or 403 response when trying

Subprocesses on Windows

2007-10-02 Thread Nachiket Joshi
Hey Guys! Well before I explain my problem, let me tell you all that I am not a professional programmer and new to python too. I just write some scripts as and when required and this time it seems I am stuck somewhere in trying to create subprocesses. The problem is something like this

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Chris Mellon
On 10/1/07, bramble <[EMAIL PROTECTED]> wrote: > What is the backstory to why Python includes Tk bindings, as opposed > to some other set of bindings? > > I've written a few little Tkinter-based apps, and it's nice and > simple. I like it well enough. That said though, I keep feeling the > gravitat

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-02 Thread John Nagle
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, John Nagle > wrote: > >> For some reason, Python's parser for "robots.txt" files >> doesn't like Wikipedia's "robots.txt" file: >> >> >>> import robotparser >> >>> url = 'http://wikipedia.org/robots.txt' >> >>> chk = robotparser.R

Re: Dictionary invalid token error

2007-10-02 Thread brad
Tim Chase wrote: > Numbers with leading zeros are parsed as octal. 8 and 9 are invalid > digits in octal. Thus, it falls over. 00 through 07 will work fine, > but 08 and 09 will go kaput. > > http://docs.python.org/ref/integers.html > > -tkc Thanks... that makes sense. I'll store them as st

Re: How popular is Django ?

2007-10-02 Thread Terry Reedy
"Thomas Guettler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: | comp.lang.python is a usenet group. which means that it is independently hosted on newsservers around the world. It is also a mailing list hosted by python.org and a gmane group. |django-u

Re: Dictionary invalid token error

2007-10-02 Thread Richard Brodie
"brad" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why does 09 cause an invalid token while 9 does not? 9 isn't a valid octal digit. You probably want to use strings for storing telephone number like codes, if leading zeroes are significant. -- http://mail.python.org/mailma

Re: Dictionary invalid token error

2007-10-02 Thread Tim Chase
> This works: > > >>> area_group = {001:06, 002:04, 003:04, 006:9} > > This does not (one the end, 09 is used instead of 9) > > >>> area_group = {001:06, 002:04, 003:04, 006:09} >File "", line 1 > area_group = {001:06, 002:04, 003:04, 006:09} > SyntaxError: invalid token > > Why does

Dictionary invalid token error

2007-10-02 Thread brad
This works: >>> area_group = {001:06, 002:04, 003:04, 006:9} This does not (one the end, 09 is used instead of 9) >>> area_group = {001:06, 002:04, 003:04, 006:09} File "", line 1 area_group = {001:06, 002:04, 003:04, 006:09} SyntaxError: invalid token Why does 09 cause an invalid tok

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread jim-on-linux
On Monday 01 October 2007 21:04, bramble wrote: > What is the backstory to why Python includes Tk bindings, as > opposed to some other set of bindings? > > I've written a few little Tkinter-based apps, and it's nice and > simple. I like it well enough. That said though, I keep feeling the > gravita

Re: sorteddict [was a PEP proposal, but isn't anymore!]

2007-10-02 Thread Terry Reedy
"Duncan Booth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Subclassing doesn't have to imply a common implementation, just a common | interface. True, but in Python, subclassing is usually done to reuse implementation. Interface subclassing is usually from a common abstract ba

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Tim Chase
> The subject of this message might be a little cryptic, so here's an > example of what I mean: > > def foo(): > """doc string of foo""" > print foo.__doc__ > foo() > doc string of foo > > What I want to know is whether it is possible to call __doc__ against > some builtin method, l

Adding behaviour for managing "task" dependencies

2007-10-02 Thread m . pricejones
Hi, I'm currently writing an animation pipeline in Python which is a system for controlling the flow of work and assets for a team of people working on a computer animated film. The system will be fairly large with a database backend. One particular problem that I'd like to address is the need fo

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Terry Reedy
"bramble" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | I don't know... As I meant to imply above, it's looking like Tkinter | will be playing its expected role in Py3k as the GUI toolkit of | choice. And from what I've seen of the Py3k effort, there's been | really excellent work

Re: Why doesn't Python's "robotparser" like Wikipedia's "robots.txt" file?

2007-10-02 Thread Filip Salomonsson
On 02/10/2007, John Nagle <[EMAIL PROTECTED]> wrote: > > But there's something in there now that robotparser doesn't like. > Any ideas? Wikipedia denies _all_ access for the standard urllib user agent, and when the robotparser gets a 401 or 403 response when trying to fetch robots.txt, it is equiv

Re: access __doc__ from within function without reference to function name

2007-10-02 Thread Duncan Booth
SanPy <[EMAIL PROTECTED]> wrote: > So basically, my question is: is there a way to access a function from > within itself without using its name? > Not really, no. Python is executing a code block, it has no idea which function referenced that code block. You can get the current code object qui

  1   2   >