Re: Is there a simple way to parse this string ?

2007-12-19 Thread [EMAIL PROTECTED]
Stef, You can quickly get a tuple via: t = eval('(0, 0, 0, 255), (192, 192, 192, 255), True, 8') Joseph Armbruster On Dec 19, 4:17 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I need to translate the following string > a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' > > into

file upload permissions

2007-12-19 Thread lloyd
Hello, I have three web sites hosting the identical Python web application, each theoretically identical in content and configuration. One is used for development; the second is a back-up/mirror; and the third is the production site. The development site is running on my local network, the mirr

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
Hi! I'd like to join the fray, as the person who posted that original LJ rant. First, some full disclosure, and stampings out of what seem to me to be misconceptions... 1) I am not a CS major. I majored in Computer Animation at an art college. I'm quite well aware that I don't know all there is to

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
Hi! I'd like to join the fray, as the person who posted that original LJ rant. First, some full disclosure, and stampings out of what seem to me to be misconceptions... 1) I am not a CS major. I majored in Computer Animation at an art college. I'm quite well aware that I don't know all there is to

Re: Is there a simple way to parse this string ?

2007-12-19 Thread Larry Bates
Stef Mientki wrote: > hello, > > I need to translate the following string >a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' > > into the following list or tuple >b = [(0, 0, 0, 255), (192, 192, 192, 255), True, 8 ] > > Is there a simple way to to this. > (Not needed now, but might nee

Re: In an inherited class, "embedded" classes is referenced?

2007-12-19 Thread Carl Banks
On Dec 19, 4:23 pm, Christian Joergensen <[EMAIL PROTECTED]> wrote: > Hello > > I stumpled upon this "feature" during my work tonight, and found it > a bit confusing: > > >>> class A(object): > > ... class C: > ... foobar = 42 > ...>>> class B(A): pass > ... > >>> A.C > > >>> B.C > > >>

Re: Eclipse/PyQt/Eric4 question

2007-12-19 Thread straub
On 14 Dez., 10:59, king kikapu <[EMAIL PROTECTED]> wrote: > On 14 Äåê, 01:09, "Fabio Zadrozny" <[EMAIL PROTECTED]> wrote: > > > > > > > > Hmmm...but this means that i am forced to do this for ALL .ui files on > > > the project, either changed or not and this can slow things down... > > > (pyuic.bat

Re: Is there a simple way to parse this string ?

2007-12-19 Thread John Machin
On Dec 20, 9:10 am, Larry Bates <[EMAIL PROTECTED]> wrote: > Stef Mientki wrote: > > hello, > > > I need to translate the following string > >a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' > > > into the following list or tuple > >b = [(0, 0, 0, 255), (192, 192, 192, 255), True, 8 ] >

Re: In an inherited class, "embedded" classes is referenced?

2007-12-19 Thread Diez B. Roggisch
Christian Joergensen schrieb: > Hello > > I stumpled upon this "feature" during my work tonight, and found it > a bit confusing: > class A(object): > ... class C: > ... foobar = 42 > ... class B(A): pass > ... A.C > B.C > B.C.foobar = 60 A.C.foob

Re: No tab completion if sys.stdout is redirected

2007-12-19 Thread Bjoern Schliessmann
Dirk Loss wrote: > Bjoern Schliessmann wrote: >> readline module applies its autocompletion functions to (and only >> to) sys.stdout. > > I see. Then I guess I'll have to avoid redirecting sys.stdout and > come up with some kind of workaround instead. Just use a "central" function for printing o

Durability and backward compatibility over 10 years...

2007-12-19 Thread Philippe DAVID
Hi, I would like to use python to write some scripts for a system that will be used for more than 10 years. My problem is the following: In 10 years, if the OS evolves and ships with the latest stable version of python, is there a chance for my 10 year old scripts to run on the new system ? (I am

Re: sending a rip1 request via python

2007-12-19 Thread scripteaze
On Dec 19, 10:34 am, Dirk Loss <[EMAIL PROTECTED]> wrote: > scripteaze wrote: > > I need to be able to send a rip1 request to my rip1 enabled device., > > so i need python to send : > > 01 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > > 10 > > Use Scapy: > > from scapy import

Re: sending a rip1 request via python

2007-12-19 Thread scripteaze
On Dec 19, 5:14 pm, scripteaze <[EMAIL PROTECTED]> wrote: > On Dec 19, 10:34 am, Dirk Loss <[EMAIL PROTECTED]> wrote: > > > > > scripteaze wrote: > > > I need to be able to send a rip1 request to my rip1 enabled device., > > > so i need python to send : > > > 01 01 00 00 00 02 00 00 00 00 00 00 00

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Grant Edwards
On 2007-12-19, Gary <[EMAIL PROTECTED]> wrote: > Grant Edwards said: > "Code should work the way it looks and look the way it works." > > I fully agree. To that end, the MEL UI code I write does look > exactly like how it works to me. To me, the layouts are a > stack of a containers, which can be

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 3:19 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > The problem is that to everybody else in the world, indentation > in Python represents control flow nesting, not GUI widget > nesting. Thanks, Grant. That's the first solid reasoning I've seen, and it's a very solid argument, as well.

Re: sending a rip1 request via python

2007-12-19 Thread Dirk Loss
scripteaze wrote: >>> I need to be able to send a rip1 request to my rip1 enabled device., > Well, i use scapy quite often, however, this needs to be very portable import socket rip_request = '\x01\x01\x00\x00\x00\x02' + '\x00' * 17 + '\x10' s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Chris Mellon
On Dec 19, 2007 4:05 PM, Gary <[EMAIL PROTECTED]> wrote: > > > Chris Mellon writes: > """It's interesting that the solutions "move away from the terrible > abomination of a GUI toolkit" and "write Python wrappers that don't > cause actual physical pain" never occur to him.""" > > Oh, but they hav

Re: Eclipse/PyQt/Eric4 question

2007-12-19 Thread Fabio Zadrozny
> > Hi - > in fact, you can do pretty much everything you have to do with pydev > in eclipse. Eclipse itself is very flexible, robust and intuitive. > pydev may be a touch too nervous, but is very supportive. It has a few > bugs, but none lethal. Only setback is that you have to pay a small > licen

Re: class memebers

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 17:17:43 -0300, N L <[EMAIL PROTECTED]> escribió: > How do I list the members of a class? Meaning, how do I know what are > the functions a particular class has, if i do not want to manually > browse through the class? From the interpreter, just print dir(class) or dir(in

CoCoPy Release Candidate

2007-12-19 Thread Ron Provost
I'm happy to announce the CoCo/r for Python release candidate. CoCo/r is an scanner generator and LL(k) parser generator which has already been ported to many languages. CocoPy 1.1.0rc can be found in the Python Package Index. CoCo/r for Python now passes all tests in the official COCO test su

Re: Durability and backward compatibility over 10 years...

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 08:10:59 -0300, Philippe DAVID <[EMAIL PROTECTED]> escribió: > I would like to use python to write some scripts for a system that will > be used > for more than 10 years. My problem is the following: > In 10 years, if the OS evolves and ships with the latest stable version

Re: integer subclass range behavior

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 18:11:49 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > I was wondering what would happen, so I tried this out for the heck of > it with: > Python 3.0a2 (py3k:59572M, Dec 19 2007, 15:54:07) [MSC v.1500 32 bit > (Intel)] on win32 > > class a(int): > def __new__(cls

Re: Is there a simple way to parse this string ?

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 19:23:36 -0300, John Machin <[EMAIL PROTECTED]> escribió: > On Dec 20, 9:10 am, Larry Bates <[EMAIL PROTECTED]> wrote: >> Stef Mientki wrote: >> >> > I need to translate the following string >> >a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' >> >> > into the followin

Help %A in time.strftime(%A)

2007-12-19 Thread jolly
Hey guys, I'm following a tutorial on Python and I came across this in one of the examples. (Toggle Plain Text) import time today = time.localtime(time.time()) theDate = time.strftime("%A %B %d", today) print today print theDate import time today = time.localtime(time.time()) theDate = time.st

Help %A in time.strftime(%A)

2007-12-19 Thread jolly
Hey guys, I'm following a tutorial on Python and I came across this in one of the examples. import time today = time.localtime(time.time()) theDate = time.strftime("%A %B %d", today) print today print theDate Result: (2007, 12, 20, 9, 48, 15, 3, 354, 1) Thursday December 20 can someone ex

Re: Why custom objects take so much memory?

2007-12-19 Thread Colin J. Williams
Hrvoje Niksic wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> On Tue, 18 Dec 2007 21:13:14 +0100, Hrvoje Niksic wrote: >> >>> Each object takes 36 bytes itself: 4 bytes refcount + 4 bytes type ptr + >>> 4 bytes dict ptr + 4 bytes weakptr + 12 bytes gc overhead. That's not >>> counting m

pypi and easy_install

2007-12-19 Thread Giampaolo Rodola'
Hi, I noticed tonight that I can't download/install a package of mine hosted on pypi by using easy_install. By running "ez_setup.py pyftpdlib" I get: --- snippet -- options (after parsing config files): no commands known yet options (after parsing command line): option dict for 'aliases' command:

Wireless Card Data on Windows?

2007-12-19 Thread Justin Donato
Hello, I’m looking for a Python library that can return data about wireless networks. In particular, I’m looking for signal quality, noise, etc. I’ve found: HYPERLINK "http://www.romanofski.de/downloads/pywifi"http://www.romanofski.de/download s/pywifi But it’s only for Linux. Is ther

Re: integer subclass range behavior

2007-12-19 Thread [EMAIL PROTECTED]
On Dec 19, 7:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 19 Dec 2007 18:11:49 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > > > I was wondering what would happen, so I tried this out for the heck of > > it with: > > Python 3.0a2 (py3k:59572M, Dec 19 2007, 15:54:

Re: pySerial

2007-12-19 Thread [david]
__zip__ wrote: > Hi, > > I am using pySerial for communication with modem. > > Does anyone knows which values are for what in these variables? > > xonxoff=0 > rtscts=0 > dsrdtr=0 > > if xonxoff=0 is it hardware control on or of (logic says it would be off > , but who knows). > > > Second que

Re: michael lalonde

2007-12-19 Thread wilson . smith9
http://wanderer.artificial-stupidity.net/ On Dec 16, 1:26 am, Michael Lalonde <[EMAIL PROTECTED]> wrote: > x-no-archive: yes > Michael Lalonde saw a movie made by Mr Harnwell on an ironing board > and got locked in a room full of greasy meat because he felt like it > and chased a bunnywhich got

Re: Help %A in time.strftime(%A)

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 21:59:25 -0300, jolly <[EMAIL PROTECTED]> escribió: > I'm following a tutorial on Python and I came across this in one of > the examples. > > import time > > today = time.localtime(time.time()) > theDate = time.strftime("%A %B %d", today) > > print today > print theDate > > > R

Re: IronPython faster than CPython?

2007-12-19 Thread Ross Ridge
Jack <[EMAIL PROTECTED]> wrote: >I learned a lot from the other thread 'Is a "real" C-Python possible?' about >Python performance and optimization. I'm almost convinced that Python's >performance is pretty good for this dynamic language although there are >areas to improve, until I read some art

Re: Is there a simple way to parse this string ?

2007-12-19 Thread Paul McGuire
On Dec 19, 4:23 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 20, 9:10 am, Larry Bates <[EMAIL PROTECTED]> wrote: > > > > > > > Stef Mientki wrote: > > > hello, > > > > I need to translate the following string > > >a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' > > > > into the follo

Re: integer subclass range behavior

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 22:20:17 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > On Dec 19, 7:42 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Wed, 19 Dec 2007 18:11:49 -0300, [EMAIL PROTECTED] >> <[EMAIL PROTECTED]> escribió: >> >> > I was wondering what would happen, so I tri

Re: Help %A in time.strftime(%A)

2007-12-19 Thread Ben Finney
jolly <[EMAIL PROTECTED]> writes: > import time > > today = time.localtime(time.time()) > theDate = time.strftime("%A %B %d", today) > [...] > > can someone explain to me the %A and the %B? Your first resort for more information about the standard library should be the online standard library r

Re: Is there a simple way to parse this string ?

2007-12-19 Thread Paul McGuire
On Dec 19, 4:23 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 20, 9:10 am, Larry Bates <[EMAIL PROTECTED]> wrote: > > In particular Paul Maguire recently pointed to a safe evaluator that > was restricted (IIRC) to something like lists/dicts/etc of ints/floats/ > string/etc constants -- looks

Re: pypi and easy_install

2007-12-19 Thread Istvan Albert
On Dec 19, 8:07 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > Could someone point me in the right direction? > download_url = 'http://code.google.com/p/pyftpdlib/downloads/list', you'll need to specify the full path to the actual archive, a link that one could use to download the archive,

Re: pypi and easy_install

2007-12-19 Thread Istvan Albert
On Dec 19, 9:44 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Dec 19, 8:07 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > > download_url = 'http://code.google.com/p/pyftpdlib/downloads/list', this is from looking at your setup.py here: http://pyftpdlib.googlecode.com/svn/trunk/setup.py

embed threaded python code, thread won't start right the way

2007-12-19 Thread Yue Fei
I have a multi thread python code, threads can start immediately if I run on command line, but I can get them started right the way if I call the same code from C/C++. test code like this: from threading import Thread import thread class testThread(Thread): def __init__ (self, id): T

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Ross Ridge
Sam <[EMAIL PROTECTED]> wrote: >cmds.window(t='gwfUI Builder') >cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, >100))) >cmds.paneLayout(configuration='horizontal2') >cmds.frameLayout(l='Layouts') >cmds.scrollLayout(cr=True) >cmds.columnL

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Terry Reedy
"Gary" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi! I'd like to join the fray, as the person who posted that original | LJ rant. First, some full disclosure, and stampings out of what seem | to me to be misconceptions... Hi, Gary. Welcome to Python. I hope you will take so

How do I use trace to generate coverage data in multi-threaded programs?

2007-12-19 Thread Noah
I'm trying to use the trace module to build coverage files for a multi-threaded program. http://docs.python.org/lib/module-trace.html I test my application using trace.py from the command-line like this: /usr/lib/python2.5/trace.py --missing --count --summary tools/ testall.py When I ex

Re: pypi and easy_install

2007-12-19 Thread Giampaolo Rodola'
On 20 Dic, 03:47, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Dec 19, 9:44 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > > > On Dec 19, 8:07 pm, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote: > > > download_url = 'http://code.google.com/p/pyftpdlib/downloads/list', > > this is from looking at yo

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 3:50 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > You have been done a disservice > by whoever wrote the Maya python bindings, as far as using this tool > to improve your knowledge and understanding of Python goes. No worries there. I'm definitely not using Maya as the way to learn

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 6:44 pm, Ross Ridge <[EMAIL PROTECTED]> wrote: > Sam <[EMAIL PROTECTED]> wrote: > >cmds.window(t='gwfUI Builder') > >cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, > >100))) > >cmds.paneLayout(configuration='horizontal2') > >cmds.frameLayout(l='Layouts')

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 6:44 pm, Ross Ridge <[EMAIL PROTECTED]> wrote: > Sam <[EMAIL PROTECTED]> wrote: > >cmds.window(t='gwfUI Builder') > >cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20, > >100))) > >cmds.paneLayout(configuration='horizontal2') > >cmds.frameLayout(l='Layouts')

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 7:01 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Hi, Gary. Welcome to Python. I hope you will take some of the reaction > you got as initiatory ribbing. Thanks, Terry, and absolutely! You guys are quite tame compared to some of the lions whose dens I've stumbled into on usenet. Yo

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gary
On Dec 19, 7:01 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Hi, Gary. Welcome to Python. I hope you will take some of the reaction > you got as initiatory ribbing. Thanks, Terry, and absolutely! You guys are quite tame compared to some of the lions whose dens I've stumbled into on usenet. Yo

Re: embed threaded python code, thread won't start right the way

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 23:45:28 -0300, Yue Fei <[EMAIL PROTECTED]> escribió: > I have a multi thread python code, threads can start immediately if I > run on command line, but I can get them started right the way if I call > the same code from C/C++. Only one thread at a time can execute Python

Re: How do I use trace to generate coverage data in multi-threaded programs?

2007-12-19 Thread Gabriel Genellina
En Thu, 20 Dec 2007 00:33:00 -0300, Noah <[EMAIL PROTECTED]> escribió: > I'm trying to use the trace module to build coverage files for > a multi-threaded program. > > http://docs.python.org/lib/module-trace.html > > I test my application using trace.py from the command-line like this: > >

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Gabriel Genellina
En Thu, 20 Dec 2007 00:46:50 -0300, Gary <[EMAIL PROTECTED]> escribió: > 1) Is it best/more standard to read in, and parse the XML into some > kind of Python hierarchy first, and then build the UI out of the data > in that structure, or call out UI commands as say, callbacks from the > parser live

Re: Problem untaring python2.5

2007-12-19 Thread abhishek
On Dec 19, 12:16 pm, [EMAIL PROTECTED] wrote: > Hello, > > It is not possible to give sharp hints without more relevant > information like: > - What is your platform? > - Which version of python? > - What is the version of: $tar--version (GNUtar, other proprietarytar, > according to my personal ex

Re: Does fileinput.input() read STDIN all at once?

2007-12-19 Thread Tim Roberts
Adam Funk <[EMAIL PROTECTED]> wrote: > >I'm using this sort of standard thing: > > for line in fileinput.input(): > do_stuff(line) > >and wondering whether it reads until it hits an EOF and then passes >lines (one at a time) into the variable line. This appears to be the >behaviour when it'

pop3_ssl Attachment problem

2007-12-19 Thread los117
I am trying to fetch email from gmail, but what I am really interested is the attachment. I manage to access the gmail server and get the messege but the attachment came as text: "--=_Part_5286_15861975.1197955173158 Content-Type: audio/mpeg; name="Dire Straits - 12 - Calling Elvis.mp3" Conten

<    1   2