cmd module "busy waiter" ?

2006-04-23 Thread placid
Hi all, Just wondering if the cmd module in python uses "busy waiting" for "polling" user command input as this is inefficient. Cheers -- http://mail.python.org/mailman/listinfo/python-list

MinGW and Python

2006-04-23 Thread Srijit Kumar Bhadra
Is there any specific reason for not using MinGW to build the official distribution of Python for Win32? A quick Google search did not reveal the answer to my question. If a link is available, please post it. Best Regards, Srijit -- http://mail.python.org/mailman/listinfo/python-list

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread Terry Reedy
"fumanchu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm surprised noone has pursued a course of subtraction rather than > division. I believe someone did mention the subtraction method in one of the initial responses. But the problem is this. If you independently sample n

Re: How I learned Tkinter

2006-04-23 Thread Ian Parker
In message <[EMAIL PROTECTED]>, peter <[EMAIL PROTECTED]> writes >I've been trying to teach myself Tkinter programming over the last few >months >(in a strictly amateur way), and have made a number of requests for >help in this >newsgroup and elsewhere. > >I've now (sort of) got there - in that I

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread Robert Kern
Edward Elliott wrote: > I think Apple switched to the Intel compiler for > x86 macs, was python built with that or with gcc? I'm pretty sure MacTel OS X still uses gcc 4 (although I think there is a beta version of the Intel compiler available). All of the Python builds floating around for it cer

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread Edward Elliott
Alex Martelli wrote: > the Windows version, despite the slight > overhead of running under Parallels' virtualization, is an impressive > 12%+ _faster_ than the "native" MacOSX Python 2.4.3 (I'm not quite sure > about how good Parallels' virtualization IS, but even if it's as > impressive as a mere

i18n hell

2006-04-23 Thread fyleow
I just spent hours trying to figure out why even after I set my SQL table attributes to UTF-8 only garbage kept adding into the database. Apparently you need to execute "SET NAMES 'utf8'" before inserting into the tables. Does anyone have experience working with other languages using Django or Tur

Re: Can you create an instance of a subclass with an existing instance of the base class?

2006-04-23 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "Sandra-24" <[EMAIL PROTECTED]> wrote: >However in this case I'm simply getting an object (an mp_request object >from mod_python) passed into my function, and before I pass it on to >the functions that make up and individual web page it is modified by >adding membe

Remember me... The Virtual Interaction configuration?

2006-04-23 Thread threeseas
for those who don't like me, here's your last chance to shoot me down See wikipedia entries for Timothy Rue and Abstraction Physics. -- http://mail.python.org/mailman/listinfo/python-list

MySql -Python question

2006-04-23 Thread ataanis
Hey all, I'm running a query within some python code, and I'm having difficulties doing something that seems to be really simple . I'm running a query in the following form: query01 = 'select max(DirectorID) +1 from Director;' cursor.execute(query01) table = cursor.fetchall() the re

Re: mod_python web-dav management system

2006-04-23 Thread Kyler Laird
[EMAIL PROTECTED] writes: >What about if there existed a mod_dav_python for Apache. Would >that be of interest. To me it would only be of interest if it's combined with Apache's suid capabilities. > The idea is that the module could bridge the >C API hooks and structures of mod_dav module to Pyt

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread Alex Martelli
AIM <[EMAIL PROTECTED]> wrote: > The site comes back with a message saying ... > > "The download you requested is unavailable. If you continue to see this > message when trying to access this download, go to the "Search for a > Download" area on the Download Center home page." > > Does anyone ha

Re: Using distutils in Windows XP / "Python in a Nutshell"

2006-04-23 Thread Alex Martelli
Blair LeGent <[EMAIL PROTECTED]> wrote: > Following the directions in "Python in a Nutshell" (an excellent book), Thanks! > I entered the C code for "helloworld.c", saved it as a file, and entered > this script and saved it as setup.py: > > from distutils.core import setup, Extension > setup(na

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread AIM
The site comes back with a message saying ... "The download you requested is unavailable. If you continue to see this message when trying to access this download, go to the "Search for a Download" area on the Download Center home page." Does anyone have any other ideas of where to look? -- http

Re: MySQLdb

2006-04-23 Thread placid
[EMAIL PROTECTED] wrote: > placid> Does anyone have binary for MySQLdb (python 2.4.3, MySQL 5.0a) ? > > Platform? Last I checked a few weeks ago, MySQLdb didn't yet work with > MySQL 5.0. > > Skip Sorry about that , im using Windows XP... -- http://mail.python.org/mailman/listinfo/python-lis

Re: Using distutils in Windows XP / "Python in a Nutshell"

2006-04-23 Thread Edward Elliott
Blair LeGent wrote: > error: The .NET Framework SDK needs to be installed before building > extensions for Python. > > ...but the .NET Framework IS installed Just a guess, but is the C compiler in your PATH when you run python? I'm assuming python on xp still uses environment variables and not

Using distutils in Windows XP / "Python in a Nutshell"

2006-04-23 Thread Blair LeGent
Following the directions in "Python in a Nutshell" (an excellent book), I entered the C code for "helloworld.c", saved it as a file, and entered this script and saved it as setup.py: from distutils.core import setup, Extension setup(name='helloworld', ext_modules= [ Extension('helloworld',sourc

Re: Recommended IDE for creating GUI?

2006-04-23 Thread Luis M. González
Check PythonCard: http://pythoncard.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb

2006-04-23 Thread skip
placid> Does anyone have binary for MySQLdb (python 2.4.3, MySQL 5.0a) ? Platform? Last I checked a few weeks ago, MySQLdb didn't yet work with MySQL 5.0. Skip -- http://mail.python.org/mailman/listinfo/python-list

MySQLdb

2006-04-23 Thread placid
Hi all, Does anyone have binary for MySQLdb (python 2.4.3, MySQL 5.0a) ? Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: bug in modulus?

2006-04-23 Thread Dan Bishop
[EMAIL PROTECTED] wrote: > Hmmm. I understand. I'd suggest that someone just drop a link from the > Library reference manual as the divmod entry over there seems to > contradict it. > > """ > divmod(a, b) > > Take two (non complex) numbers as arguments and return a pair of > numbers consisting of t

Re: PYTHONPATH

2006-04-23 Thread Edward Elliott
Brian van den Broek wrote: > if 1; then > somestuff > > Trying (3) gave > [EMAIL PROTECTED]:~$ . .bash_profile > bash: 1: command not found The error indicates the shell tried to execute a program named '1' and couldn't find one. Arthimetic expressions generally have to be wrapped in (()) i

Re: Passing data attributes as method parameters

2006-04-23 Thread Jay Parlar
On Apr 23, 2006, at 4:59 PM, Panos Laganakos wrote: > Thanks Ben. > > What does it mean that they're statically bound? > > It seems weird that I'm not able to access variables in the class > namespace even though these attributes come into existance after class > instantiation. > The parameters

Re: Passing data attributes as method parameters

2006-04-23 Thread Panos Laganakos
Thanks Ben. What does it mean that they're statically bound? It seems weird that I'm not able to access variables in the class namespace even though these attributes come into existance after class instantiation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why new Python 2.5 feature "class C()" return old-style class ?

2006-04-23 Thread Paul Boddie
Christophe wrote: > Aahz a écrit : > > I'm certainly not alone in believing that new-style classes are > > better avoided for newbies. > > Well, old-style classes are perfect to confuse the newbie. After all, > there's nothing like adding a "property" in a class and wondering why > it does not work

Re: Passing data attributes as method parameters

2006-04-23 Thread Ben Cartwright
Panos Laganakos wrote: > I'd like to know how its possible to pass a data attribute as a method > parameter. > > Something in the form of: > > class MyClass: > def __init__(self): > self.a = 10 > self.b = '20' > > def my_method(self, param1=self.a, param2=self.b): >

Passing data attributes as method parameters

2006-04-23 Thread Panos Laganakos
Hello, I'd like to know how its possible to pass a data attribute as a method parameter. Something in the form of: class MyClass: def __init__(self): self.a = 10 self.b = '20' def my_method(self, param1=self.a, param2=self.b): pass Seems to produce a NameError o

Re: PYTHONPATH

2006-04-23 Thread Brian van den Broek
Edward Elliott said unto the world upon 23/04/06 04:28 PM: > Brian van den Broek wrote: > >>The suggestions above appear not to work for me: >> >>[EMAIL PROTECTED]:~$ cat /etc/profile | grep 'export PYTHONPATH' >>export PYTHONPATH="~/PythonFiles" >>[EMAIL PROTECTED]:~$ cat .bash_profile | grep 'ex

Re: getattr from local scope

2006-04-23 Thread Edward Elliott
Alex Martelli wrote: > sys.modules[__name__].__dict__ may be more handily accessed by the > built-in function globals(). Well there you go. Glad it's not that awkward. -- http://mail.python.org/mailman/listinfo/python-list

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread Edward Elliott
Alex Martelli wrote: > Such total disuniformity, where the very distribution of each value is > skewed by the preceding one, may still be "random" for some sufficiently > vague meaning of "random", but my intuition suggests it's unlikely to > prove satisfactory for the OP's purposes. It does seem

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread Robert Kern
Alex Martelli wrote: > fumanchu <[EMAIL PROTECTED]> wrote: > >>I'm surprised noone has pursued a course of subtraction rather than >>division. Say you want 10 numbers: >> >s = 1.0 >n = [] >for x in xrange(9): >> >>... value = random.random() * s >>... n.append(value) >>... s -= v

Re: getattr from local scope

2006-04-23 Thread Alex Martelli
Edward Elliott <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Basically my application has a scheduler which stores names of functions > > defined in the "schedule" module in a database, to be run on certain > > days. Every night I call schedule.RunSchedule, which grabs all the rows on

Re: Why new Python 2.5 feature "class C()" return old-style class ?

2006-04-23 Thread Bengt Richter
On Tue, 11 Apr 2006 16:30:10 +0200, bruno at modulix <[EMAIL PROTECTED]> wrote: >looping wrote: >> bruno at modulix wrote: >> >>>looping wrote: >>> Peter Hansen wrote: >Georg Brandl wrote: > > >>class C(): >> >>is meant to be synonymous with is meant by whom,

Re: getattr from local scope

2006-04-23 Thread Edward Elliott
[EMAIL PROTECTED] wrote: > Basically my application has a scheduler which stores names of functions > defined in the "schedule" module in a database, to be run on certain > days. Every night I call schedule.RunSchedule, which grabs all the rows on > the database that have to be run now, and I want

Re: Calling Python from Matlab

2006-04-23 Thread Sébastien Boisgérault
> Also, can you elaborate on what (if anything) it is about Matlab that > you feel you can't replicate in Python? Are you aware of matplotlib and > numpy? The features provided by some matlab 'toolboxes' (libraries in matlab-speak) are lacking, and are beyond what numpy + scipy may provide. Some

Re: PYTHONPATH

2006-04-23 Thread Edward Elliott
Brian van den Broek wrote: > The suggestions above appear not to work for me: > > [EMAIL PROTECTED]:~$ cat /etc/profile | grep 'export PYTHONPATH' > export PYTHONPATH="~/PythonFiles" > [EMAIL PROTECTED]:~$ cat .bash_profile | grep 'export PYTHONPATH' > export PYTHONPATH="~/PythonFiles" Those file

getattr from local scope

2006-04-23 Thread rob . haswell
Hey there My question is pretty simple - I want to use something like getattr to grab a symbol from the local scope from a string. Basically my application has a scheduler which stores names of functions defined in the "schedule" module in a database, to be run on certain days. Every night I call

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread Alex Martelli
fumanchu <[EMAIL PROTECTED]> wrote: > I'm surprised noone has pursued a course of subtraction rather than > division. Say you want 10 numbers: > > >>> s = 1.0 > >>> n = [] > >>> for x in xrange(9): > ... value = random.random() * s > ... n.append(value) > ... s -= value > ... > >>> n.append

Re: Problem calling math.cos()

2006-04-23 Thread Alex Martelli
Thomas Bellman <[EMAIL PROTECTED]> wrote: > Alex Martelli <[EMAIL PROTECTED]> wrote: > > > C has no stand on complex numbers. > > If by that you mean that C does not have complex numbers, then > you are wrong. C99 defines the three types float _Complex, > double _Complex, and long double _Compl

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread fumanchu
I'm surprised noone has pursued a course of subtraction rather than division. Say you want 10 numbers: >>> s = 1.0 >>> n = [] >>> for x in xrange(9): ... value = random.random() * s ... n.append(value) ... s -= value ... >>> n.append(s) >>> n [0.727922901516, 0.082128708606867745,

Re: PYTHONPATH

2006-04-23 Thread Brian van den Broek
bruno at modulix said unto the world upon 20/04/06 08:38 AM: >>Can anyone help me to make my path persistant? > > > Just like any other environnement variable on your system. With most > distros, it will be something like adding the line: > > export PYTHONPATH="/a/possible/path;/another/one;/

Re: bug in modulus?

2006-04-23 Thread [EMAIL PROTECTED]
Hmmm. I understand. I'd suggest that someone just drop a link from the Library reference manual as the divmod entry over there seems to contradict it. """ divmod(a, b) Take two (non complex) numbers as arguments and return a pair of numbers consisting of their quotient and remainder when using lo

Re: Problem calling math.cos()

2006-04-23 Thread Thomas Bellman
Alex Martelli <[EMAIL PROTECTED]> wrote: > C has no stand on complex numbers. If by that you mean that C does not have complex numbers, then you are wrong. C99 defines the three types float _Complex, double _Complex, and long double _Complex, and also the header . -- Thomas Bellman, Lysator

Re: Custom data type in a matrix.

2006-04-23 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: > Gaz schrieb: >> And how im supposed to assign data to a specific hex? > > How would you have done it using numarray? Accessing a specific field is > done using slicing: The term slicing is of course wrong here - it's called array index access. Diez -- http://mail.py

Re: Custom data type in a matrix.

2006-04-23 Thread Diez B. Roggisch
Gaz schrieb: > And how im supposed to assign data to a specific hex? How would you have done it using numarray? Accessing a specific field is done using slicing: fields[x][y].property = value Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom data type in a matrix.

2006-04-23 Thread Gaz
And how im supposed to assign data to a specific hex? -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing XML/XSLT

2006-04-23 Thread Paul Boddie
veracon wrote: > > I'm looking to use XML and XSLT for templates in a system I'm writing, > however I'm not really sure which parser is the "best". Basically, > which library has the most features, and which is the most supported? I use (my own) libxml2dom [1] and XSLTools [2] to respectively pars

Re: bug in modulus?

2006-04-23 Thread Tim Peters
[EMAIL PROTECTED] > I think there might be something wrong with the implementation of > modulus. > > Negative float values close to 0.0 break the identity "0 <= abs(a % b) < > abs(b)". While that's a mathematical identity, floating point has finite precision. Many mathematical identities can fai

Re: how to write special value to a config file with ConfigParser

2006-04-23 Thread pavel . starek
Hi, I have tried this: import ConfigParser fp = file("test.conf","w+") cp = ConfigParser.ConfigParser() cp.add_section("Section1") cp.set("Section1","Value1",12345) cp.write(fp) and works fine for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: check whether a value is scalar

2006-04-23 Thread Fredrik Lundh
"Eli" <[EMAIL PROTECTED]> wrote: > The issue is I want to keep a set of values to share among several > applications in different languages, and only scalar values can be > shared. Since objects are not the same in all languages, it's possible > to share only simple values. I can assure you that

Re: how to write special value to a config file with ConfigParser

2006-04-23 Thread Lialie
Lialie write: OK.I find out myself. Excuse me. Just open ini file in write mode. --- Begin Message --- Lialie write: OK.I find out myself. Excuse me. Just open ini file in write mode. --- End Message --- -- http://mail.python.org/mailman/listinfo/python-list

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread Alex Martelli
David Rushby <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > So -- does anybody know if the 2003-level Toolkit is STILL available for > > download somewhere... > > >http://www.microsoft.com/downloads/details.aspx?FamilyId=272BE09D-40BB- >49FD-9CB0-4BFA122FA91B&displaylang=en > Great, thank

Re: MS VC++ Toolkit 2003, where?

2006-04-23 Thread David Rushby
Alex Martelli wrote: > So -- does anybody know if the 2003-level Toolkit is STILL available for > download somewhere... http://www.microsoft.com/downloads/details.aspx?FamilyId=272BE09D-40BB-49FD-9CB0-4BFA122FA91B&displaylang=en -- http://mail.python.org/mailman/listinfo/python-list

how to write special value to a config file with ConfigParser

2006-04-23 Thread Lialie
Hello,all I found it easy to read configures from a config file. But how can I set a special value to an item or write it into the original file? I have tried this: import ConfigParser config = ConfigParser.ConfigParser() config.read('a.conf') config.get('Main', 'Something') # That is OK. conf

MS VC++ Toolkit 2003, where?

2006-04-23 Thread Alex Martelli
So, I thought I'd tool up to let me build and test Python extensions on Windows (as well as Mac and Linux) -- I'm trying out Parallels Workstation beta on my new Macbook Pro (and so far it seems to work very well), I bought and installed a Win2000 Pro on it (since according to the grapevine it work

How I learned Tkinter

2006-04-23 Thread peter
I've been trying to teach myself Tkinter programming over the last few months (in a strictly amateur way), and have made a number of requests for help in this newsgroup and elsewhere. I've now (sort of) got there - in that I have used Tkinter for some programs for personal use - and I've written u

Parsing XML/XSLT

2006-04-23 Thread veracon
Hello, I'm looking to use XML and XSLT for templates in a system I'm writing, however I'm not really sure which parser is the "best". Basically, which library has the most features, and which is the most supported? A guide I saw mentioned importing xml.xslt, however it appears the xml module/pack

bug in modulus?

2006-04-23 Thread [EMAIL PROTECTED]
I think there might be something wrong with the implementation of modulus. Negative float values close to 0.0 break the identity "0 <= abs(a % b) < abs(b)". print 0.0 % 2.0 # => 0.0 print -1e-010 % 2.0 # =>1.99 which is correct, but: print -1e-050 % 2.0 # => 2.0 print -1

Re: test assignmet problem

2006-04-23 Thread Paul McGuire
"Paolo Pantaleo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] So I tried this if(not (attr=global_re.match(line)) ): break it says invalid syntax [on the =] ... because this syntax is not valid ... so it is not possible to do test and assignment in C style?

Re: test assignmet problem

2006-04-23 Thread Duncan Booth
Paolo Pantaleo wrote: > So I tried this > > if(not (attr=global_re.match(line)) ): > break > > it says invalid syntax [on the =] > so it is not possible to do test and assignment in C style? > how can I write this otherwise? > With fewer parentheses for a start, but all you

Re: Generate a sequence of random numbers that sum up to 1?

2006-04-23 Thread Gerard Flanagan
Nick Craig-Wood wrote: > Gerard Flanagan <[EMAIL PROTECTED]> wrote: > > def distribution(N=2): > > p = [0] + sorted( random.random() for _ in range(N-1) ) + [1] > > for j in range(N): > > yield p[j+1] - p[j] > > > > spread = list(distribution(10)) > > > > print spread > > pri

test assignmet problem

2006-04-23 Thread Paolo Pantaleo
So I tried this if(not (attr=global_re.match(line)) ): break it says invalid syntax [on the =] so it is not possible to do test and assignment in C style? how can I write this otherwise? Thnx PAolo -- if you have a minute to spend please visit my photogrphy site: http://mypi

Re: Can you create an instance of a subclass with an existing instance of the base class?

2006-04-23 Thread Sandra-24
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > "Sandra-24" <[EMAIL PROTECTED]> wrote: > > >Now that is a clever little trick. I never would have guessed you can > >assign to __class__, Python always surprises me in it's sheer > >flexibility. > > That's because you're still thinking

Re: Calling Python from Matlab

2006-04-23 Thread Alexander Schmolck
"Daniel Nogradi" <[EMAIL PROTECTED]> writes: > > I am desperately looking for a way to call Python from Matlab. I have become > > used to Python's rich syntax and large number of libraries, and feel > > ridiculously clumsy being stuck with Matlab's rather restricted facilities > > for doing other

Re: debugging in emacs

2006-04-23 Thread Gary Wessle
Gary Wessle <[EMAIL PROTECTED]> writes: > Hi python users > > I am using emacs and python-mode.el under dabian testing. > is there a way to debug python code where I can step over each line > and watch the value of all the variables and be able to change > any during debugging. say you have a loo

[ANN] crcmod-1.3 CRC Generator

2006-04-23 Thread Raymond L. Buvel
Crcmod is a Python package for creating functions computing the Cyclic Redundancy Check (CRC). Any generating polynomial producing 8, 16, 32, or 64 bit CRCs is allowed. Generated functions can be used in Python or C/C++ source code can be generated. Home page: http://crcmod.sourceforge.net/ Chang

Re: Looking for resources for making the jump from Java to Python easier and more productive

2006-04-23 Thread ToddLMorgan
I've actually managed to find some other links by backtracking through some of the links that you provided. The most comprehensive so far is this one http://www.razorvine.net/python/PythonForJavaProgrammers and a summary version (on the same site) http://www.razorvine.net/python/PythonComparedToJa

Re: list example

2006-04-23 Thread Paolo Pantaleo
2006/4/22, Edward Elliott <[EMAIL PROTECTED]>: > No substantive problems. The str() calls are unnecessary, print calls > list.__str__ already. You can replace the loop with list comprehensions or > slices. Same result, a bit more succinct. See these pages for more: > > http://docs.python.org/li

debugging in emacs

2006-04-23 Thread Gary Wessle
Hi python users I am using emacs and python-mode.el under dabian testing. is there a way to debug python code where I can step over each line and watch the value of all the variables and be able to change any during debugging. say you have a loop structure and want to see what the values of your v

Re: Define type of 'module' object that is imported

2006-04-23 Thread robert
Zachary Pincus wrote: > > No, just one particular module that needs to do some slow things. > I'd like for a user to just be able to type > "import foo" > and have the foo module's type be some special type. None of the > options below really allow this to happen with one step. It would be > m

Re: Recommended IDE for creating GUI?

2006-04-23 Thread SPE - Stani's Python Editor
SPE also integrates with XRCed which is very stable. Google for more info. Stani -- http://mail.python.org/mailman/listinfo/python-list

Re: python's thread problem on Linux platform

2006-04-23 Thread robert
[EMAIL PROTECTED] wrote: > I found that multi-threaded program(io-centralize ) runs very slowly > on linux while the same program runs very quickly on windows.If I > change the thread number to one ,the program runs quickly on linux, in > fact the speed is quicker than the multi-threaded ver

Re: Finding Module Dependancies

2006-04-23 Thread robert
Larry Bates wrote: > > Remember that Python is so dynamic that you can build dependencies > during program execution and import them on-the-fly. So a dependency > checker would always be incomplete. You always need to write unit > tests. The Pychecker will usually see also missing on-the-fly im

Re: Inexplicable behaviour of

2006-04-23 Thread Leif K-Brooks
Fabiano Sidler wrote: > Have a look to the following lines of code: > --- snip --- > class Foo: pass > def bar(): pass > Foo.bar = bar > --- snap --- > > Why does 'bar.__get__(Foo) is Foo.bar' evaluate to False here? Did I > misunderstand the descriptor protocol? bar.__get__(None, Bar) is what yo

Inexplicable behaviour of

2006-04-23 Thread Fabiano Sidler
Have a look to the following lines of code: --- snip --- class Foo: pass def bar(): pass Foo.bar = bar --- snap --- Why does 'bar.__get__(Foo) is Foo.bar' evaluate to False here? Did I misunderstand the descriptor protocol? Thank you for answering, F. Sidler -- http://mail.python.org/mailman/lis

Re: Custom data type in a matrix.

2006-04-23 Thread Diez B. Roggisch
Gaz schrieb: > Hi guys. I've been lookig for this in the numpy pdf manual, in this > group and on google, but i could not get an answer... > > Is there a way to create a custom data type (eg: Name: string(30), Age: > int(2), married: boolean, etc) and then use that custom data in a > matrix? Actua

Re: Recommended IDE for creating GUI?

2006-04-23 Thread bwaha
"Marty Christion" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What are some good free or inexpensive (<$50) IDE's for learning how to > program and create GUI's for Python? I'm pretty good with the simple > programming aspect of the language, but I'm a little mystified by the wo

Re: How can I call a python method from the XML-RPC client in Java?

2006-04-23 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > Hi all, I have created a XML-RPC model (with server and client) > written in Java. I want to call the methods in another XML-RPC model > written in Python. I know that in Java, I can use like > "xmlrpc_client.excute("handler_name.method", param)" to call the > methods i

Re: Can one query full name (or version) of selected packages at pypi?

2006-04-23 Thread Martin v. Löwis
Caleb Hattingh wrote: > So: I would like to query the package index with a short name (perhaps > wildcarded), and retrieve either the full name (from which to strip the > ver.) or version number, and compare it with what I have on disk. At > this stage, just reporting the differences is fine. > >