Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Tim Roberts
Daniel Klein <[EMAIL PROTECTED]> wrote: > >Are there any guidelines for upgrading from 2.5 to 2.6? > >Do you have to uninstall 2.5, or does the installer do that for you? Neither. It will be installed in a separate directory. If you don't want 2.5 any more, you can uninstall it yourself from Con

Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Mensanator
On Oct 12, 11:22�pm, "Martin v. L�wis" <[EMAIL PROTECTED]> wrote: > > Are there any guidelines for upgrading from 2.5 to 2.6? > > Dear Daniel, > > Python 2.5 and 2.6 can coexist, so there isn't any need for some > kind of upgrade procedure. Installing 2.6 will not affect your > 2.5 installation. >

Re: unicode .replace not working - why?

2008-10-12 Thread Martin v. Löwis
> On a side note, do you really think the function call wouldn't interpret > the unichr before the function call? Dennis' main point was not that you can reuse fn (which he suggested just as performance improvement), but that you need to assign the result of .replace back to textu. Regards, Ma

ANN: M2Crypto 0.19.1

2008-10-12 Thread Heikki Toivonen
The 0.19.1 release fixes the build when OpenSSL has been configured without EC support, thanks to Miloslav Trmac. M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA, DH, HMACs, message digests, symmetric ciphers (including AES); SSL functionality to implement clients and s

Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Martin v. Löwis
> Are there any guidelines for upgrading from 2.5 to 2.6? Dear Daniel, Python 2.5 and 2.6 can coexist, so there isn't any need for some kind of upgrade procedure. Installing 2.6 will not affect your 2.5 installation. > Do you have to uninstall 2.5, or does the installer do that for you? No. Aft

Re: type-checking support in Python?

2008-10-12 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bas wrote: > What they taught me as a physics undergrad is to always convert random > units given as input to SI units as soon as possible, do all your > calculations internally in SI units and (only if really needed) > convert back to arbitrary units on output. If

Re: type-checking support in Python?

2008-10-12 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steven D'Aprano wrote: > ... just for the record "dimensions" are not "units". Yeah, OK. "unit" = "dimensions" x "multiplier". Where "multiplier" can be arbitarily set to 1 for SI units. -- http://mail.python.org/mailman/listinfo/python-list

Re: python-2.6

2008-10-12 Thread Terry Reedy
[EMAIL PROTECTED] wrote: I attempted to install numpy 1.2.0 under Windows x86 and python 2.6 and the installation failed as well. Let us know if you get it to work on Mac, but do not upgrade to Python 2.6 if you want your numpy code to work on a Windows machine at least until there is a new num

ANN: Humerus 2.0

2008-10-12 Thread Greg Ewing
Humerus 2.0 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.0.0.tar.gz Online documentation: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.0.0/doc/ This version of Humerus has been extensively revised from the previous one. Instea

Re: unicode .replace not working - why?

2008-10-12 Thread Mark Tolonen
In your original code: textu.replace(unichr(167),'\n') as Dennis suggested (but maybe you were distracted by his 'fn' replacement, so I'll leave it out): textu = textu.replace(unichr(167),'\n') .replace does not modify the string in place. It returns the modified string, so you have to

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Thanks for the help, but I'm bowing out of this graphics problem. This should have been a snap, but has turned into a detour. I'll get back to the python program I was considering for it, and just work without the scatter plot. It's easily done. It would just look prettier in a plot. The meat

Re: Define a 2d Array?

2008-10-12 Thread Jillian Calderon
Thanks, everyone. All of your help solved at least my data storage problem! -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode .replace not working - why?

2008-10-12 Thread Kurt Peters
Thanks, clearly though, my "For loop" shows a character using ord(167), and using print repr(textu), it shows the character \xa7 (as does Peter Oten's post). So you can see what I see, here's the document I'm using - the Special Use Airspace document at http://www.faa.gov/airports_airtraffic/a

Re: unicode .replace not working - why?

2008-10-12 Thread Kurt Peters
Thanks... On a side note, do you really think the function call wouldn't interpret the unichr before the function call? Kurt "Peter Otten" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Kurt Peters wrote: > >> I had done that about 21 revisions ago. > > If you litter your modu

Re: Define a 2d Array?

2008-10-12 Thread thomas . p . krauss
On Oct 11, 9:19 pm, Jillian Calderon <[EMAIL PROTECTED]> wrote: > How do I define a 2d list? > > For instance, to define a 4 by 5 list, I wanted to do this: > n=4 > m=5 > world = [n][m] > However, it gives me an invalid syntax error saying the index is out > of range. Here are some examples of how

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Ah, a tiny break through. I got C:\Python24\python myprogram.py aprog.py. I copied the program to this folder. I don't seem to be able to copy the window, so I see pretty much what I had before from a dialog that popped up, except it adds: Fatal Pyton error: Pystring_InterInPlace: strings only p

Re: Upgrading from 2.5 to 2.6

2008-10-12 Thread Benjamin Kaplan
On Sun, Oct 12, 2008 at 6:16 PM, Daniel Klein <[EMAIL PROTECTED]>wrote: > Are there any guidelines for upgrading from 2.5 to 2.6? > > Do you have to uninstall 2.5, or does the installer do that for you? > > I have wxPython, mod_python and Django installed. Will these have to > reinstalled/reconfig

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Dennis Lee Bieber wrote: On Sun, 12 Oct 2008 15:07:57 -0700, "W. eWatson" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: I worked my way into the folder where the py program is, but couldn't executed. Just entering aprog.py, run aprog.py or exec aprog.py didn't work.

Re: urlparse import Faillure

2008-10-12 Thread Robert Hancock
On Oct 10, 1:48 pm, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > On Thu, 9 Oct 2008 22:47:58 -0700 (PDT), Robert Hancock wrote: > import CGIHTTPServer > ... > > ImportError: cannot import name urlparse > > ... > > It points to the third line of the comment.  Any ideas on how to > > proceed with

Mail reader & spam

2008-10-12 Thread Aaron "Castironpi" Brady
Hello all, I'm hesitating to change news readers because I like Google's interface. In the interests of discussion, I'd make better contributions without it, if only because it's a known spam source, but its reader format beats the alternatives I've seen. I checked out the 'nntplib' module to se

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
John Machin wrote: On Oct 13, 9:07 am, "W. eWatson" <[EMAIL PROTECTED]> wrote: I worked my way into the folder where the py program is, but couldn't executed. Just entering aprog.py, run aprog.py or exec aprog.py didn't work. One wouldn't expect the "run" or the "exec" to work. Try these in

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread John Machin
On Oct 13, 9:07 am, "W. eWatson" <[EMAIL PROTECTED]> wrote: > > I worked my way into the folder where the py program is, but couldn't > executed. Just entering aprog.py, run aprog.py or exec aprog.py didn't work. One wouldn't expect the "run" or the "exec" to work. Try these in this order: pytho

Re: PIL on windows XP x64 (64-bit)?

2008-10-12 Thread Martin v. Löwis
Berco Beute wrote: > Investigated this a little more. Since I only needed to resize an > image I thought going through all the hoops of building PIL was too > much effort and took a look at PythonMagick. Turned out I had to build > that myself as well. Am I the first that wants to do image > manipu

Re: Define a 2d Array?

2008-10-12 Thread skip
Eric> I think you can do Eric> mylist = [[]] or somesuch... That won't do what you want. You've defined a list with a single element (another list). You might have been thinking of something like this: >>> N = 4 >>> M = 5 >>> mylist = [[0.0] * M] * N While to the casual g

Upgrading from 2.5 to 2.6

2008-10-12 Thread Daniel Klein
Are there any guidelines for upgrading from 2.5 to 2.6? Do you have to uninstall 2.5, or does the installer do that for you? I have wxPython, mod_python and Django installed. Will these have to reinstalled/reconfigured for 2.6? Platform: Windows XP Pro SP3 Daniel Klein -- http://mail.python.org

Re: File Upload Size

2008-10-12 Thread Mike Driscoll
On Oct 12, 9:34 am, rodmc <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to get the size of a file on a remote machine before it > is uploaded? I would like to write some form of status counter which > is updated as a fie is uploaded, and also to use this feature to > prevent files which are t

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Dennis Lee Bieber wrote: On Sun, 12 Oct 2008 12:56:26 -0700, "W. eWatson" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: Oddly when I use cmd, it gets me to settings and docs. If I try c:\whatever I get a msg, and it remains in the same folder. That's likely the def

Re: PIL on windows XP x64 (64-bit)?

2008-10-12 Thread Berco Beute
Investigated this a little more. Since I only needed to resize an image I thought going through all the hoops of building PIL was too much effort and took a look at PythonMagick. Turned out I had to build that myself as well. Am I the first that wants to do image manipulation on x64 using python? A

Re: Define a 2d Array?

2008-10-12 Thread John Machin
On Oct 12, 1:30 pm, [EMAIL PROTECTED] wrote: >     Jill> How do I define a 2d list? > > If you are looking to do numeric work with such multidimensional lists you > should consider the builtin array object or the numpy package: > >    http://docs.python.org/dev/library/array.html#module-array The

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread Benjamin Kaplan
On Sun, Oct 12, 2008 at 3:56 PM, W. eWatson <[EMAIL PROTECTED]> wrote: > > Thanks. > > Oddly when I use cmd, it gets me to settings and docs. If I try c:\whatever > I get a msg, and it remains in the same folder. > Are you just typing "C:\whatever" or did you type in "chdir C:\whatever"? -- http

Re: Split entries from LDAP

2008-10-12 Thread paul
Lars schrieb: I got all the entries in the variable "raw_res" and I now got some doubts on how to split each value up in every entry. Belove you can see one of entries printed from the loop. cn=world.dom.dk,ou=Hosts,o=Users,dc=dom,dc=dk', {'ipHostNumber': ['192.168.0.43'], 'cn': ['world.dom.dk'],

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
Dennis Lee Bieber wrote: On Sun, 12 Oct 2008 11:24:32 -0700, "W. eWatson" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: available there. I've long forgotten how to get a console window up in Win XP. I can strip it all the code way down to the from, and it will fail the same

Re: Data wont stay saved in Database using Pysqlite

2008-10-12 Thread azrael
On Oct 12, 8:26 pm, azrael <[EMAIL PROTECTED]> wrote: > I am working on an application using Python, wxPython and Sqlite > (Pysqlite) > > So my problem is that I can connect top the database. When I open a > dialog through a form I am able to make a select, even insert data > into the database. Eve

Data wont stay saved in Database using Pysqlite

2008-10-12 Thread azrael
I am working on an application using Python, wxPython and Sqlite (Pysqlite) So my problem is that I can connect top the database. When I open a dialog through a form I am able to make a select, even insert data into the database. Even if I open again the Dialog. But as soon as I close the main fr

Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-12 Thread W. eWatson
I copied the following code from a matplotlib tutorial, and it fails. I'm using python 2.4 on Win XP. It's matplotlib-0.98.3.win32-py2.4exe. It fails in IDLE with a small window showing a runtime error. Clicking the OK on it kills IDLE and the shell. If I double-click on the py file, the console

Re: Deviation from object-relational mapping (pySQLFace)

2008-10-12 Thread Paul Boddie
On 12 Okt, 17:19, [EMAIL PROTECTED] wrote: > I have made a simple python module to handle SQL databases: > https://fedorahosted.org/pySQLFace/wiki > Its goal to separate relational database stuff (SQL) from algorythmic > code (python). A SQLFace is a facade initialized with a configuration > file (

Re: python-2.6

2008-10-12 Thread amir
On Oct 2, 9:33 am, [EMAIL PROTECTED] wrote: > Hi all. > > I've installed on may MacOS X 10.4.11 (PPC) Python-2.5.2, numpy and scipy. > Now I'm interested to insall Python-2.6. My question is: What will happen to > may scientific modules if now I jump fro 2.5.2 to 2.6? I've to reinstall > numpy and

Re: please solve

2008-10-12 Thread Raymond Cote
shweta mani wrote: hi folks, i have been assigned a project on Python. i need to execute a remote shell script file from a windows machine through SSH twisted or paramiko. if it is a normal file then directly with the command sh .sh it is getting executed. self.conn.sendRequest(self, 'exec', com

Deviation from object-relational mapping (pySQLFace)

2008-10-12 Thread sulyokpeti
I have made a simple python module to handle SQL databases: https://fedorahosted.org/pySQLFace/wiki Its goal to separate relational database stuff (SQL) from algorythmic code (python). A SQLFace is a facade initialized with a configuration file (XML). It provides callable command objects for each s

Re: Define a 2d Array?

2008-10-12 Thread [EMAIL PROTECTED]
On Oct 11, 9:30 pm, [EMAIL PROTECTED] wrote: >     Jill> How do I define a 2d list? > > Python doesn't truly have 2d lists in the way you might think of 2d arrays > in C or Fortran.  It has 1d lists which can contain any Python object, > including other lists.  If you wanted to create a 4x5 list yo

File Upload Size

2008-10-12 Thread rodmc
Hi, Is there a way to get the size of a file on a remote machine before it is uploaded? I would like to write some form of status counter which is updated as a fie is uploaded, and also to use this feature to prevent files which are too big from being uploaded. Best, rod -- http://mail.python.or

Re: parsing javascript

2008-10-12 Thread Philip Semanchuk
On Oct 12, 2008, at 5:25 AM, S.Selvam Siva wrote: I have to do a parsing on webpagesand fetch urls.My problem is ,many urls i need to parse are dynamically loaded using javascript function (onload()).How to fetch those links from python? Thanks in advance. Selvam, You can try to find them y

H.323 module

2008-10-12 Thread mbmessaoud
Hi Is there a module in python that implement H.323 protocol I need such module to test a Gatekeeper or a H.323 module Any comment is welcome -- http://mail.python.org/mailman/listinfo/python-list

Re: pyuno store OO object into blob

2008-10-12 Thread Marco Bizzarri
On Sun, Oct 12, 2008 at 1:41 PM, DarkBlue <[EMAIL PROTECTED]> wrote: > Hello > > Python 2.5.1 > Qt 4.4.0 > PyQt 4.4.2 > OO 2.4.1 > Firebird 2.1 > > I want to store an openoffice writer object into a blob field using > the pyuno bridge. I read about the possibility of using streams , > but only see

Re: Decrease code redundancy without breaking references

2008-10-12 Thread Frank Malina @ vizualbod.com
There is the following source structure: /packages/... /packages/global_settings.py # this is the global settings file imported from each client settings file /clients/... /clients/client1/settings.py # client specific settings file (see code above), each client is running in its own process so th

Re: How to detect Chinese in a string?

2008-10-12 Thread lookon
Get it. Thanks Peter Otten wrote: > lookon wrote: > > > I have a string a(for example, a='中文Chinese'), and I want to know > > whether there are some Chinese in the string. > > > > Can someone tell me how to do it? Thanks! > > See > > http://mail.python.org/pipermail/python-list/2008-September/5097

Re: How to detect Chinese in a string?

2008-10-12 Thread Peter Otten
lookon wrote: > I have a string a(for example, a='中文Chinese'), and I want to know > whether there are some Chinese in the string. > > Can someone tell me how to do it? Thanks! See http://mail.python.org/pipermail/python-list/2008-September/509738.html Instead of re.findall(...) you may use i

How to detect Chinese in a string?

2008-10-12 Thread lookon
I have a string a(for example, a='中文Chinese'), and I want to know whether there are some Chinese in the string. Can someone tell me how to do it? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

pyuno store OO object into blob

2008-10-12 Thread DarkBlue
Hello Python 2.5.1 Qt 4.4.0 PyQt 4.4.2 OO 2.4.1 Firebird 2.1 I want to store an openoffice writer object into a blob field using the pyuno bridge. I read about the possibility of using streams , but only see some old basic or java examples . The writer document has been created and stored into a

Download CGI

2008-10-12 Thread rodmc
Hi, I am trying to figure out how to create a Python script which will open a file from a folder outwith the public_html path and serve it directly to the user for downloading. The aim being so that the users cannot see where the file is served from. Is there an easy way to do this, or an HTML hea

parsing javascript

2008-10-12 Thread S.Selvam Siva
I have to do a parsing on webpagesand fetch urls.My problem is ,many urls i need to parse are dynamically loaded using javascript function (onload()).How to fetch those links from python? Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient Bit addressing in Python.

2008-10-12 Thread Hendrik van Rooyen
Ross Ridge wrote: >Unfortunately from your other posts you do seem to be working on >a single byte a time, so my technique probably won't be efficient. Its a bit more - the hardware allows for 64 lines in and 64 lines out. >You probably want just want to be using constants and bit masking. >S

Re: unicode .replace not working - why?

2008-10-12 Thread Peter Otten
Kurt Peters wrote: > I had done that about 21 revisions ago. If you litter your module with code that is commented out it is hard to keep track of what works and what doesn't. > Nevertheless, why would you think > that would work, when the code as shown doesn't? Because he knows Python? Why