[ANN] Data Plotting Library DISLIN for Python 2.4/Windows

2004-12-02 Thread Helmut Michels
DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, surfaces, contours and maps. I have created a new DISLIN distribution that supports the final Python version 2.4 on Windows. The distribution is available from the DISLIN home page htt

"encoding specified in XML declaration is incorrect"

2004-12-02 Thread Gustaf Liljegren
I'm using xml.sax.parseString to read an XML file. The XML file contains a few words in Russian, and is encoded in UTF-8 using C#. In the example below, MyParser() is my SAX ContentHandler class. My first try was: f = open('words.xml', 'r') s = f.read() xml.sax.parseString(s, MyParser()) This pr

Re: Delphi underrated, IDE clues for Python

2004-12-02 Thread johng2001
Yes! Boa goes a long way. I have been using it for almost 2 1/2 years now. But it does not come close to the comfort of Delphi. But then of course, Delphi is not just a WYSIWYG GUI designer. VCL is very advanced compared to GUI toolkits available for Python. The community has over the years created

Re: Microsoft Patents 'IsNot'

2004-12-02 Thread johng2001
All the VB fans I know have not experienced Delphi. They just don't know what they are missing. I am sure there are people who actually chose VB, but not any one I know. When I marvelled at VB myself, it was back when I myself was unaware of Delphi/C++ Builder. I used to think C++ programming on Wi

Re: Python 2.4 and Tkinter

2004-12-02 Thread Eric Brunel
Jeffrey Barish wrote: [snip] Here's what I get when I import Tkinter at a python prompt: [EMAIL PROTECTED]:~$ python Python 2.4 (#1, Nov 30 2004, 08:58:13) [GCC 3.2.3 20030316 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import Tkinter Traceb

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread Robin Becker
Cameron Laird wrote: QOTW: "... why does Microsoft try so hard to protect its sources?" . 2.4 is final, buildable under Windows in at least a couple of ways, improved, ... http://www.brunningonline.net/simon/blog/archives/001657.html asyncore, Twisted, the Python core...-

Re: M2Crypto for 2.4

2004-12-02 Thread elbertlev
//I will do it in the next day or two. Me too! Remember, this is a programmer and a manager telling you his plan. :) But, if I do not, nobody in my department will :( -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Win32 Silent Install

2004-12-02 Thread David Fraser
Thomas Heller wrote: "Matt Gerrans" <[EMAIL PROTECTED]> writes: Looks like the installer for the Win32 extensions has changed from Wise to distutils, so now my automated silent installations don't work anymore. Anyone know if the distutils binary installer can be run silently?I haven't been

Re: pre-PEP generic objects

2004-12-02 Thread Nick Craig-Wood
Scott David Daniels <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > class Hash: > > def __init__(self, **kwargs): > > for key,value in kwargs.items(): > > setattr(self, key, value) > > def __getitem__(self, x): > > return getattr(self, x) > > def __s

installing wxPython on Linux and Windows

2004-12-02 Thread Peter Maas
Recently I replaced Win2k with Linux on my desktop computer. Using mostly multi-platform software I thought this would be easy. It was not as easy as expected getting wxPython to work. There seemed to be no SuSE RPM so I installed from source. Here are my steps (gtk 2.4 was already installed): - Bu

Try to install PythonCard-0.8.1 on Python2.4

2004-12-02 Thread Werner Merkl
Hi, I like to switch from Python 2.3.4 to 2.4. So I tried to reinstall all apps I need. Most works fine When I start PythonCard I get following error: --- Setup PythonCard-0.8.1: PythonCard-0.8.1.win32.exe - Application Error --- The instruc

Re: date diff calc

2004-12-02 Thread David Fraser
Peter Hansen wrote: Tim Peters wrote: [Peter Hansen] I think Skip was intending that the format string be mandatory, to avoid such ambiguity. It's still a bottomless pit -- ask Brett, who implemented the Python strptime . True, I did overlook timezones at the time. On the other hand, that's b

Re: A little threading problem

2004-12-02 Thread Alban Hertroys
Jeremy Jones wrote: Alban Hertroys wrote: Notify is called before thread B (in this case) hits the condAllowed.wait() piece of code. So, it sits at that wait() for forever (because it doesn't get notified, because the notification already happened), waiting to be notified from the main thread,

Re: subclassing extension type and assignment to __class__

2004-12-02 Thread Gregory Lielens
> Unless I'm misunderstanding, couldn't one of __getattr__ or > __getattribute__ make mapping other methods you don't override very > simple and practical, not to mention fully automated with 2-3 lines of > code? In particular, __getattr__ would seem good for your use since > it is only called fo

MySQLdb binaries for Python 2.4 on Windows?

2004-12-02 Thread Martin Bless
I'd be happy and thankful if somebody could provide the MySQLdb binaries for Windows and Python 2.4. Have a nice day - mb - Martin Bless -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000 and "Python Regrets"

2004-12-02 Thread Peter Maas
Dave Benjamin schrieb: LOL! Better yet: import __past__ del __past__.__mistakes__ Boy, what a load off! Merry Christmas in advance, from __future__ import NewYear A Happy New Year to everybody! ;) -- --- Peter Maas, M+R Infosysteme,

Re: non blocking read()

2004-12-02 Thread Pierre Barbier de Reuille
Steve Holden a écrit : Donn Cave wrote: In article <[EMAIL PROTECTED]>, Gustavo Córdova Avila <[EMAIL PROTECTED]> wrote: David Bolen wrote: Jp Calderone <[EMAIL PROTECTED]> writes: def nonBlockingReadAll(fileObj): bytes = [] while True: b = fileObj.read(1024)

pyOpenSSL and Python 2.4? or alternatives...

2004-12-02 Thread Ola Natvig
Anyone that knows anyone knows a win32 Py2.4 build of pyOpenSSL? Or perhaps has a outstanding alternative to this SSL package. It's imperative the package is as simmilar to the standard socket library of python. Anyone? -- -- Ola Natvig <[EMAIL PROTECTED]> i

PIL and antialiasing problem

2004-12-02 Thread Laszlo Zsolt Nagy
Hi all, I have a little problem with PIL. I need to display images in a browser (thumbnails) (this is the selector window). I also need the original version of the image to be displayed in a Java applet. One example: thumbnail: http://designasign.biz/applet/GIF_Small/AIRCRAFT/a10per.png origina

Re: pre-PEP generic objects

2004-12-02 Thread Peter Otten
Nick Craig-Wood wrote: > Scott David Daniels <[EMAIL PROTECTED]> wrote: >> Nick Craig-Wood wrote: >> > class Hash: >> > def __init__(self, **kwargs): >> > for key,value in kwargs.items(): >> > setattr(self, key, value) >> > def __getitem__(self, x): >> > return

Re: Semaphore or what should I use?

2004-12-02 Thread Pierre Barbier de Reuille
Ville Vainio a écrit : "Bastian" == Bastian Hammer <[EMAIL PROTECTED]> writes: Bastian> Now I have to make sure, that both threads are Bastian> synchronal, 1 thread edits something and the other is Bastian> blocked until the first thread is ready. Bastian> Isn´t it a good idea to d

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Diez B. Roggisch
> Same task on Win2k: download wxPython-setup.exe, double-click, done. > Took me approx. 1 minute. This strikes me. Why are some tasks so hard > on Linux and so easy on Windows? After all wxPython/Win and wxPython/Lin > are made by the same developers. My guess: the software deployment > infrastruc

Re: database questions ala newbie pythonist

2004-12-02 Thread Uwe Grauer
Weinhandl Herbert wrote: chris wrote: ... This works fine using the literals 0 (For Delstatus) and 1190 (for ProductID) But when I try to use a variable such as: ### ... varA = '0' varB = '1190' mycursor.execute('Update Categories Set

Re: database questions ala newbie pythonist

2004-12-02 Thread Dan Sommers
On Wed, 1 Dec 2004 20:45:13 -0500, "chris" <[EMAIL PROTECTED]> wrote: > But when I try to use a variable such as: > ### > ... > varA = '0' > varB = '1190' > mycursor.execute('Update Categories Set DelStatus = ' varA 'Where ProductID

Re: PIL and antialiasing problem

2004-12-02 Thread Will McGugan
Laszlo Zsolt Nagy wrote: I tried to posterize or darken the images but I could not find a good solution. (I also tried to count the number of colors in the image and use this info.) Can you suggest an image filter and/or method that creates darker black lines from the original thin lines? Also it w

Re: PIL and antialiasing problem

2004-12-02 Thread Belyh G.P.
Laszlo Zsolt Nagy wrote: Hi all, I have a little problem with PIL. I need to display images in a browser (thumbnails) (this is the selector window). I also need the original version of the image to be displayed in a Java applet. One example: thumbnail: http://designasign.biz/applet/GIF_Small/AIRCR

Re: Video Catalogue

2004-12-02 Thread Harlin Seritt
Tom B.: If you're not having trouble saving with dict then use that. You only need pickle if using lists or dicts are not doing the job when the data in them are integers or long. "Tom B." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Rodney Dangerfield" <[EMAIL PROTECTED]> wr

debian python2.4

2004-12-02 Thread km
Hi all, is there a debian binary of python2.4 ? tia, KM -- http://mail.python.org/mailman/listinfo/python-list

Re: A little threading problem

2004-12-02 Thread Alban Hertroys
Jeremy Jones wrote: (not waiting, because it already did happen). What is it exactly that you are trying to accomplish? I'm sure there is a better approach. I think I saw at least a bit of the light, reading up on readers and writers (A colleague showed up with a book called "Operating system

Re[2]: PIL and antialiasing problem

2004-12-02 Thread Laszlo Zsolt Nagy
> Try running ImageFilter.MinFilter on the image before you thumbnail it. > This should make dark lines thicker. > HTH, > Will McGugan You are my man! It worked perfectly! Statement: Sometimes PIL is better than Adobe Photoshop. :-) I also found these with the aid of the wonderful dir() function

"readline()" omitted '\r' in win32 for dos format text file

2004-12-02 Thread Newgene
Hi, group, I have python2.3 installed on win2k. I noticed that when I open a dos format text file (eol is '\r\n'), readline() always returns a line ending with '\n' only, not '\r\n'. While I read the same file on unix, it returns a line ending with '\r\n' correctly. This makes me difficult to deter

Re: "readline()" omitted '\r' in win32 for dos format text file

2004-12-02 Thread Peter Otten
Newgene wrote: > I have python2.3 installed on win2k. I noticed that when I open a > dos format text file (eol is '\r\n'), readline() always returns a line > ending with '\n' only, not '\r\n'. While I read the same file on unix, > it returns a line ending with '\r\n' correctly. > This makes me dif

Re: PIL and antialiasing problem

2004-12-02 Thread Will McGugan
Laszlo Zsolt Nagy wrote: Try running ImageFilter.MinFilter on the image before you thumbnail it. This should make dark lines thicker. HTH, Will McGugan You are my man! It worked perfectly! Statement: Sometimes PIL is better than Adobe Photoshop. :-) Happy to help :) I also found these with the aid

Re: XUL Parser?

2004-12-02 Thread Alberto Berti
Hi, I'm slowly developing a "thin client environment" that will use xul, or a part of it as gui language, all done in python and that uses python instead of js as scripting language and "event binding". It builds the gui using pyGTK. Who is interested can find more info here: http://artiemestieri

Re: A little threading problem

2004-12-02 Thread Jeremy Jones
Alban Hertroys wrote: Jeremy Jones wrote: (not waiting, because it already did happen). What is it exactly that you are trying to accomplish? I'm sure there is a better approach. I think I saw at least a bit of the light, reading up on readers and writers (A colleague showed up with a book cal

exec size

2004-12-02 Thread km
Hi all, just curious to know why /usr/bin/python2.3 is 890K and /usr/bin/python2.4 is 3.5M in linux ? tia, KM -- http://mail.python.org/mailman/listinfo/python-list

Re: exec size

2004-12-02 Thread Gerhard Haering
On Fri, Dec 03, 2004 at 10:14:48PM +0530, km wrote: > Hi all, > just curious to know why /usr/bin/python2.3 is 890K and > /usr/bin/python2.4 is 3.5M in linux ? Did you try already removing the debug symbols with strip(1)? -- Gerhard signature.asc Description: Digital signature -- http://mai

Re: database questions ala newbie pythonist

2004-12-02 Thread Steve Holden
Dan Sommers wrote: On Wed, 1 Dec 2004 20:45:13 -0500, "chris" <[EMAIL PROTECTED]> wrote: But when I try to use a variable such as: ### ... varA = '0' varB = '1190' mycursor.execute('Update Categories Set DelStatus = ' varA 'Where Pro

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Cousin Stanley
| On debian, it | | apt-get install wxPython2.5.3 | | So it clearly depends on you distribution. | | That this is unfortunate is of course true... | Diez The package for wxPython2.5.3 currently is available for Debian Sid/unstable but not for Sarge/testing -- Cousin Stanley Huma

Re: Semaphore or what should I use?

2004-12-02 Thread Sergei Organov
Pierre Barbier de Reuille <[EMAIL PROTECTED]> writes: > Ville Vainio a Иcrit : > >>"Bastian" == Bastian Hammer <[EMAIL PROTECTED]> writes: > > Bastian> Now I have to make sure, that both threads are > > > Bastian> synchronal, 1 thread edits something and the other is > > Bastian>

Re: exec size

2004-12-02 Thread km
Hi Gerhard, ya have tried stripping python2.4 it came to 952K. now does the size diference before and after strip affect the runtime of a python program ? KM - On Thu, Dec 02, 2004 at 02:23:34PM +0100, Gerhard Haering wrote: > On

Re: Semaphore or what should I use?

2004-12-02 Thread Ville Vainio
> "Sergei" == Sergei Organov <[EMAIL PROTECTED]> writes: Sergei> My answer to OP's question is: use either lock (mutex) or Sergei> semaphore. I'd probably use semaphore as mutexes are Sergei> usually optimized for the case when contention probability Sergei> is low (i.e., they

Re: exec size

2004-12-02 Thread Gerhard Haering
On Fri, Dec 03, 2004 at 10:53:30PM +0530, km wrote: > Hi Gerhard, > ya have tried stripping python2.4 it came to 952K. now does the size > diference before and after strip affect the runtime of a python program ? No, it only saves some space on disk. The interpreter doesn't need any less memory

Re: MySQLdb binaries for Python 2.4 on Windows?

2004-12-02 Thread Sibylle Koczian
Martin Bless schrieb: I'd be happy and thankful if somebody could provide the MySQLdb binaries for Windows and Python 2.4. So would I. Preferably version 1.1.7 and up which works with MySQL 4.1. -- Dr. Sibylle Koczian Universitaetsbibliothek, Abt. Naturwiss. D-86135 Augsburg Tel.: (0821) 598-2400,

Re: A little threading problem

2004-12-02 Thread Alban Hertroys
Jeremy Jones wrote: * the get method on a queue object has a "block" flag. You can effectively poll your queues something like this: #untested code #a_done, b_done and c_done are just checks to see if that particular document is done while not (a_done and b_done and c_done): got_a, got_b, go

Re: Semaphore or what should I use?

2004-12-02 Thread Sergei Organov
Ville Vainio <[EMAIL PROTECTED]> writes: > > "Sergei" == Sergei Organov <[EMAIL PROTECTED]> writes: > > Sergei> My answer to OP's question is: use either lock (mutex) or > Sergei> semaphore. I'd probably use semaphore as mutexes are > Sergei> usually optimized for the case when co

Re: non blocking read()

2004-12-02 Thread Gustavo Córdova Avila
Donn Cave wrote: Depends. I don't believe the original post mentioned that the file is a pipe, socket or similar, but it's kind of implied by the use of select() also mentioned. It's also kind of implied by use of the term "block" - disk files don't block. If we are indeed talking about a pipe or

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Peter Maas
Diez B. Roggisch schrieb: Same task on Win2k: download wxPython-setup.exe, double-click, done. Took me approx. 1 minute. This strikes me. Why are some tasks so hard on Linux and so easy on Windows? After all wxPython/Win and wxPython/Lin are made by the same developers. My guess: the software deplo

disk based dictionaries

2004-12-02 Thread Shivram U
Hi, I want to store dictionaries on disk. I had a look at a few modules like bsddb, shelve etc. However would it be possible for me to do the following hash[1] = [1, 2, 3] where the key is an int and not a string bsddb requires that both the key,value are string. shelve does support values b

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Diez B. Roggisch
>The package for wxPython2.5.3 currently is available >for Debian Sid/unstable but not for Sarge/testing Nevertheless, the point remains valid: _If_ you have proper dependency-management, installation of packages is easy. Of course tracking dependencies takes effort, and so unless a g

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Jp Calderone
On Thu, 02 Dec 2004 15:29:53 +0100, Peter Maas <[EMAIL PROTECTED]> wrote: >Diez B. Roggisch schrieb: > >>Same task on Win2k: download wxPython-setup.exe, double-click, done. > >>Took me approx. 1 minute. This strikes me. Why are some tasks so hard > >>on Linux and so easy on Windows? After all wxPy

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Diez B. Roggisch
> I have heard praises of Debian's install system but Debian is quite > conservative with latest versions. There are some packages (e.g. Python, > PostgreSQL, Subversion) where I'd like to have the latest versions. > I don't want to be too tightly bound to the update cycles of the > Linux distribut

installer

2004-12-02 Thread km
Hi all, does python have a default module installer inbuilt as for perl in windows ? tia , KM -- http://mail.python.org/mailman/listinfo/python-list

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Antoon Pardon
Op 2004-12-02, Peter Maas schreef <[EMAIL PROTECTED]>: > Diez B. Roggisch schrieb: >>>Same task on Win2k: download wxPython-setup.exe, double-click, done. >>>Took me approx. 1 minute. This strikes me. Why are some tasks so hard >>>on Linux and so easy on Windows? After all wxPython/Win and wxPython

Re: installer

2004-12-02 Thread Gerhard Haering
On Sat, Dec 04, 2004 at 12:15:04AM +0530, km wrote: > Hi all, > > does python have a default module installer inbuilt as for perl in > windows ? No, there is no CPAN-like system for Python. You will have to search, download and install your third-party Python libraries yourself. OTOH, there are

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread David Fraser
Robin Becker wrote: Cameron Laird wrote: QOTW: "... why does Microsoft try so hard to protect its sources?" . 2.4 is final, buildable under Windows in at least a couple of ways, improved, ... http://www.brunningonline.net/simon/blog/archives/001657.html asyncore, Twisted,

Re: non blocking read()

2004-12-02 Thread Steve Holden
Gustavo Córdova Avila wrote: Donn Cave wrote: Depends. I don't believe the original post mentioned that the file is a pipe, socket or similar, but it's kind of implied by the use of select() also mentioned. It's also kind of implied by use of the term "block" - disk files don't block. If we are in

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread Rocco Moretti
For some reason I can't seem to make use of the google links. When I use the above eg http://groups.google.com/groups?frame=right&th=e562a771d1c827c9 I get a not found google page with url http://groups-beta.google.com/groups?frame=right&th=e562a771d1c827c9 really wanted to spell file in a sickl

Re: non blocking read()

2004-12-02 Thread Gustavo Córdova Avila
Steve Holden wrote: Gustavo Córdova Avila wrote: Actually the op did mention that he wanted to monitor files. As was pointed out to me when I made the same assertion, he actually said "file object which is stdin" or something like that, which means the object could be a socket, a pipe, a file, a

Re: non blocking read()

2004-12-02 Thread Steve Holden
Gustavo Córdova Avila wrote: Steve Holden wrote: Gustavo Córdova Avila wrote: Actually the op did mention that he wanted to monitor files. As was pointed out to me when I made the same assertion, he actually said "file object which is stdin" or something like that, which means the object could b

Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread Cameron Laird
QOTW: "... why does Microsoft try so hard to protect its sources?" "To avoid embarrassment." -- Peter Maas and Grant Edwards http://groups.google.com/groups?frame=left&th=9a599152d8b23b54 "Sufficiently advanced cluelessness is indistinguishable from malice." -- Alex Martelli 2.4 is fina

Re: installing wxPython on Linux and Windows

2004-12-02 Thread Colin J. Williams
Jp Calderone wrote: On Thu, 02 Dec 2004 15:29:53 +0100, Peter Maas <[EMAIL PROTECTED]> wrote: Diez B. Roggisch schrieb: Same task on Win2k: download wxPython-setup.exe, double-click, done. Took me approx. 1 minute. This strikes me. Why are some tasks so hard on Linux and so easy on Windows? After a

Re: debian python2.4

2004-12-02 Thread Nick Vargish
km <[EMAIL PROTECTED]> writes: > is there a debian binary of python2.4 ? root# apt-get update root# apt-cache search python2.4 idle-python2.4 - An IDE for Python (v2.4) using Tkinter python2.4 - An interactive high-level object-oriented language (version 2.4) python2.4-dev - Header files and a

Re: decorators ?

2004-12-02 Thread Michael Hudson
Skip Montanaro <[EMAIL PROTECTED]> writes: > Jacek> Anything you can do with decorators, you could do before (with > Jacek> the exception of rebinding the __name__ of functions). > > And while that feature was added because we realized it would be nice if the > decorated function could ha

app with support for multiple Python versions

2004-12-02 Thread Steven Bethard
I have a friend developing an app that has bindings for a variety of languages (e.g. Python, Perl, Tcl, Java, etc.). In order to provide the Python support, he uses tclpython (http://jfontain.free.fr/tclpython.htm). If he builds tclpython with, say, Python 2.3, I have to download a source version

Re: disk based dictionaries

2004-12-02 Thread Steve
Hi Shivam, If storing and retrieving is all that you are interested in, you should consider 'pickling' your dicts, using python's pickle module. It's part of the standard library. Learn more about it here: http://docs.python.org/lib/module-pickle.html Here's an example usage: [EMAIL PROTECTE

access to generator state

2004-12-02 Thread Neal D. Becker
I am converting optimization code from legacy C to python. Generators are a HUGE convenience, because the original code structures have the optimizer as the main code calling your function, while I want to invert these roles. I want to call the optimizer to perform just one step at a time. So, t

Why I can NOT use Python but PHP

2004-12-02 Thread Lad
I would like to set up my website and allow customers to choose products there, including shopping carts. I would like to use Python but it would be very complicated to start from nothing. Why is there not any(?) framework or complete e-commerce solution written in Python? There are lots in PHP.One

Re: Why I can NOT use Python but PHP

2004-12-02 Thread Steve Holden
Lad wrote: I would like to set up my website and allow customers to choose products there, including shopping carts. I would like to use Python but it would be very complicated to start from nothing. Why is there not any(?) framework or complete e-commerce solution written in Python? There are lots

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread Gerrit
Cameron Laird wrote: > Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2) What is the frequency of the weekly Python-URL? (-; regards, Gerrit Holl. -- Weather in Lulea / Kallax, Sweden 02/12 19:20: -8.0ÂC Scattered clouds mostly cloudy wind 0.9 m/s None (34 m above

Re: access to generator state

2004-12-02 Thread Kent Johnson
Neal D. Becker wrote: Only one problem. Is there any way to access the state of a generator externally? In other words, the generator saves all it's local variables. Can an unrelated object then query the values of those variables? (In this case, to get at intermediate results) You could make

Galois field

2004-12-02 Thread Roie Kerstein
I am looking for a python package that deals with galois fields. Does anybody know where can I find it? Thank in advance -- Best regards Roie Kerstein -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2)

2004-12-02 Thread Thomas Heller
Gerrit <[EMAIL PROTECTED]> writes: > Cameron Laird wrote: >> Subject: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 2) > > What is the frequency of the weekly Python-URL? (-; According to the name, about 1.6 µHz. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: debian python2.4

2004-12-02 Thread Jordi Romero (qiz/jrom)
Just remove /usr/bin/python and make a new soft link to the /usr/bin/python2.4 (ln -s /usr/bin/python2.4 /usr/bin/python) Jonas Galvez wrote: km wrote: Only downside is that /usr/bin/python still points to 2.3.4. Haven't figured out how to change that, but I am also afraid it would break mod_p

Re: access to generator state

2004-12-02 Thread Peter Otten
Neal D. Becker wrote: > Only one problem. Is there any way to access the state of a generator > externally? In other words, the generator saves all it's local variables. > Can an unrelated object then query the values of those variables? (In You get read access with generator.gi_frame.f_locals

Re: access to generator state

2004-12-02 Thread Sean Ross
"Neal D. Becker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am converting optimization code from legacy C to python. Generators are a > HUGE convenience, because the original code structures have the optimizer > as the main code calling your function, while I want to invert t

Re: debian python2.4

2004-12-02 Thread Jonas Galvez
km wrote: > is there a debian binary of python2.4 ? Not yet, I guess, but I could easily compile it from the source (I'm no Linux expert, I simply followed the instructions: ./configure, make, make install, and voilà). No error messages, no nothing. Only downside is that /usr/bin/python still poin

Re: access to generator state

2004-12-02 Thread Tim Peters
[Neal D. Becker] > ... > Only one problem. Is there any way to access the state of a > generator externally? In other words, the generator saves all it's > local variables. Can an unrelated object then query the values of > those variables? (In this case, to get at intermediate results) It's

RotatingFileHandler

2004-12-02 Thread Kamus of Kadizhar
I'm having a problem with logging. I have an older app that used the RotatingFileHandler before it became part of the main distribution (I guess in 2.3). It worked fine then. Now I get: [EMAIL PROTECTED] bin]# ./mplayer.py file://test.avi //test.avi Traceback (most recent call last): File "./

Re: recombination variations

2004-12-02 Thread Scott David Daniels
Hung Jung Lu wrote: ... expand = lambda t: reduce(lambda r, s: [x+y for x in r >for y in alphabet[s]], t, ['']) print expand('ATSGS') Or, for a more verbose version: multis = dict(W='AT', M='AC', R='AG', Y='TC', K='TG', S='CG', H='ATC', D='ATG'

Re: Why I can NOT use Python but PHP

2004-12-02 Thread Roie Kerstein
Lad wrote: > Why is there not any(?) framework or complete e-commerce solution > written in Python? There is a framework written in python. It is called zope. www.zope.org If you will search well, I am quite sure you will also find a complete e-commerce solution. -- Best regards Roie Kerstein

Re: non blocking read()

2004-12-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Greg Ewing <[EMAIL PROTECTED]> wrote: > Donn Cave wrote: > > If we are indeed talking about a pipe or something that > > really can block, and you call fileobject.read(1024), > > it will block until it gets 1024 bytes. > > No, it won't, it will block until *some*

Re: pre-PEP generic objects

2004-12-02 Thread Scott David Daniels
Nick Craig-Wood wrote: Scott David Daniels <[EMAIL PROTECTED]> wrote: You can simplify this: class Hash(object): def __init__(self, **kwargs): for key,value in kwargs.items(): setattr(self, key, value) __getitem__ = getattr __setitem__ = setattr That doesn't wor

help running python in a limited interpreted environment

2004-12-02 Thread Mike
We have a large c++ program that runs under Windows NT Embedded to control an instrument. That program has been written to run external python scripts. The computer where this code runs does not and cannot have a full python installation. It ONLY has the pythonNN.dll file that comes with a full

How is Python designed?

2004-12-02 Thread Limin Fu
Hello, Is there any technical description on internet of how python is designed? Or can somebody give a short description about this? I'm just curious. Thanks in advance, Limin __ Do you Yahoo!? Yahoo! Mail - You care about security. So

Re: pre-PEP generic objects

2004-12-02 Thread Jp Calderone
On Thu, 02 Dec 2004 12:26:31 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Nick Craig-Wood wrote: > > Scott David Daniels <[EMAIL PROTECTED]> wrote: > >> You can simplify this: > >> class Hash(object): > >> def __init__(self, **kwargs): > >> for key,value in kwargs.items():

Any affordable Python-based CRM & ERP solutions?

2004-12-02 Thread Will
Hi all, Please excuse the longish post. I'm new to Python (and programming), but love what I see and believe it to be an important language. I have (at least) one retail client (with single outlet at present) that requires a total business solution for their operation, preferably open source. The

inheritance problem with 2 cooperative methods

2004-12-02 Thread Dan Perl
Here is a problem I am having trouble with and I hope someone in this group will suggest a solution. First, some code that works. 3 classes that are derived from each other (A->B->C), each one implementing only 2 methods, __init__ and setConfig.

Re: "encoding specified in XML declaration is incorrect"

2004-12-02 Thread "Martin v. Löwis"
Gustaf Liljegren wrote: f.write(header + self.all + footer) UnicodeEncodeError: 'ascii' codec can't encode characters in position 745-751: ordinal not in range(128) The XML declaration should be enough to tell the encoding. Sure, but that does not help at all. self.all is a Unicode string; i

Re: pickle and py2exe

2004-12-02 Thread Justin Straube
On Tue, 30 Nov 2004 22:48:39 -0600, "Catfish" <[EMAIL PROTECTED]> wrote: >I did this a while back, and I can't remember exactly. Therefore, I may only >be able to give you a push in the right direction until someone else can >answer it fully. > >However, I think you have to force the db into the

RE: RotatingFileHandler

2004-12-02 Thread Robert Brewer
Kamus of Kadizhar wrote: > I'm having a problem with logging. I have an older app that used the > RotatingFileHandler before it became part of the main distribution (I > guess in 2.3). > > It worked fine then. Now I get: > > [EMAIL PROTECTED] bin]# ./mplayer.py file://test.avi > //test.avi > Tr

What to use for installation?

2004-12-02 Thread Eugene Morozov
Hello! I wrote a crossplatform Glade/GTK+ application for learning foreign languages (it is called Snakememory but doesn't have site in English yet). Currently it works from the directory where it was unpacked. But I need installation script that will compile and install translations, install a

RE: decorators ?

2004-12-02 Thread Delaney, Timothy C (Timothy)
Michael Hudson wrote: > Skip Montanaro <[EMAIL PROTECTED]> writes: > >> Jacek> Anything you can do with decorators, you could do before >> (with Jacek> the exception of rebinding the __name__ of >> functions). >> >> And while that feature was added because we realized it would be >> nic

efficient intersection of lists with rounding

2004-12-02 Thread Gordon Williams
Hi, I have to lists that I need to find the common numbers (2nd rounded to nearest integral) and I am wondering if there is a more efficient way of doing it. >>> a= [(123,1.3),(123,2.4),(123,7.8),(123,10.2)] >>> b= [(123, 0.9), (123, 1.9), (123, 8.0)] >>> [ (i,round(j)) for i,j in a for l,m in b

PySQLite Table indexing inside a functions

2004-12-02 Thread Kevin
Hello Everyone, I'm using PySQLite and would like to index this insert statement with the 'tablename'. Can anyone offer a suggestion? Also, this is a shot in the dark. Has anyone done anything with nested fields. I would like each vertex to have 3 points. currently, I'm just making 3 fields.

Re: pickle and py2exe

2004-12-02 Thread Justin Straube
On 1 Dec 2004 11:45:59 -0800, [EMAIL PROTECTED] (Johan Lindberg) wrote: >Have you included string-escape encoding in your setup.py? >My guess is that you can fix the problem with something similar to: > > from distutils.core import setup > import py2exe > opts = { "py2exe": { "packages": ["encodi

Re: How is Python designed?

2004-12-02 Thread Timo Virkkala
Limin Fu wrote: Hello, Is there any technical description on internet of how python is designed? Or can somebody give a short description about this? I'm just curious. Do you mean the structure and design of the language, or the process of designing the language? Well, in either case, you'll prob

Re: Python 2.4 and Tkinter

2004-12-02 Thread Jeffrey Barish
Jean Brouwers wrote: > > Here is how we understand this (which may be incomplete and/or > incorrect). > > The _tkinter module is a shared library _tkinter.o and that is built > from C source file _tkinter.c. That C file and a few other tk related > C files are included in the Python distributio

Re: What to use for installation?

2004-12-02 Thread Roger Binns
"Eugene Morozov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > But I want to know other opinions before going with scons. What is the best > tool for installing python applications? The tools you mention are actually more applicable to Python packages in that they install the code

Pythonic use of CSV module to skip headers?

2004-12-02 Thread Ramon Felciano
Hi -- I'm using the csv module to parse a tab-delimited file and wondered whether there was a more elegant way to skip an possible header line. I'm doing line = 0 reader = csv.reader(file(filename)) for row in reader: if (ignoreFirstLine & line == 0):

  1   2   >