audio on os x using python, mad, ao

2006-05-03 Thread apa7hy . spam
this message was originally posted by someone else and closed without a proper answer. i'm reposting it in hopes that someone will provide a solution. Begin Quote: "I'm attempting to play an mp3 file on OSX, but am running into some difficulty. When using py-mad and py-ao, I only get static wit

Re: ConfigParser and multiple option names

2006-05-03 Thread Caleb Hattingh
I have had this same problem before, and what I ended up doing was writing my own far more limited config parser that would create lists for repeated named assignments. Who is the maintainer of ConfigParser? Perhaps a keyword option can be added so that this kind of behaviour can be added at cre

Zope Guru...

2006-05-03 Thread bruce
Hi.. In doing some research into Workflow apps regarding document management, I came across Zope. Given that it's Python Based, I figured I'd shout to the group here... Are there any Zope gurus that I can talk to regarding Zope, and what it does/how it works? In particular, I'm looking for an app

Seeking students for the Summer of Code

2006-05-03 Thread Neal Norwitz
There is less than a week left before students must submit a final application. There are a bunch of ideas up on the wiki: http://wiki.python.org/moin/SummerOfCode/ The wiki has instructions for how to submit a proposal. There are many different areas including: core language features, lib

Re: request help with Pipe class in iterwrap.py

2006-05-03 Thread Steve R. Hastings
On Wed, 03 May 2006 08:01:12 +0200, Marc 'BlackJack' Rintsch wrote: > Maybe one with less "magic" syntax. What about using a function that > takes the iterators and an iterable and returns an iterator of the chained > iterators:: > > new_list = pipe(grep('larch'), grep('parrot', 'v')), list)(my

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread tsaar2003
Yes, I know that "constant" A will also be modified as the b[0] points to A. Obviously the [] should be marked as immutable, as A is declared to be constant thus immutable. If somebody tries to modify this immutable object an error would occur. When I further thought about this problem with consta

How to encode html and xml tag datas with standard python modules ?

2006-05-03 Thread DurumDara
Hi ! Have the python standard mod. lib. a html/xml encoder functions/procedures ? like this: def ToSafeHTM(Text): s=ToHuStrSafe(Text) l=[] for c in s: b=ord(c) if c=="\n": c="" else: if b<32 or b>127 or c in ['<','>','"',';','&','@','%'

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Yes, I know that "constant" A will also be modified as the b[0] points > to A. Obviously the [] should be marked as immutable, as A is declared > to be constant thus immutable. If somebody tries to modify this > immutable object an error would occur. so a constant decla

Re: Zope Guru...

2006-05-03 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm wether a Zope Guru nor a workflow Guru. But I think you should ask zope3-users@zope.org Regards, Egon bruce schrieb am 03.05.2006 09:36: > Hi.. > > In doing some research into Workflow apps regarding document management, I > came across

Re: How to encode html and xml tag datas with standard python modules ?

2006-05-03 Thread Fredrik Lundh
DurumDara wrote: > Have the python standard mod. lib. a html/xml encoder functions/procedures ? you can use cgi.escape(s) # escapes < > & for CDATA sections, and cgi.escape(s, True) # escapes < > & " for attributes. to output ASCII, use cgi.escape(s).encode("ascii", "xmlcharrefr

Re: Dispatching operations to user-defined methods

2006-05-03 Thread Hallvard B Furuseth
I wrote: > I'm wondering how to design this: > (...) > One obvious implementation would be to provide a class Operation, > let the user define a single subclass of this, and have the server > call request_search(), response_search(), request_modify(), > check_access() etc in that subclass. > > Then

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread tsaar2003
> are you sure you know how Python's object model work ? if you do, please > explain your proposal in terms of what needs to be changed, rather than in > terms of wishful thinking. No, I do not know. As stated in my first post, I am quite newbie in Python and miss a simple and intuitive mechanism

Re: Zope Guru...

2006-05-03 Thread jimburton
The Zope book is a good starting point - http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/view -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous assignment

2006-05-03 Thread bruno at modulix
John Salerno wrote: > Bruno Desthuilliers wrote: > >> But my question (sorry, it may not have been clear) was more along the >> line of : "why do you worry about identity in the given snippet ?". > > > Actually, I kind of thought that maybe it *didn't* matter in this > particular example anyway

Re: Zope Guru...

2006-05-03 Thread Michele Simionato
The guys here are Zope and workflow guru's I have worked with and I have been very happy with them: http://www.reflab.com/ Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Images and mouse events

2006-05-03 Thread Wynand Singels
Hi there everyone I'm trying to figure out the best (and fastest way) to display a JPEG image and then input several (x,y) coordinate pairs from mouse clicks on the image. I figured out how to do this in pylab using matplotlib as follows: img = 256 - S.misc.pilutil.imread('pic1.jpg')

Re: An Atlas of Graphs with Python

2006-05-03 Thread [EMAIL PROTECTED]
You could have a look at the Mozart/Oz community. Oz is a language supporting logic and constraint programming out of the box and people are using these capabilities to play linguistic with graph matching. See http://www.lifl.fr/~duchier/papers/duchier-xdg-cslp2004.pdf for a possibly enlightening

Re: Zope Guru...

2006-05-03 Thread bruno at modulix
bruce wrote: > Hi.. > > In doing some research into Workflow apps regarding document management, I > came across Zope. Given that it's Python Based, I figured I'd shout to the > group here... Zope is Python based, but it's a world in itself, and probably not the most pythonic app around (which do

Re: Can subprocess point to file descriptor 5?

2006-05-03 Thread Diez B. Roggisch
Steve Quezadas wrote: > Hello, > > I tried posting this to the web forums without much luck. > > I have some simple subprocess code here: > output = subprocess.Popen([/usr/bin/program"], > stdout=subprocess.PIPE).communicate()[0] > > However, /usr/bin/prgram also outputs not only to stdout and

Re: noob question: "TypeError" wrong number of args

2006-05-03 Thread bruno at modulix
Bruno Desthuilliers wrote: (snip) > Since Python 3K is supposed to be the 'clean the warts and don't bother > breaking compat' rewrite of Python, you may as well propose a PEP on > this. You'll have to really prove it doesn't break anything else in the > object model, have strong and articulate arg

Calling a Postgres Function using CGI written in Python

2006-05-03 Thread Fuzzydave
I need to call a function stored in Postgres which does a lot of the db and calculation work all the SQL queries are hardcoded in a file called cmi.py. What i need to do is too to call my function from postgres passing in my product_code variable into it and returning the value from the query into

Re: [Python-3000] bug in modulus?

2006-05-03 Thread Christophe
Guido van Rossum a écrit : > This is way above my head. :-) > > The only requirement *I* would like to see is that for floats that > exactly represent ints (or longs for that matter) the result ought of > x%y ought to have the same value as the same operation on the > corresponding ints (except if

Re: Calling a Postgres Function using CGI written in Python

2006-05-03 Thread Colin Gillespie
A quick google for "Python CGI" gives you lots of links. But if you intend to do much in the way of cgi, then I would recommend the spyce framework,http://spyce.sourceforge.net/ HTH Colin Fuzzydave wrote: > I need to call a function stored in Postgres which does a lot of the db > and calculat

Re: [PythonCE] Curious about Python for Windows CE

2006-05-03 Thread Gonzalo Monzón
Redefined Horizons escribió: > I am still pretty new to Python, but my company is investigating the > possibilty of developing applications on Windows CE Devices, and I had > a couple of questions: > > I'd like to use Python as my development environment for Windows CE > Devices. What is the

Re: Calling a Postgres Function using CGI written in Python

2006-05-03 Thread Fuzzydave
I did do a google search i have looking through the one python book i have and there are plenty of references for how to write a function in Python but not as many on how to call a function stored in postgres using python I have tried the conn.execute(cmi_grn_cost(productCode)) and also the conn.ca

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread Christophe
Fredrik Lundh a écrit : > [EMAIL PROTECTED] wrote: > > >>For example: >> >> >A = [] # let's declare a "constant" here >b = A # and let's assign the constant here >b.append('1') # OOPS! >c = A >print A >> >>['1'] >> >print b >> >>['1'] >> >print c >> >>['1'] >> >>As

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread Michele Simionato
[EMAIL PROTECTED] wrote: > As stated in my first post, I am quite newbie in > Python and miss a simple and intuitive mechanism that would allow to > declare something as constant and that would protect these "constant" > objects from accidental modifications. > > T.S. Python solution is to rely on

Re: redemo.py with Tkinter

2006-05-03 Thread Christos Georgiou
On 03 May 2006 06:05:46 +1000, rumours say that Gary Wessle <[EMAIL PROTECTED]> might have written: >I was reading the Regular Expression HowTo, it refers to redemo.py if >you have Tkinter installed. a quick #locate redemo.py returned none on >my debian/testing, however #locate Tkinter returned ma

Re: Binary File Reading : Metastock

2006-05-03 Thread bruno at modulix
Jack wrote: > Hi > > I am having a little trouble trying to read a binary file, I would like > to write an ascii to Metastock converter in python but am not having a > lot of success. > > The file formats are > > http://sf.gds.tuwien.ac.at/00-pdf/m/mstockfl/MetaStock.pdf > > > If any one can p

how to install multiple pythons on window

2006-05-03 Thread K.S.Wong
Hi, I have python 2.2 that is embedded in an application and I need to work with other sofware/modules that require higher python version. I have current installed 2.4. I can only use environment variables to allow one of the two versions to work at one time (e.g. setting pythonhome for one v

Re: Binary File Reading : Metastock

2006-05-03 Thread malv
Jack wrote: > Hi > > I am having a little trouble trying to read a binary file, I would like > to write an ascii to Metastock converter in python but am not having a > lot of success. > > The file formats are > > http://sf.gds.tuwien.ac.at/00-pdf/m/mstockfl/MetaStock.pdf > > > If any one can point

Re: ImportError: No module named HTMLParser

2006-05-03 Thread Mike
Thanks - it turned out that the Python installation on our vendor's server is a cut-down one. I have had to place the HTMLParser source in a package off the a sys.path directory and import it from there - it now works. -- http://mail.python.org/mailman/listinfo/python-list

Zope/Plone developer(s) needed to help build and finalize a fun project.

2006-05-03 Thread Nainto
I am the lead developer of MacSuburb.com, a to-be-launched mac community. Unfortunatly, I am the only developer. If you are interested in helping please email me or reply with your contact information. Please leave atleast your email and/or IM name. I can be reached at [EMAIL PROTECTED] *Make sure

RE: [Python-3000] bug in modulus?

2006-05-03 Thread Michael Chermside
Tim Peters writes: > IMO, it was a mistake (and partly my fault cuz I didn't whine early) > for Python to try to define % the same way for ints and floats. [...] > I'd like to see this change in Python 3000. Note that IBM's proposed > standard for decimal arithmetic (which Python's "dec

Re: [Python-3000] bug in modulus?

2006-05-03 Thread skip
Michael> So why not make "x % y" for floats behave exactly like it does Michael> for integers and provide a separate operation with your Michael> described behavior? %% anyone? (Skip ducks and runs...) Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: string.find first before location

2006-05-03 Thread Kent Johnson
Gary Wessle wrote: > ps. is there a online doc or web page where one enters a method and it > returns the related docs? The index to the library reference is one place: http://docs.python.org/lib/genindex.html and of course help() in the interactive interpreter... Kent -- http://mail.python.org

ANN: ShedSkin 0.0.8

2006-05-03 Thread bearophileHUGS
Just released the version 0.0.8 of ShedSkin, the Python ==> C++ compiler. Blog, the last post contains some notes about Summer of Code and some open problems: http://shed-skin.blogspot.com/ Thesis about SS, with lot of info, useful for people that want to help this project too: http://kascade.org

Re: ANN: ShedSkin 0.0.8

2006-05-03 Thread bearophileHUGS
Sorry, the correct link to the thesis: http://kascade.org/shedskin.pdf bearophile -- http://mail.python.org/mailman/listinfo/python-list

Playability of a file in windows media player

2006-05-03 Thread sri2097
Basically, I want to check if a URL is playable or not (without actually playing it). i.e. given a URL I want to write an automation script to figure it out for me if it's playable or not. If you give a bad/invalid URL for windows media player to play a pop-up window shows us that it cannot be play

Running compiled Python files

2006-05-03 Thread Shankar
Hello, I am trying to run compiled Python files (*.pyc and *.pyo) using Python C API. I am using the method PyRun_FileFlags() for this purpose. The code snippet is as follows:- PyCompilerFlags myFlags; myFlags.cf_flags=1; // I tried all values 0, 1 and 2 PyRun_FileFlags(script, file, Py_file_i

Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Nico Grubert
Hi there, I am looking for a way to sort a list containing dictionaries. This is my example list: [{'Title': 'ABC', 'from_datetime': DateTime('2006/04/25 12:45:00 GMT+2')}, {'Title': 'DEF', 'from_datetime': DateTime('2006/04/18 12:45:00 GMT+2')}, {'Title': 'GHI', 'from_datetime': DateTime('200

Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
"manstey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a text file with about 450,000 lines. Each line has 4-5 fields, > separated by various delimiters (spaces, @, etc). > > I want to load in the text file and then run routines on it to produce > 2-3 additional fiel

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Fredrik Lundh
Nico Grubert wrote: > I am looking for a way to sort a list containing dictionaries. > > This is my example list: > [{'Title': 'ABC', 'from_datetime': DateTime('2006/04/25 12:45:00 > GMT+2')}, {'Title': 'DEF', 'from_datetime': DateTime('2006/04/18 > 12:45:00 GMT+2')}, {'Title': 'GHI', 'from_dateti

We finally have a complete Python project

2006-05-03 Thread Rony Steelandt
It is finally a fact, our new software project will be completely developed in Python ! Why is this so special , Well, we are using Python, for internal tools and some internal company software since years So why Python now ? Well, we are talking about a new project for us, so we can start from

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread bruno at modulix
Nico Grubert wrote: > Hi there, > > I am looking for a way to sort a list containing dictionaries. > > This is my example list: > [{'Title': 'ABC', 'from_datetime': DateTime('2006/04/25 12:45:00 > GMT+2')}, {'Title': 'DEF', 'from_datetime': DateTime('2006/04/18 > 12:45:00 GMT+2')}, {'Title': 'GHI

Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
"manstey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a text file with about 450,000 lines. Each line has 4-5 fields, > separated by various delimiters (spaces, @, etc). > > I want to load in the text file and then run routines on it to produce > 2-3 additional fiel

Re: Recommended data structure for newbie

2006-05-03 Thread Paul McGuire
> You asked about data structures specifically. The core collections in > python are lists, dicts, and more recently, sets. (oops, also forgot tuples - very much like lists, but immutable) -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Eric Deveaud
Nico Grubert wrote: > Hi there, > > I am looking for a way to sort a list containing dictionaries. > > This is my example list: > [{'Title': 'ABC', 'from_datetime': DateTime('2006/04/25 12:45:00 > GMT+2')}, {'Title': 'DEF', 'from_datetime': DateTime('2006/04/18 > 12:45:00 GMT+2')}, {'Titl

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Tim Chase
> assuming that DateTime returns something that compares correctly, you can > do something like: > > def sortkey(item): > return item.get("from_datetime") > > data.sort(key=sortkey) > > (assuming Python 2.4 or later) Building on Fredrik's solution, for 2.3 (or earlier?), you ca

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Nico Grubert
> assuming that DateTime returns something that compares correctly, you can > do something like: > > def sortkey(item): > return item.get("from_datetime") > > data.sort(key=sortkey) > > (assuming Python 2.4 or later) Thank you very much, Frederik. Unfortunately, I can only use P

Re: ConfigParser and multiple option names

2006-05-03 Thread Alexis Roda
Not tested by me, but according to docs it does support list values: http://cheeseshop.python.org/pypi/ConfigObj Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: simultaneous assignment

2006-05-03 Thread Christos Georgiou
On Tue, 02 May 2006 17:15:05 GMT, rumours say that John Salerno <[EMAIL PROTECTED]> might have written: >Another thing I'm trying to do is write a function that tests to see if >a list contains exactly one true item, and the rest are false (obviously >this would have to be a list of boolean valu

Re: --version?

2006-05-03 Thread Heiko Wundram
Am Dienstag 02 Mai 2006 16:31 schrieb Fredrik Lundh: > Paul Watson wrote: > > I am well aware of -V. Could --version be supported as well? > > http://www.python.org/dev/ > http://sourceforge.net/tracker/?group_id=5470&atid=355470 > > I just submitted: https://sourceforge.net/tracker/index.php?f

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread bruno at modulix
Eric Deveaud wrote: (snip) > > sort can take a comparaison function. The problem with it is that it may slow down things a lot... -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/ma

Re: PyQt 4.0beta1 Released

2006-05-03 Thread Michael 'Mickey' Lauer
Phil Thompson <[EMAIL PROTECTED]> wrote: > On Saturday 29 April 2006 1:27 pm, Skink wrote: > > Phil Thompson wrote: > > > Riverbank Computing is pleased to announce the release of PyQt v4.0beta1 > > > available from http://www.riverbankcomputing.co.uk/pyqt/. > > > > > > PyQt is a comprehensive set

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Fredrik Lundh
Nico Grubert wrote: > > assuming that DateTime returns something that compares correctly, you can > > do something like: > > > > def sortkey(item): > > return item.get("from_datetime") > > > > data.sort(key=sortkey) > > > > (assuming Python 2.4 or later) > > Thank you very much, Fr

Customize IE to make a toolbar visible

2006-05-03 Thread brochu121
Does anyone know of a way to make a toolbar visible in IE through automation? I am not speaking about the InternetExplorer.ToolBar that I have run into on MSDN, but rather want to make a toolbar such as Yahoo's visibilbe through running my script. How would I do this. Thanks, Dave -- http://mai

ANN: Advanced Python training, May 17-19, San Francisco

2006-05-03 Thread w chun
FINAL REMINDER... we still have some seats left! What: Advanced Python Programming When: May 17-19, 2006 Where: San Francisco (SFO/San Bruno), CA, USA http://cyberwebconsulting.com (click on "Python Training") This course, meant to follow our in-depth introduction class, adds new tools to t

Re: Sorting a list of dictionaries by dictionary key

2006-05-03 Thread Eric Deveaud
bruno at modulix wrote: > Eric Deveaud wrote: > (snip) > > > > sort can take a comparaison function. > > The problem with it is that it may slow down things a lot... point taken. I have to purge my mind from the other programing languages I practice. ;-) Eric -- http://mail.python

Need Plone Information

2006-05-03 Thread bruce
Hi I've never used Python/Plone, and am wondering if I can talk with anyone who's used Plone. I'm trying to determine if Plone could be easily used for a potential application. -bruce [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

May I know Which is the best programming guide for using Tix in python

2006-05-03 Thread praveenkumar . 117
Hi, Can anyone suggest best reference book of using Tix widgets in python. I want to know the prototype of widgets, its member functions and data members -Regards, praveen -- http://mail.python.org/mailman/listinfo/python-list

Numeric Python

2006-05-03 Thread utab
Dear all, I am new to python however not new to programming world, I have got the Numeric package I think because the output seems OK >>> from Numeric import * >>> seems OK but when I try to view a picture file which is supplied in the install and test documentation of numpy it fails >>>view(gr

Re: Need Plone Information

2006-05-03 Thread bruno at modulix
bruce wrote: > Hi > > I've never used Python/Plone, and am wondering if I can talk with anyone > who's used Plone. I'm trying to determine if Plone could be easily used for > a potential application. Then you'd better post this to the plone and/or zope mailing lists. -- bruno desthuilliers

__getattr__ on non-instantiated class

2006-05-03 Thread Fredp
Hi I was wondering if it is possible to have the various magic methods, mainly __getattr__ and __setattr__, and @property attributes called when accessing the attribute of a non-intantiated class. Imagin something like this: # class MyClass: @property def prop(self): print

Re: Numeric Python

2006-05-03 Thread cjw
Numeric => numarray => numpy is in a state of transition. It might be better if you installed the latest version of numpy. Colin W. -- http://mail.python.org/mailman/listinfo/python-list

Re: __getattr__ on non-instantiated class

2006-05-03 Thread Larry Bates
Fredp wrote: > Hi > I was wondering if it is possible to have the various magic methods, > mainly __getattr__ and __setattr__, and @property attributes called > when accessing the attribute of a non-intantiated class. > > Imagin something like this: > # > class MyClass: > @property >

Re: simultaneous assignment

2006-05-03 Thread John Salerno
bruno at modulix wrote: > John Salerno wrote: >> Bruno Desthuilliers wrote: >> >>> But my question (sorry, it may not have been clear) was more along the >>> line of : "why do you worry about identity in the given snippet ?". >> >> Actually, I kind of thought that maybe it *didn't* matter in this

IPython team needs a student for a google "Summer of Code" project.

2006-05-03 Thread Ville Vainio
This comes in a bit of a hurry (you only have time until next monday to sign up), but here's the deal: The next version of ipython (0.7.2, "out soon", pretty much done already) will include an extension for browsing and manipulating tabular data (e.g. file name, file size, permissions etc.) called

Update Tix ExFileSelectBox

2006-05-03 Thread Arne
Hello! I am looking for an option on Tix ExFileSelectBox. I am using this widget to delete files. After I have delete a file it is still on the filelist view. After I have changed the directory and come back I will get the new view. What I am looking for is a function to update the view of the h

Re: what is the 'host' for SMTP?

2006-05-03 Thread John Salerno
Steve R. Hastings wrote: > Take a look at your email client. Find where it specifies the server for > outgoing mail. Use whatever it says there. > > For example, I am a customer of blarg.net; I am therefore permitted to use > mail.blarg.net, which has a mail server running on it. If your ISP i

Strange Threads Behaviour...

2006-05-03 Thread rodmc
I have written an application which uses threads and the XMPP library - this is a library which supports the jabber instant messaging protocol. The application works fine when run from Idle, however I get thread errors when I try to run it as an EXE created with Py2Exe or when it is run within othe

Re: Need Plone Information

2006-05-03 Thread N.Davis
bruce wrote: > I've never used Python/Plone, and am wondering if I can talk with anyone > who's used Plone. I'm trying to determine if Plone could be easily used for > a potential application. > this might help (where to start): http://plone.org/documentation/how-to/read-documentation Nick -- ht

Re: Strange Threads Behaviour...

2006-05-03 Thread Diez B. Roggisch
> I have written an application which uses threads and the XMPP library - > this is a library which supports the jabber instant messaging protocol. > The application works fine when run from Idle, however I get thread > errors when I try to run it as an EXE created with Py2Exe or when it is > run w

Re: __getattr__ on non-instantiated class

2006-05-03 Thread Fredp
Larry Bates ha scritto: > Fredp wrote: > > Hi > > I was wondering if it is possible to have the various magic methods, > > mainly __getattr__ and __setattr__, and @property attributes called > > when accessing the attribute of a non-intantiated class. > > > > Imagin something like this: > > #

Re: __getattr__ on non-instantiated class

2006-05-03 Thread bruno at modulix
Larry Bates wrote: > Fredp wrote: > >>Hi >>I was wondering if it is possible to have the various magic methods, >>mainly __getattr__ and __setattr__, and @property attributes called >>when accessing the attribute of a non-intantiated class. >> >>Imagin something like this: >># >>class MyClass:

Re: Newbie question on code vetting

2006-05-03 Thread Edward Elliott
Dennis Lee Bieber wrote: >> I work for a risk-averse company, and I want to compile a solid case for >> obtaining and using Python at work. >> > Given the nature of the US Patent Office... You might as well lock > the doors now... > > The Patent Office could issue a patent next week that makes all

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-03 Thread Ivan Shevanski
On 5/3/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: On 2 May 2006 12:02:50 -0700, [EMAIL PROTECTED] declaimed the following in comp.lang.python:>> Also, How can I shutdown other Linux terminals from my Main (Linux) ?>   Uhm... Telnet into the other workstations using the root account (orso

I have problem with the qt-module333.dll

2006-05-03 Thread Tomás Rodriguez Orta
Hello friends. I have the pyqt 3.14 educational and when execute some exmple the system sohow the following error. The dinamic link library qt-module333.dll could not be the found the specified path c:\\python24\lib I hope some help. bst regards TOMAS

Re: noob question: "TypeError" wrong number of args

2006-05-03 Thread Edward Elliott
Bruno Desthuilliers wrote: > IOW, let's give Edward some time to come up with enough rope so we can > hang him to the nearest (AS) Tree !-) That's all I ask. ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: __getattr__ on non-instantiated class

2006-05-03 Thread bruno at modulix
Fredp wrote: (snip) > I have something like a simple ORM which objects haven't a fixed number > of fields, and I need to have properties (or methods) for each of them, dumbiest possible example, but this should het you started class Field(object): # dummy def __init__(self, **kw): self._

NaN handling

2006-05-03 Thread Andy McDonagh
Dear python experts, I am new to python and this site, so I apologize if this is off topic (i.e. is it a SciPy question?). I will try to demonstrate my problem below: #!/usr/local/bin/python from scipy import * from scipy.stats import * a=

Re: NaN handling

2006-05-03 Thread Robert Kern
Andy McDonagh wrote: > Dear python experts, > > I am new to python and this site, so I apologize if this is off topic (i.e. > is it a SciPy question?). I will try to demonstrate my problem below: > > #!/usr/local/bin/python > > from scipy

Re: Zope Guru...

2006-05-03 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, bruce <[EMAIL PROTECTED]> wrote: >Hi.. > >In doing some research into Workflow apps regarding document management, I >came across Zope. Given that it's Python Based, I figured I'd shout to the >group here... > >Are there any Zope gurus that I can talk to regarding Zo

A python problem about int to long promotion just see the idle session

2006-05-03 Thread gen_tricomi
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. Personal firewall software may warn about the connection IDLE makes to its su

problem with reload(sys) (doing reload on the sys module)

2006-05-03 Thread gen_tricomi
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. Personal firewall software may warn about the connection IDLE makes to its su

Re: noob question: "TypeError" wrong number of args

2006-05-03 Thread Edward Elliott
Bruno Desthuilliers wrote: > But then, constructs like: > > class Obj(object): >def method(...): ... >method = staticmethod(method) > > or it's newer syntactic-sugar-version would become somewhat more > difficult to parse properly - but I admit that this is beyond my > knowledge. Hmm, th

Re: NaN handling

2006-05-03 Thread Grant Edwards
On 2006-05-03, Andy McDonagh <[EMAIL PROTECTED]> wrote: > Dear python experts, > > I am new to python and this site, so I apologize if this is off topic (i.e. > is it a SciPy question?). I will try to demonstrate my problem below: > > #!/usr

Re: noob question: "TypeError" wrong number of args

2006-05-03 Thread Edward Elliott
bruno at modulix wrote: > And of course propose an implementation - perhaps the compiler.ast could > be useful ? Ugh. Just when I thought I'd seen my last abstract syntax tree, one rears its ugly head. -- http://mail.python.org/mailman/listinfo/python-list

Re: A python problem about int to long promotion just see the idle session

2006-05-03 Thread Fredrik Lundh
"gen_tricomi" <[EMAIL PROTECTED]> wrote: > IDLE 1.1.2 > >>> import sys > >>> save_maxint = sys.maxint > >>> save_maxint > 2147483647 > >>> save_maxint += 1 > >>> save_maxint > 2147483648L > >>> save_maxint - 1 > 2147483647L > >>> save_maxint + 1 > 2147483649L > >>> save_maxint - 1 > 2147483647L >

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread Edward Elliott
Michele Simionato wrote: > Python solution is to rely on the intelligence of programmers. If they > see an all caps name and then they try to change it without knowing what > they are doing, then they are stupid. If you have stupid programmers there > is no way the language can stop them for makin

Re: Anaglyph 3D Stereo Imaging with PIL and numpy

2006-05-03 Thread Scott David Daniels
David Murmann wrote: > i just found some colored glass and experimented a bit with > these red/green 3d images, so i thought i'd share this simple > script i wrote to generate such images with anyone whos > interested. i also wouldn't mind some comments on the code. Check out VPython -- there you

Re: NewB question on text manipulation

2006-05-03 Thread ProvoWallis
Thanks very much for this I really appreciate it. I've pasted what I've got now thanks to you. I only have one issue that I can't figure out. When I print the new string I'm getting all of the values in the lt list rather than just the one that corresponds to the original entry. E.g., My origina

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > What I'd like to see here is that b gets a copy of A so that the > original A won't be modified as we play with b. However, as we assign a > constant value A to b, I wouldn't want to restrict myself from playing > with b. If A is a list you can take a copy-slice liek th

Re: what is the 'host' for SMTP?

2006-05-03 Thread Steve R. Hastings
On Wed, 03 May 2006 16:10:16 +, John Salerno wrote: > If all I > put in is, for example, smtp.gmail.com, how is that directed to my own > email address? The address of the SMTP server does not specify where the email will go. SMTP is a protocol, and when you are talking SMTP to the server,

Re: Possible constant assignment operators ":=" and "::=" for Python

2006-05-03 Thread Diez B. Roggisch
Edward Elliott wrote: > Michele Simionato wrote: >> Python solution is to rely on the intelligence of programmers. If they >> see an all caps name and then they try to change it without knowing what >> they are doing, then they are stupid. If you have stupid programmers >> there is no way the lang

Re: simultaneous assignment

2006-05-03 Thread Edward Elliott
Steve R. Hastings wrote: > You could also use a function that counts all different values in a list, > reducing the list to a dictionary whose keys are the unique values from > the list. Wouldn't reducing to a set instead of a dict make more sense if all you want to do is count uniq elements? --

Re: __getattr__ on non-instantiated class

2006-05-03 Thread Fredp
Well, actually I need only a tiny subset of a ORM. Or perhaps what I need isn't exactly an ORM, because I have only one kind of Object with a various number of Fields on a separate Table, so I was looking to create something that could fit this scheme and nothing more, but I see in any case it need

Re: noob question: "TypeError" wrong number of args

2006-05-03 Thread bruno at modulix
Edward Elliott wrote: > Bruno Desthuilliers wrote: > >>But then, constructs like: >> >>class Obj(object): >> def method(...): ... >> method = staticmethod(method) >> >>or it's newer syntactic-sugar-version would become somewhat more >>difficult to parse properly - but I admit that this is beyo

Re: A python problem about int to long promotion just see the idle session

2006-05-03 Thread Robert Kern
gen_tricomi wrote: > from the above you can see what int to long promotion is causing > i dont need to say much please see for yourself. is this a bug or > a feature. This is expected behavior. Why is it problematic for you? -- Robert Kern "I have come to believe that the whole world is an eni

Re: what is the 'host' for SMTP?

2006-05-03 Thread John Salerno
Steve R. Hastings wrote: > On Wed, 03 May 2006 16:10:16 +, John Salerno wrote: >> If all I >> put in is, for example, smtp.gmail.com, how is that directed to my own >> email address? > > The address of the SMTP server does not specify where the email will go. > SMTP is a protocol, and when

  1   2   3   >