Re: Sound and music libraries?

2005-02-28 Thread Alia Khouri
http://www.python.org/moin/PythonInMusic AK -- http://mail.python.org/mailman/listinfo/python-list

Re: Decimal, __radd__, and custom numeric types...

2005-02-28 Thread Kanenas
On 28 Feb 2005 12:11:33 -0800, "Blake T. Garretson" <[EMAIL PROTECTED]> wrote: [...] >From the Python docs (specifically sections 3.3.7 and 3.3.8), I thought >that the left object should try its own __add__, and if it doesn't know >what to do, THEN try the right object's __radd__ method. To me

Re: closing tabs in wxpython

2005-02-28 Thread Raghul
I think this need some more explanation.Pls help me to understand this by giving an example. Thanks in advance -- http://mail.python.org/mailman/listinfo/python-list

Re: User Security (Roles & Permissions)

2005-02-28 Thread Andreas Pauley
On Mon, 28 Feb 2005, Andreas Pauley wrote: Hi all, I'm starting with a Point of Sale system (QT gui, MySQL db) and I'm wondering if there are any user management/user security modules available that can be reused independently of the specific system that you write. I think something similar to

Importing from filesystem path a 'frozen sub-module' error

2005-02-28 Thread Calvin Spealman
I've been working on a small test runner script, to accumulate my test scripts (all python files in the 'test' sub-directories of my source tree). Things were going well, but I'm still having trouble loading the modules, once I have a path to the python source file. This is the error I am getting:

Re: Decimal, __radd__, and custom numeric types...

2005-02-28 Thread Nick Craig-Wood
Blake T. Garretson <[EMAIL PROTECTED]> wrote: > I'm having some issues with decimal.Decimal objects playing nice with > custom data types. I have my own matrix and rational classes which > implement __add__ and __radd__. They know what to do with Decimal > objects and react appropriately. >

Re: Explicit or general importing of namespaces?

2005-02-28 Thread Nick Craig-Wood
Paul Rubin wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: > > Ultimately more important than mere "pollution" are the > > latent problems this can cause if any of the names in > > the original module can ever be re-bound. > > You know, this is another reason the compiler really ought to (at

Re: Validating A User/Password Pair + Getting Groups On Unix

2005-02-28 Thread Kanenas
On 28 Feb 2005 20:17:58 EST, Tim Daneliuk <[EMAIL PROTECTED]> wrote: [...] >Given a username and a password (plain text): > > 1) Validate that the password is correct for that user *without actually > logging in*. > The naive solution is to use the 'crypt' module to encrypt the alleged password

Re: zlib.decompress cannot, gunzip can

2005-02-28 Thread Dima Dorfman
On 2005-03-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a string which I try to decompress: > > body = zlib.decompress(body) > > but I get > > zlib.error: Error -3 while decompressing data: incorrect header check > > However, I can write the string to a file and run gunzip with the

Re: Met Problem with Distutils

2005-02-28 Thread Robert Kern
[EMAIL PROTECTED] wrote: if i want a main executable py script installed on the /usr/local/bin, what do i do? i tried the data_files options in the setup.py, but nothing happened, no the expected file appeared in the resulted tarbar. Generally speaking, you, the author, shouldn't dictate to the us

Met Problem with Distutils

2005-02-28 Thread steven
if i want a main executable py script installed on the /usr/local/bin, what do i do? i tried the data_files options in the setup.py, but nothing happened, no the expected file appeared in the resulted tarbar. below is the setup.py: setup(name='foopkg', version='1.0', author="Steven

Google Technology

2005-02-28 Thread vijay123
I am just wondering which technologies google is using for gmail and Google Groups??? -- http://mail.python.org/mailman/listinfo/python-list

[OT] Re: String Replace Problem...

2005-02-28 Thread Steven Bethard
Sean McIlroy wrote: Alright, now it's too much. It's not enough that you're eliminating it from the language, you have to stigmatize the lambda as well. You misunderstand me. I don't have a problem with lambda when it's appropriate, e.g. when used as an expression, where a statement is forbidden

Re: Validating A User/Password Pair + Getting Groups On Unix

2005-02-28 Thread Kanenas
On 28 Feb 2005 20:17:58 EST, Tim Daneliuk <[EMAIL PROTECTED]> wrote: [...] >Given a username and a password (plain text): > > 1) Validate that the password is correct for that user *without actually > logging in*. > The 'pwd' module probably won't be able (and won't try) to read the shadow pass

enter key event in wxpython

2005-02-28 Thread Raghul
hi, I am developing a jabber client.What I need is whrn i enter text in the text area and when I press return key. The following text should be send.I found the way to send the message, the only thing is I want to handle the enter key event.how to do this? so that when i press enter key, The key

Re: ZoDB's capabilities

2005-02-28 Thread Joe
On Mon, 28 Feb 2005 23:31:27 +0100, Almad <[EMAIL PROTECTED]> wrote: >I'm going to write a custom CMS. I'd like to use some odbms, as code is then >much more cleaner... You should go ask for pratical infos on ZODB here: http://www.zope.org/Products/StandaloneZODB Joe. -- http://mail.python.org/

Weekly Python Patch/Bug Summary

2005-02-28 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 303 open ( -5) / 2764 closed ( +9) / 3067 total ( +4) Bugs: 849 open (+11) / 4837 closed ( +3) / 5686 total (+14) RFE : 169 open ( +1) / 148 closed ( +0) / 317 total ( +1) New / Reopened Patches __ New fpcon

Re: python-dev Summary for 2005-01-16 through 2005-01-31

2005-02-28 Thread Michele Simionato
Brett Cannon: >Lastly, the typical boilerplate for each Summary has now been moved to the >bottom. This was at the request of a regular reader who I would like to keep >happy. =) It also seems reasonable since once you have read through it once >chances are you are not going to read it again so

java crashes in python thread

2005-02-28 Thread Easeway
I use os.system invoking java VM, when running in python thread, the java application crashes. But it works properly when thread is not used. Has any body come across with this problem? Python 2.3.3 J2SDK 1.4.2_05 SuSE Linux Enterprise Server 9 The following is source file: #!/usr/bin/env pyth

Re: String Replace Problem...

2005-02-28 Thread Sean McIlroy
Alright, now it's too much. It's not enough that you're eliminating it from the language, you have to stigmatize the lambda as well. You should take some time to reflect that not everybody thinks the same way. Those of us who are mathematically inclined like the lambda because it fits in well with

Re: best XSLT processor?

2005-02-28 Thread uche . ogbuji
Actually, most of the compliant problems I can remember off-head with respect to Xalan have been regarding EXSLT 1.0, not base XSLT 1.0. Sorry for any misconstruction. --Uche -- http://mail.python.org/mailman/listinfo/python-list

Re: accessor/mutator functions

2005-02-28 Thread Dan Sommers
On Tue, 01 Mar 2005 02:27:03 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote: > Me: >>> What's wrong with the use of attributes in this case and how >>> would you write your interface? > Dan Sommers: >> I think I'd add a change_temperature_to method that accepts the target >> temperature and some sor

[ANN] pyasm 0.1 - x86 assembler for Python

2005-02-28 Thread Grant Olson
pyasm 0.1 - x86 assembler for Python This release is for early adopters only. It is not properly packaged and doesn't have very good documentation. It is however a functional assembler that should be of interest to some people. Current output targets include Windows-style COFF files that can be

python-dev Summary for 2005-01-16 through 2005-01-31

2005-02-28 Thread Brett C
= Summary Announcements = - School sure likes to destroy my free time - A month late, that much closer to having this hectic quarter being over. Sorry for being so delinquent wi

Re: best XSLT processor?

2005-02-28 Thread uche . ogbuji
This is a good way to kick off a tussle among interested parties, but hinestly, at this point, most packages work fine. In my opinion your rade-off right now is raw speed (e.g. libxslt) versus flexibility (e.g. 4Suite). All are bug-free enough that you'd have to be doing somethign *very* exotic t

Re: best XSLT processor?

2005-02-28 Thread uche . ogbuji
Xalan is certainly faster, but it is almost certainly not more compliant than 4Suite. Xalan actually has a bit of a reputation among XSLT processors in its carelessness with compliance. But I suppoose in order to settle these counter-claims, one of us will have to come up with specific compliance

Re: best XSLT processor?

2005-02-28 Thread uche . ogbuji
Who says 4Suite is buggy? Do they have any evidence to back that up? We have a huge test suite, and though 4Suite is by no means the fastest option, it's quite reliable for XSLT. The XSLT processor in PyXML is just a very old version of 4XSLT. --Uche -- http://mail.python.org/mailman/listinfo/

Re: accessor/mutator functions

2005-02-28 Thread Andrew Dalke
Me: >> What's wrong with the use of attributes in this case and how >> would you write your interface? Dan Sommers: > I think I'd add a change_temperature_to method that accepts the target > temperature and some sort of timing information, depending on how the > rest of the program and/or thread i

Re: Scoping issue with import

2005-02-28 Thread Calvin Spealman
Each module is only 'aware' of the built-ins and the modules it itself imports. So, all you need to do is add this line to my_imported_mod: from my_main_mod import myfun This is a fully intentional feature. Modules stand on their own. James Stroud wrote: > Say I have a module, we'll call it "my

Sound and music libraries?

2005-02-28 Thread Ben Sizer
Are there any decent sound and music libraries for Python that are suitable for game use? Pygame is too closely tied to SDL, PyFMOD seems to no longer be maintained, and ALPY 1.0 has disappeared and is GPL anyway (not suitable for my purposes). I'd settle for DirectSound bindings but DirectX use in

Re: Canonical way of dealing with null-separated lines?

2005-02-28 Thread John Machin
Douglas Alan wrote: > I wrote: > > > Oops, I just realized that my previously definitive version did not > > handle multi-character newlines. So here is a new definitive > > version. Oog, now my brain hurts: > > I dunno what I was thinking. That version sucked! Here's a version > that's actual

Re: accessor/mutator functions

2005-02-28 Thread Dan Sommers
On Tue, 01 Mar 2005 01:39:13 +0100, Thomas Lotze <[EMAIL PROTECTED]> wrote: > Dan Sommers wrote: >> I think I'd add a change_temperature_to method that accepts the >> target temperature and some sort of timing information, depending on >> how the rest of the program and/or thread is structured.

Re: yield_all needed in Python

2005-02-28 Thread Terry Reedy
"Douglas Alan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > We can shorten the code--and make it run in O(N) time--by adding a > new > keyword to replace the "for v in ...: yield v" pattern: Maybe. Until you define the semantics of yield_all and at least outline an im

Validating A User/Password Pair + Getting Groups On Unix

2005-02-28 Thread Tim Daneliuk
OK, I've Googled for this and cannot seem to quite find what I need. So, I turn to the Gentle Geniuses here for help. Here is what I need to do from within a script: Given a username and a password (plain text): 1) Validate that the password is correct for that user *without actually logging in

Re: Canonical way of dealing with null-separated lines?

2005-02-28 Thread Douglas Alan
I wrote: > Oops, I just realized that my previously definitive version did not > handle multi-character newlines. So here is a new definitive > version. Oog, now my brain hurts: I dunno what I was thinking. That version sucked! Here's a version that's actually comprehensible, a fraction of th

Re: TKinter

2005-02-28 Thread anthonyberet
Steve Holden wrote: anthonyberet wrote: So, is it pronounced 'Tee-Kinter', or 'Tee-Kay-Inter'? I don't want to appear as a dork down the pub. If anyone down your pub knows enough about Python to understand what TKinter is I very much doubt they'll be rude enough to call you a dork for displaying

Re: Share your SciTEGlobal.properties pls~~~~

2005-02-28 Thread Neil Hodgson
DENG: > im new to Python, i chose SciTE as my Python editor. but the problem is > SciTE needs to be config carefully, are there anyone use SciTE too? can > you share your SciTEGlobal.properties file? black background solution > is prefered:) http://scintilla.sourceforge.net/SciTEFAQ.html#BlackBac

Re: Pythonwin: Red squiggley underline and syntax error

2005-02-28 Thread Neil Hodgson
Steven Bethard: > You've probably mixed tabs with spaces in your indentation somewhere. > Either replace all tabs with spaces or replace all spaces with tabs. You can see what characters are being used with the View | Whitespace command which shows tabs as arrows and spaces as centred dots.

zlib.decompress cannot, gunzip can

2005-02-28 Thread enrio
I have a string which I try to decompress: body = zlib.decompress(body) but I get zlib.error: Error -3 while decompressing data: incorrect header check However, I can write the string to a file and run gunzip with the expected results: f = open('/tmp/bd.gz', 'w') f.write(body) f.clos

Re: Hey, How Do I Distribute my New Completed Python Project?

2005-02-28 Thread steven
Thank You All -- http://mail.python.org/mailman/listinfo/python-list

Re: ZoDB's capabilities

2005-02-28 Thread Larry Bates
There is a VERY large website that uses Zope/ZODB that takes up to 9000 hits per second when it gets busy. ZODB is very fast and holds up well under load. You should probably look at Plone. It is CMS already built on top of Zope. Might safe you a LOT of work. Larry Bates Almad wrote: > Hello

Re: Problem When Unit Testing with PMock

2005-02-28 Thread steven
Peter, I'm so sorry, the letter was originally wrote to Terry, not to you! I guess Terry not very familar to unit testing because he said: -- cut -- I am not familiar with pmock, but my impression is that mock objects are for objects that you may not have available, such as a connection to a data

Re: accessor/mutator functions

2005-02-28 Thread Thomas Lotze
Dan Sommers wrote: > I think I'd add a change_temperature_to method that accepts the target > temperature and some sort of timing information, depending on how the rest > of the program and/or thread is structured. But then you put application logic into a library function. Doing this consistentl

Re: Scoping issue with import

2005-02-28 Thread Carl Banks
James Stroud wrote: > Say I have a module, we'll call it "my_imported_mod". It contains a function > in it that calls another function, "myfun". The "myfun" function is in the > module "my_main_mod", that imports "my_imported_mod". [snip] > How to rectify this with minimal code change? How to le

Re: yield_all needed in Python

2005-02-28 Thread Andrew Dalke
On Mon, 28 Feb 2005 18:25:51 -0500, Douglas Alan wrote: > While writing a generator, I was just thinking how Python needs a > "yield_all" statement. With the help of Google, I found a pre-existing > discussion on this from a while back in the Lightweight Languages > mailing list. I'll repost it h

Re: Why do descriptors (and thus properties) only work on attributes.

2005-02-28 Thread Steven Bethard
Antoon Pardon wrote: Can anyone explain why descriptors only work when they are an attribute to an object or class. I think a lot of interesting things one can do with descriptors would be just as interesting if the object stood on itself instead of being an attribute to an other object. Not sure

Scoping issue with import

2005-02-28 Thread James Stroud
Say I have a module, we'll call it "my_imported_mod". It contains a function in it that calls another function, "myfun". The "myfun" function is in the module "my_main_mod", that imports "my_imported_mod". The code of "my_main_mod" might look like this: == from my_imported_mod import

Re: accessor/mutator functions

2005-02-28 Thread Dan Sommers
On Mon, 28 Feb 2005 23:08:04 GMT, Andrew Dalke <[EMAIL PROTECTED]> wrote: > On Mon, 28 Feb 2005 15:50:22 -0500, Dan Sommers wrote: >> The reason their code is so inflexible is that they've filled their >> classes with boiler plate get/set methods. >> >> Why do users of classes need such access an

yield_all needed in Python

2005-02-28 Thread Douglas Alan
While writing a generator, I was just thinking how Python needs a "yield_all" statement. With the help of Google, I found a pre-existing discussion on this from a while back in the Lightweight Languages mailing list. I'll repost it here in order to improve the chances of this enhancement actually

Re: accessor/mutator functions

2005-02-28 Thread Andrew Dalke
On Mon, 28 Feb 2005 15:50:22 -0500, Dan Sommers wrote: > The reason their code is so inflexible is that they've filled their > classes with boiler plate get/set methods. > > Why do users of classes need such access anyway? If my class performs > useful functions and returns useful results, no use

Re: ZoDB's capabilities

2005-02-28 Thread Calvin Spealman
I don't think you have anything to worry about. Consider that this is exactly what ZODB was designed for. It is, after all, the database back-end for Zope itself, which is just another (very good, some say) CMS. Almad wrote: > Hello, > > I'm going to write a custom CMS. I'd like to use some odbm

Re: My C module crashes

2005-02-28 Thread Dima Dorfman
On 2005-02-28, Egil Moeller <[EMAIL PROTECTED]> wrote: > I've written a C-module for Python, and it works as intended, but > obviously does something wrong with its memmory management (refference > counting), as it causes Python to segfault now and then (randomly, > whey :S) Have you tried compili

Re: How to define a window's position (Tkinter)

2005-02-28 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>, "Harlin Seritt" <[EMAIL PROTECTED]> wrote: >I am trying to use the geometry() method with the toplevel window >called root. I know that one can do the following: > >root.geometry('400x400+200+200') > >This will put the window in 200, 200 position with a size of 400

Re: accessor/mutator functions

2005-02-28 Thread Carl Banks
[EMAIL PROTECTED] wrote: > When I look at how classes are set up in other languages (e.g. C++), I > often observe the following patterns: > 1) for each data member, the class will have an accessor member > function (a Get function) > 2) for each data member, the class will have a mutator member fu

ZoDB's capabilities

2005-02-28 Thread Almad
Hello, I'm going to write a custom CMS. I'd like to use some odbms, as code is then much more cleaner...however, i'm a little bit scared about capabilities of ZoDB, when compared with f. e. Firebird. How much instances is Zodb able to handle? Under "handle" I mean "in real time", not "theoretica

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-28 Thread Jason Tishler
Dean, On Mon, Feb 28, 2005 at 10:34:20AM -0800, Dean N. Williams wrote: > I have a other Cygwin port question. It turns out that the auto-import > for XtStrings an widgetClass didn't get resolved. This a similar > auto-import resolving error that I got when trying to build Tcl/Tk. I > ended up usi

Re: Calling external text-files (newb)

2005-02-28 Thread Peter Hansen
Andreas Winkler wrote: I tried to have python call an external 'Word'-file, and the read the whole text into a single string with the following code: [CODE] source = raw_input('file path') File = open('source', 'r') S = input.read() print S [/CODE] Anything inside quotation marks is just a string o

Re: Calling external text-files (newb)

2005-02-28 Thread Michael Hartl
There are two problems: (1) by quoting 'source', you refer to a string literal, not the variable you defined via raw_input; (2) you have not defined the variable 'input', so there's no way to call the 'read' method on it. Try this instead: source_path = raw_input('file path: ') s = open(source_pa

Re: Calling external text-files (newb)

2005-02-28 Thread Michael Hartl
There are two problems: (1) by quoting 'source', you refer to a string literal, not the variable you defined via raw_input; (2) you have not defined the variable 'input', so there's no way to call the 'read' method on it. Try this instead: source_path = raw_input('file path: ') s = open(source_pa

Re: Pythonwin: Red squiggley underline and syntax error

2005-02-28 Thread Colin J. Williams
Steven Bethard wrote: Brent W. Hughes wrote: I copied and pasted some text into my Python code and then Pythowin put a red squiggley underline under the two tabs at the beginning of the line. What does that mean? I've tried various things including deleting the white space in front of the line

Calling external text-files (newb)

2005-02-28 Thread Andreas Winkler
Hi I tried to have python call an external 'Word'-file, and the read the whole text into a single string with the following code: [CODE] source = raw_input('file path') File = open('source', 'r') S = input.read() print S [/CODE] But when I try to run it, it raises the following error: File = op

Re: Newbie question

2005-02-28 Thread Alan Gauld
On Mon, 28 Feb 2005 16:17:03 +0200, "Ryan White" <[EMAIL PROTECTED]> wrote: > How do I display an image in Python? - I've run over Tkinter, but obviously > in all the wrong places. Someone else suggested PIL. But in Tkinter you create a PhotoImage object then insert it into either a Canvas or a

Re: string methods (warning, newbie)

2005-02-28 Thread TZOTZIOY
On Sun, 27 Feb 2005 18:12:17 -0700, rumours say that Steven Bethard <[EMAIL PROTECTED]> might have written: [snip Nick Coghlan's list comprehension] [STeVe] >On the other hand, filter doesn't do the same thing: > >py> s = u'The Beatles - help - 03 - Ticket to ride' >py> filter(str.isalpha, s) >Tr

Re: string methods (warning, newbie)

2005-02-28 Thread TZOTZIOY
On Sun, 27 Feb 2005 18:12:17 -0700, rumours say that Steven Bethard <[EMAIL PROTECTED]> might have written: [snip Nick Coghlan's list comprehension] [STeVe] >On the other hand, filter doesn't do the same thing: > >py> s = u'The Beatles - help - 03 - Ticket to ride' >py> filter(str.isalpha, s) >Tr

Re: Why do descriptors (and thus properties) only work on attributes.

2005-02-28 Thread Dima Dorfman
On 2005-02-28, Antoon Pardon <[EMAIL PROTECTED]> wrote: > Op 2005-02-28, Diez B. Roggisch schreef <[EMAIL PROTECTED]>: >> I still don't see how that is supposed to work for "a lot of interesting >> things". Can you provide examples for one of these interesting things? > > Lazy evaluation where the

Re: cannot open file in write mode, no such file or directory

2005-02-28 Thread John Machin
[EMAIL PROTECTED] wrote: > Kartic wrote: > > > I'm having a problem where when trying to open a file in write > mode, > > I > > > get an IOError stating no such file or directory. I'm calling an > > > external program which takes an input file and produces an output > > file > > > repeatedly, sim

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Jack Diederich
On Mon, Feb 28, 2005 at 09:41:37PM +0100, Just wrote: > In article <[EMAIL PROTECTED]>, > Jack Diederich <[EMAIL PROTECTED]> wrote: > > > On Mon, Feb 28, 2005 at 04:02:37PM -0500, Benji York wrote: > > > Jack Diederich wrote: > > > >Ditto for me, plural implies list and singular implies instance,

Re: String Replace Problem...

2005-02-28 Thread Steven Bethard
Sean McIlroy wrote: f = lambda x: (x[0]=='@' and x[6:] + '.0') or (x=='/' and x + '\n') or x See "Inappropriate use of Lambda" in http://www.python.org/moin/DubiousPython. You're creating a named function, so there's no reason to use the anonymous function syntax. Try: def f(x): return (x[

Re: accessor/mutator functions

2005-02-28 Thread Dan Sommers
On 28 Feb 2005 10:30:03 GMT, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Actually I would say just access the attribute directly for both get > and set, until it needs to do something special in which case use > property(). > The reason why people fill their code up with boiler plate get/set > m

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Just
In article <[EMAIL PROTECTED]>, Jack Diederich <[EMAIL PROTECTED]> wrote: > On Mon, Feb 28, 2005 at 04:02:37PM -0500, Benji York wrote: > > Jack Diederich wrote: > > >Ditto for me, plural implies list and singular implies instance, > > >for (contact) in contacts: > > > # do something with cont

Re: Working with dbase files

2005-02-28 Thread Larry Bates
On MS Windows use built in ODBC support to xBase files which supports read and write access. Larry Bates Stan Cook wrote: > Does anyone know how I can access and read data from a dbase (.dbf) file? > > Regards, > > Stan -- http://mail.python.org/mailman/listinfo/python-list

Re: cannot open file in write mode, no such file or directory

2005-02-28 Thread Kartic
Could you please post your entire program, if possible? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: My C module crashes

2005-02-28 Thread John Machin
Egil Moeller wrote: > Hi! > > I've written a C-module for Python, and it works as intended, but > obviously does something wrong with its memmory management (refference > counting), as it causes Python to segfault now and then (randomly, > whey :S) > > The module source code is available at > http

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Jack Diederich
On Mon, Feb 28, 2005 at 04:02:37PM -0500, Benji York wrote: > Jack Diederich wrote: > >Ditto for me, plural implies list and singular implies instance, > >for (contact) in contacts: > > # do something with contact > > May I ask why you place the parenthesis in the for statement? I like the tup

Decimal, __radd__, and custom numeric types...

2005-02-28 Thread Blake T. Garretson
I'm having some issues with decimal.Decimal objects playing nice with custom data types. I have my own matrix and rational classes which implement __add__ and __radd__. They know what to do with Decimal objects and react appropriately. The problem is that they only work with Decimals if the cust

Re: Controlling Pc From Server?

2005-02-28 Thread Larry Bates
What you are asking IS much more difficult that just "timing". The Internet is a disconnected stateless medium. I can open a browser to a site and just leave my browser open. Am I viewing that site or not? There's no way to know. I might have minimized the browser window and am back doing produ

canvassing for assistance

2005-02-28 Thread Sean McIlroy
Hi all! I've written a utility for making diagrams. It could also be a good environment for experimenting with a Tk canvas, so I'm including the code here (see below). The problem is that, when I save a canvas and include the resulting postscript file in a LaTeX document, I often find that the rig

Re: cannot open file in write mode, no such file or directory

2005-02-28 Thread haynesc
Kartic wrote: > > I'm having a problem where when trying to open a file in write mode, > I > > get an IOError stating no such file or directory. I'm calling an > > external program which takes an input file and produces an output > file > > repeatedly, simulating the input file separately for each

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Benji York
Jack Diederich wrote: Ditto for me, plural implies list and singular implies instance, for (contact) in contacts: # do something with contact May I ask why you place the parenthesis in the for statement? -- Benji -- http://mail.python.org/mailman/listinfo/python-list

Re: cannot open file in write mode, no such file or directory

2005-02-28 Thread Steve Holden
Kartic wrote: I'm having a problem where when trying to open a file in write mode, I get an IOError stating no such file or directory. I'm calling an external program which takes an input file and produces an output file repeatedly, simulating the input file separately for each replicate. The erro

Re: cannot open file in write mode, no such file or directory

2005-02-28 Thread Kartic
> I'm having a problem where when trying to open a file in write mode, I > get an IOError stating no such file or directory. I'm calling an > external program which takes an input file and produces an output file > repeatedly, simulating the input file separately for each replicate. > The error oc

Re: String Replace Problem...

2005-02-28 Thread Sean McIlroy
I can't claim to have studied your problem in detail, but I get reasonable results from the following: filename = 'Errors.txt' S = open(filename,'r').read().split() f = lambda x: (x[0]=='@' and x[6:] + '.0') or (x=='/' and x + '\n') or x open(filename,'w').write(' '.join(map(f,S))) HTH -

cannot open file in write mode, no such file or directory

2005-02-28 Thread haynesc
Hi, I'm having a problem where when trying to open a file in write mode, I get an IOError stating no such file or directory. I'm calling an external program which takes an input file and produces an output file repeatedly, simulating the input file separately for each replicate. The error occurs

Re: Pythonwin: Red squiggley underline and syntax error

2005-02-28 Thread Steven Bethard
Brent W. Hughes wrote: I copied and pasted some text into my Python code and then Pythowin put a red squiggley underline under the two tabs at the beginning of the line. What does that mean? I've tried various things including deleting the white space in front of the line and reinserting the ta

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Jack Diederich
On Mon, Feb 28, 2005 at 11:32:22AM -0700, Steven Bethard wrote: > [EMAIL PROTECTED] wrote: > >Since Python does not have declarations, I wonder if people think it is > >good to name function arguments according to the type of data structure > >expected, with names like "xlist" or "xdict". > > In g

Re: Explicit or general importing of namespaces?

2005-02-28 Thread Paul Rubin
Peter Hansen <[EMAIL PROTECTED]> writes: > Ultimately more important than mere "pollution" are the > latent problems this can cause if any of the names in > the original module can ever be re-bound. You know, this is another reason the compiler really ought to (at least optionally) check for such

Re: Newbie question

2005-02-28 Thread Terry Reedy
For future reference, an informative subject line like > How do I display an image in Python? is more likely to grab the attention of someone with the information sought. tjr -- http://mail.python.org/mailman/listinfo/python-list

Pythonwin: Red squiggley underline and syntax error

2005-02-28 Thread Brent W. Hughes
I copied and pasted some text into my Python code and then Pythowin put a red squiggley underline under the two tabs at the beginning of the line. What does that mean? I've tried various things including deleting the white space in front of the line and reinserting the tabs. I've also tried r

module/import question

2005-02-28 Thread subopt
I'm trying to import Logilab's constraint module like this: from logilab.constraint import * from within a Python interactive session. The module is not installed correctly on our system, and it won't be, so i adjusted my PYTHONPATH, added an empty __init__.py file, then started up an interac

Re: best XSLT processor?

2005-02-28 Thread Paul Boddie
fanbanlo <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Which XSLT processor is the most reliable? > > requirement: > + must support Python 2.4 > + must run w/ Windows (and Linux) > + not super slow I've had success with libxslt [1] (and libxml2 [2]) on Linux with Python 2.3.x

Re: Python - what is the fastest database ?

2005-02-28 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> How is it possible that google (super big database) is super fast? > What type database do they use / software ? On the hardware side, Google's secret is massively parallel cluster computing, coupled with proprietary software for sp

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Steven Bethard
[EMAIL PROTECTED] wrote: Since Python does not have declarations, I wonder if people think it is good to name function arguments according to the type of data structure expected, with names like "xlist" or "xdict". In general, I find that naming collections for their contents is much more useful t

Re: Building Python with Tcl/Tk on Cygwin_NT-5.1

2005-02-28 Thread Dean N. Williams
Hi Jason, I have a other Cygwin port question. It turns out that the auto-import for XtStrings an widgetClass didn't get resolved. This a similar auto-import resolving error that I got when trying to build Tcl/Tk. I ended up using the shared Tcl/Tk that came with Cygwin. But in this case I

Re: naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread Skip Montanaro
beliavsky> Since Python does not have declarations, I wonder if people beliavsky> think it is good to name function arguments according to the beliavsky> type of data structure expected, with names like "xlist" or beliavsky> "xdict". In general, no. I think variable names should

naming convention for scalars, lists, dictionaries ...

2005-02-28 Thread beliavsky
Since Python does not have declarations, I wonder if people think it is good to name function arguments according to the type of data structure expected, with names like "xlist" or "xdict". -- http://mail.python.org/mailman/listinfo/python-list

Re: bsddb for k, v in db.items(): do order the numbers ?

2005-02-28 Thread Steve Holden
Christopher De Vries wrote: On Mon, Feb 28, 2005 at 08:30:59AM -0800, [EMAIL PROTECTED] wrote: WHen I use the code below and printing all the results i get this: -- 0 1 10 11 2 3 4 5 6 7 8 9 -- But I want -- 0 1 2 3 4 5 6 7 8 9 10 11 -- If you want your key, value pairs in a certai

Newbie question: Uninstalling Python Package Manager packages

2005-02-28 Thread Jeffrey A. Zelt
I am new to python, but am very enthusiastic about the language and hope to start using it for serious work soon (after I am more comfortable with all the details). I have installed a package via the Python Package Manager program on Mac OS X 10.3 (http://www.python.org/packman/). My question

[ANN] PyAC 0.1.0

2005-02-28 Thread Premshree Pillai
PyAC 0.1.0 (http://sourceforge.net/projects/pyac/) * ignores non-image files * optional arg is_ppt for ordering presentation images (eg., Powerpoint files exported as images) * misc fixes Package here: http://sourceforge.net/project/showfiles.php?group_id=106998&package_id=115396&release_id=309

Re: Newbie question -- fiddling with pictures.

2005-02-28 Thread Scott David Daniels
Ryan White wrote: > Subject: Newbie question Not a very good subject -- many people will not even look at it unless you describe what your question is about. I'm wanting to use python to display some jpeg images, maybe present them at a percentage of their actual size etc. How do I display an image

Re: Minor, but annoying legend problem in matplotlib

2005-02-28 Thread John Hunter
> "Jorl" == Jorl Shefner <[EMAIL PROTECTED]> writes: Jorl>The obvious solution is to plot the lines and symbols in Jorl> two different commands: ___ You want to explicitly pass the lines you want to legend into the legend command, as in Symb=

  1   2   >