ANN: python-ldap-2.3.11

2010-02-26 Thread Michael Ströder
Find a new release of python-ldap: http://www.python-ldap.org/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g.

ANN: Leo 4.7.1 released

2010-02-26 Thread Edward K Ream
Leo 4.7.1 finalFebruary 26, 2010 Leo 4.7.1 final is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo 4.7.1 fixes a dangerous bug in Leo 4.7. When converting file-like sentinels to thin-like sentinels in an external file, Leo now

PyCon 2011 - Call for Tutorial Volunteers

2010-02-26 Thread Greg Lindstrom
PyCon 2010 is complete and plans for PyCon 2011 in Atlanta have already begun! The main conference will once again be proceeded by two days of tutorials. There was quite a bit of feedback from students and teachers this year that we want to incorporate in next years classes. In order to do

ANN: PyUseCase 3.2 - GUI testing for Python (PyGTK and now Tkinter)

2010-02-26 Thread Geoff Bache
Hi all, A new release of PyUseCase is out. There have been some minor improvements to PyGTK support but the main effort has been getting Tkinter support off the ground. At this point Tkinter support is fairly basic and doesn't come close to covering the widget set, but it's working on a couple

ANN: TextTest 3.17

2010-02-26 Thread Geoff Bache
Hi all, There's a new version of the black-box test tool TextTest out. There are various enhancements, notably: - The HTML report now generates graphs of the results over time if you install the matplotlib library - The static GUI Selection tab is now available in the dynamic GUI also, with

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-26 Thread Baptiste Lepilleur
2010/2/24 Lars Gustäbel l...@gustaebel.de On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote: I stumbled uppon this and find it somewhat odd: some class methods of TarFile and TarInfo do not appears in either the online documentation or search while they have a doc string:

Get dosctring without import

2010-02-26 Thread Joan Miller
When a package is imported, it gets the dosctring to store it in *__doc__*. Does that funcion is built in python? because I would want use it to get the docstring without import a package -- http://mail.python.org/mailman/listinfo/python-list

Re: Get dosctring without import

2010-02-26 Thread Diez B. Roggisch
Am 26.02.10 09:55, schrieb Joan Miller: When a package is imported, it gets the dosctring to store it in *__doc__*. Does that funcion is built in python? because I would want use it to get the docstring without import a package You'd need to write your own parser for that. All standard tools

Re: staticmethod and namespaces

2010-02-26 Thread Diez B. Roggisch
Am 26.02.10 06:07, schrieb darnzen: Having an odd problem that I solved, but wondering if its the best solution (seems like a bit of a hack). First off, I'm using an external DLL that requires static callbacks, but because of this, I'm losing instance info. It could be import related? It will

Re: taking python enterprise level?...

2010-02-26 Thread Diez B. Roggisch
Am 26.02.10 05:01, schrieb D'Arcy J.M. Cain: On Fri, 26 Feb 2010 01:12:00 +0100 Diez B. Roggischde...@nospam.web.de wrote: That better way turned out to asynchronous update transactions. All we did was keep feeding updates to the remote site and forget about ACKS. We then had a second process

Re: taking python enterprise level?...

2010-02-26 Thread mdipierro
100,000 hits a day is not a low. I get that some day on my web server without problem and without one request dropped. Most frameworks web2py, Django, Pylons can handle that kind of load since Python is not the bottle neck. You have to follow some tricks: 1) have the web server serve static

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-26 Thread Lars Gustäbel
On Fri, Feb 26, 2010 at 09:28:04AM +0100, Baptiste Lepilleur wrote: 2010/2/24 Lars Gustäbel l...@gustaebel.de On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote: I stumbled uppon this and find it somewhat odd: some class methods of TarFile and TarInfo do not appears in

modbus pymodbus

2010-02-26 Thread Ippolito Nievo
Hi all, someone can help me to pymodbus use? I must send some command and read aswer from an inverter. It use ModBus RTU. Thanks a lot -- http://mail.python.org/mailman/listinfo/python-list

Re: A more pythonish code

2010-02-26 Thread prasad_chand
Hi Mr.Posner nn, Thank your for your time effort. I never knew that for...ever combination even existed. I would keep these insights in mind in the future. Thanks again, Prasad On Feb 25, 10:57 pm, John Posner jjpos...@optimum.net wrote: On 2/25/2010 7:23 AM, prasad_chand wrote: Hi,

Re: Get dosctring without import

2010-02-26 Thread Jean-Michel Pichavant
Joan Miller wrote: When a package is imported, it gets the dosctring to store it in *__doc__*. Does that funcion is built in python? because I would want use it to get the docstring without import a package Epydoc, a documentation builder is able to do so with the --parse-only option. You

Re: Get dosctring without import

2010-02-26 Thread Ben Finney
Joan Miller pelok...@gmail.com writes: When a package is imported, it gets the dosctring to store it in *__doc__*. Joan, in this message and numerous others you've been following the widespread convention of using asterisks ‘*’ to surround text you want to emphasise. Normally that's good, but

Re: Get dosctring without import

2010-02-26 Thread Peter Otten
Joan Miller wrote: When a package is imported, it gets the dosctring to store it in *__doc__*. Does that funcion is built in python? because I would want use it to get the docstring without import a package Something to get you started: import ast def walk(root, stack): for node in

Re: Executable problem - socket?

2010-02-26 Thread Lawrence D'Oliveiro
In message hm4o2o$9i...@speranza.aioe.org, Gib Bogle wrote: The only clue is that the machines that her program runs on have Python installed, while the one that fails doesn't. Wouldn’t it be a whole lot simpler to install Python on the bloody machine? --

Re: Get dosctring without import

2010-02-26 Thread Joan Miller
On 26 feb, 10:51, Ben Finney ben+pyt...@benfinney.id.au wrote: Joan Miller pelok...@gmail.com writes: When a package is imported, it gets the dosctring to store it in *__doc__*. Joan, in this message and numerous others you've been following the widespread convention of using asterisks ‘*’

Re: Get dosctring without import

2010-02-26 Thread Joan Miller
On 26 feb, 10:57, Peter Otten __pete...@web.de wrote: Joan Miller wrote: When a package is imported, it gets the dosctring to store it in *__doc__*. Does that funcion is built in python? because I would want use it to get the docstring without import a package Something to get you

[M2Crypto] Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
System: # rpm -q python m2crypto python-2.4.3-27.el5 m2crypto-0.16-6.el5.6 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) I have the following method: def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user, ftp_pass): date =

PyQt 4.7 installation on Windows

2010-02-26 Thread Gib Bogle
I've just installed Python 2.6.4 and PyQt 4.7 on my Windows machine, on which I was using Python 2.5 and PyQt 4.5. Now 'from PyQt4 import QtGui' fails to find the DLL. Some googling shows that others have encountered the same problem, and a workaround is to copy QtGui4.dll (for example) from

Re: What's the word on using to comment-out?

2010-02-26 Thread Michael Rudolf
Am 25.02.2010 17:39, schrieb Grant Edwards: IMO, any sort of commented out code left in a program is a big mistake. If the code is soething that does need to stay for optional use, then it needs to be properly integrated along with logic to control when it's used. OK, then we are perfectly

Re: What's the word on using to comment-out?

2010-02-26 Thread Michael Rudolf
Am 26.02.2010 12:47, schrieb Michael Rudolf: I'd just hate to see something like if False in production level code. And yeah, I've seen it. And worse. -- http://mail.python.org/mailman/listinfo/python-list

Re: WANTED: Regular expressions for breaking TeX/LaTeX document into tokens

2010-02-26 Thread Jonathan Fine
Wes James wrote: On Wed, Feb 24, 2010 at 5:03 AM, Jonathan Fine j.f...@open.ac.uk wrote: Hi Does anyone know of a collection of regular expressions that will break a TeX/LaTeX document into tokens? Assume that there is no verbatim or other category code changes. I'm not sure how this does

(and about tests) Re: Pedantic pickling error after reload?

2010-02-26 Thread Robert
Diez B. Roggisch wrote: Am 25.02.10 18:08, schrieb Robert: After (intended/controlled) reload or similar action on a module/class the pickle/cPickle.dump raises errors like pickle.PicklingError: Can't pickle class 'somemodule.SomeClass': it's not the same object as somemodule.SomeClass Cause

Challenge: escape from the pysandbox

2010-02-26 Thread Victor Stinner
Hi, pysandbox is a new Python sandbox project under development. By default, untrusted code executed in the sandbox cannot modify the environment (write a file, use print or import a module). But you can configure the sandbox to choose exactly which features are allowed or not, eg. import sys

Quoting quotes

2010-02-26 Thread candide
Suppose you have to put into a Python string the following sentence : The play All's Well That Ends Well by Shakespeare It's easy do it : print The play All's Well That Ends Well by Shakespeare The play All's Well That Ends Well by Shakespeare Now, change the sentence to this one : The play

Re: Challenge: escape from the pysandbox

2010-02-26 Thread Victor Stinner
Le vendredi 26 février 2010 13:29:33, Victor Stinner a écrit : pysandbox is a new Python sandbox project ... I just forget to explain how to download it. Website: http://github.com/haypo/pysandbox/ Download the repository using git: git clone git://github.com/haypo/pysandbox.git or git

Re: Quoting quotes

2010-02-26 Thread Ivan Šipoš
On 26.2.2010. 13:29, candide wrote: Suppose you have to put into a Python string the following sentence : The play All's Well That Ends Well by Shakespeare It's easy do it : print The play All's Well That Ends Well by Shakespeare The play All's Well That Ends Well by

Re: Get dosctring without import

2010-02-26 Thread Ben Finney
Joan Miller pelok...@gmail.com writes: I use a function in 'setupy.py' to get automatically the description from the package's docstring, but there is a problem when you import a module that has to be built by cython (because it tries load a module that doesn't exists). A simple approach (at

Re: Quoting quotes

2010-02-26 Thread Victor Stinner
Le vendredi 26 février 2010 13:29:04, candide a écrit : But the first method doesn't run correctly : print The play All's Well That Ends Well File stdin, line 1 print The play All's Well That Ends Well ^ SyntaxError: EOL while

Re: Docstrings considered too complicated

2010-02-26 Thread Andreas Waldenburger
On Thu, 25 Feb 2010 12:51:00 -0800 (PST) John Roth johnro...@gmail.com wrote: On Feb 24, 1:23 pm, Andreas Waldenburger use...@geekmail.invalid wrote: a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and it basically looks

Re: Get dosctring without import

2010-02-26 Thread Joan Miller
On 26 feb, 12:35, Ben Finney ben+pyt...@benfinney.id.au wrote: Joan Miller pelok...@gmail.com writes: I use a function in 'setupy.py' to get automatically the description from the package's docstring, but there is a problem when you import a module that has to be built by cython (because it

Re: Quoting quotes

2010-02-26 Thread Benjamin Kaplan
On Fri, Feb 26, 2010 at 7:29 AM, candide cand...@free.invalid wrote: Suppose you have to put into a Python string the following sentence : The play All's Well That Ends Well by Shakespeare It's easy do it : print The play All's Well That Ends Well by Shakespeare The play All's Well That

Re: (and about tests) Re: Pedantic pickling error after reload?

2010-02-26 Thread Diez B. Roggisch
at that point of comparison the module is already identical (klass = getattr(mod, name)) Ah, didn't know that context. even more corner-cases. Python's import-mechanism can sometimes be rather foot-shoot-prone. still don't see a real reason against the mere module+name comparison. same

Re: Quoting quotes

2010-02-26 Thread Steven D'Aprano
On Fri, 26 Feb 2010 13:29:04 +0100, candide wrote: But the first method doesn't run correctly : print The play All's Well That Ends Well File stdin, line 1 print The play All's Well That Ends Well ^ SyntaxError: EOL while scanning

[M2Crypto] Problems uploading to IIS using FTP over SSL

2010-02-26 Thread Stephen Nelson-Smith
Hello, System: # rpm -q python m2crypto python-2.4.3-27.el5 m2crypto-0.16-6.el5.6 # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.4 (Tikanga) I have the following method: def ftp_tarball(aggregation_dir, date_format, ftp_server, ftp_user, ftp_pass): date =

ANN: Leo 4.7.1 released

2010-02-26 Thread Edward K Ream
Leo 4.7.1 final is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo 4.7.1 fixes a dangerous bug in Leo 4.7. When converting file-like sentinels to thin-like sentinels in an external file, Leo now issues a warning and sets the corresponding @file

Re: Renaming identifiers debugging

2010-02-26 Thread Roald de Vries
Hi Luca, On Feb 26, 2010, at 12:41 AM, Luca wrote: MRAB wrote: Perhaps you could use a different extension, eg .pyn, so existing .py files are handled as-is but .pyn files are read through a translator. This could be a good idea... especially since i could make my own extension since we

PyCon 2011 - Call for Tutorial Volunteers

2010-02-26 Thread Greg Lindstrom
PyCon 2010 is complete and plans for PyCon 2011 in Atlanta have already begun! The main conference will once again be proceeded by two days of tutorials. There was quite a bit of feedback from students and teachers this year that we want to incorporate in next years classes. In order to do

ANN: python-ldap-2.3.11

2010-02-26 Thread Michael Ströder
Find a new release of python-ldap: http://www.python-ldap.org/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g.

Re: Challenge: escape from the pysandbox

2010-02-26 Thread Daniel Fetchinson
pysandbox is a new Python sandbox project Out of curiosity, the python sandbox behind google app engine is open source? If so, how is it different from your project, if not, anyone knows if it will be in the future? Cheers, Daniel -- Psss, psss, put it down! -

Possible to import from a cStringIO file object vs. file on disk?

2010-02-26 Thread python
Is it possible to import from a cStringIO file object (containing compiled byte code) vs. a physical file on disk? I'm thinking that this is possible, given Python's ability to import from zip files, but I'm not sure where to look next. Thank you, Malcolm --

Re: Docstrings considered too complicated

2010-02-26 Thread Jean-Michel Pichavant
Andreas Waldenburger wrote: On Thu, 25 Feb 2010 12:51:00 -0800 (PST) John Roth johnro...@gmail.com wrote: On Feb 24, 1:23 pm, Andreas Waldenburger use...@geekmail.invalid wrote: a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their

Re: Challenge: escape from the pysandbox

2010-02-26 Thread Victor Stinner
Le vendredi 26 février 2010 15:37:43, Daniel Fetchinson a écrit : pysandbox is a new Python sandbox project Out of curiosity, the python sandbox behind google app engine is open source? If so, how is it different from your project, if not, anyone knows if it will be in the future? I

Re: Quoting quotes

2010-02-26 Thread Grant Edwards
On 2010-02-26, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Fri, 26 Feb 2010 13:29:04 +0100, candide wrote: But the first method doesn't run correctly : print The play All's Well That Ends Well File stdin, line 1 print The play All's Well That Ends Well

Re: Docstrings considered too complicated

2010-02-26 Thread Tim Daneliuk
On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: Hi all, a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and it basically looks like this: Function that does stuff def doStuff(): while not wise(up): yield

Re: staticmethod and namespaces

2010-02-26 Thread darnzen
On Feb 26, 3:15 am, Diez B. Roggisch de...@nospam.web.de wrote: Am 26.02.10 06:07, schrieb darnzen: Having an odd problem that I solved, but wondering if its the best solution (seems like a bit of a hack). First off, I'm using an external DLL that requires static callbacks, but

Re: staticmethod and namespaces

2010-02-26 Thread Diez B. Roggisch
Am 26.02.10 16:32, schrieb darnzen: On Feb 26, 3:15 am, Diez B. Roggischde...@nospam.web.de wrote: Am 26.02.10 06:07, schrieb darnzen: Having an odd problem that I solved, but wondering if its the best solution (seems like a bit of a hack). First off, I'm using an external DLL that

Re: staticmethod and namespaces

2010-02-26 Thread darnzen
On Feb 26, 1:12 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 25 Feb 2010 21:07:55 -0800, darnzen wrote: Having an odd problem that I solved, but wondering if its the best solution (seems like a bit of a hack). First off, I'm using an external DLL that requires

Re: staticmethod and namespaces

2010-02-26 Thread darnzen
On Feb 26, 9:41 am, Diez B. Roggisch de...@nospam.web.de wrote: Am 26.02.10 16:32, schrieb darnzen: On Feb 26, 3:15 am, Diez B. Roggischde...@nospam.web.de  wrote: Am 26.02.10 06:07, schrieb darnzen: Having an odd problem that I solved, but wondering if its the best solution (seems

Offline windows registry access on *nix platforms.

2010-02-26 Thread r0g
Hi Everybody, I do a fair bit of programming in Python and I have to say I find perl a little intimidating right now as I don't have a lot of experience with it however its the only language I have found that seemed to have a library for what I need right now: Win32::Registry (or maybe

Re: staticmethod and namespaces

2010-02-26 Thread darnzen
On Feb 26, 9:41 am, Diez B. Roggisch de...@nospam.web.de wrote: Am 26.02.10 16:32, schrieb darnzen: On Feb 26, 3:15 am, Diez B. Roggischde...@nospam.web.de  wrote: Am 26.02.10 06:07, schrieb darnzen: Having an odd problem that I solved, but wondering if its the best solution (seems

Dictionary or Database—Please advise

2010-02-26 Thread Jeremy
I have lots of data that I currently store in dictionaries. However, the memory requirements are becoming a problem. I am considering using a database of some sorts instead, but I have never used them before. Would a database be more memory efficient than a dictionary? I also need platform

Re: Quoting quotes

2010-02-26 Thread William Lohrmann
On 26 Feb, 13:29, candide cand...@free.invalid wrote: Suppose you have to put into a Python string the following sentence : The play All's Well That Ends Well by Shakespeare It's easy do it : print The play All's Well That Ends Well by Shakespeare The play All's Well That Ends Well by

Re: staticmethod and namespaces

2010-02-26 Thread Diez B. Roggisch
Am 26.02.10 16:57, schrieb darnzen: On Feb 26, 9:41 am, Diez B. Roggischde...@nospam.web.de wrote: Am 26.02.10 16:32, schrieb darnzen: On Feb 26, 3:15 am, Diez B. Roggischde...@nospam.web.dewrote: Am 26.02.10 06:07, schrieb darnzen: Having an odd problem that I solved, but

Re: Dictionary or Database—Please advise

2010-02-26 Thread Benjamin Kaplan
On Fri, Feb 26, 2010 at 10:58 AM, Jeremy jlcon...@gmail.com wrote: I have lots of data that I currently store in dictionaries. However, the memory requirements are becoming a problem. I am considering using a database of some sorts instead, but I have never used them before. Would a

Re: Offline windows registry access on *nix platforms.

2010-02-26 Thread r0g
r0g wrote: Hi Everybody, I do a fair bit of programming in Python and I have to say I find perl a little intimidating right now as I don't have a lot of experience with it however its the only language I have found that seemed to have a library for what I need right now: Win32::Registry (or

Re: staticmethod and namespaces

2010-02-26 Thread Diez B. Roggisch
Am 26.02.10 17:08, schrieb Diez B. Roggisch: Am 26.02.10 16:57, schrieb darnzen: On Feb 26, 9:41 am, Diez B. Roggischde...@nospam.web.de wrote: Am 26.02.10 16:32, schrieb darnzen: On Feb 26, 3:15 am, Diez B. Roggischde...@nospam.web.de wrote: Am 26.02.10 06:07, schrieb darnzen:

Re: Dictionary or Database—Please advise

2010-02-26 Thread Chris Rebert
On Fri, Feb 26, 2010 at 7:58 AM, Jeremy jlcon...@gmail.com wrote: I have lots of data that I currently store in dictionaries.  However, the memory requirements are becoming a problem.  I am considering using a database of some sorts instead, but I have never used them before.  Would a database

Re: Dictionary or Database—Please advise

2010-02-26 Thread lbolla
On Feb 26, 3:58 pm, Jeremy jlcon...@gmail.com wrote: I have lots of data that I currently store in dictionaries.  However, the memory requirements are becoming a problem.  I am considering using a database of some sorts instead, but I have never used them before.  Would a database be more

Re: Docstrings considered too complicated

2010-02-26 Thread Andreas Waldenburger
On Fri, 26 Feb 2010 15:50:25 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Andreas Waldenburger wrote: And they use mixedCase function/method names. and ? whatIsTheProblem ? Thanks for proving my point. ;) No seriously though: Let it go. I wasn't being serious. As long as

Re: Docstrings considered too complicated

2010-02-26 Thread Andreas Waldenburger
On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk tun...@tundraware.com wrote: On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: [stuff] Reminiscent of: mov AX,BX ; Move the contents of BX into AX Well, there might be some confusion there as to what gets moved where,

Re: Dictionary or Database�Please advise

2010-02-26 Thread Roy Smith
In article 891a98fa-c398-455a-981f-bf72af772...@s36g2000prh.googlegroups.com, Jeremy jlcon...@gmail.com wrote: I have lots of data that I currently store in dictionaries. However, the memory requirements are becoming a problem. I am considering using a database of some sorts instead, but I

Re: Docstrings considered too complicated

2010-02-26 Thread Roy Smith
In article eq4l57-okf2@ozzie.tundraware.com, Tim Daneliuk tun...@tundraware.com wrote: On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: Hi all, a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and it basically looks

Re: Docstrings considered too complicated

2010-02-26 Thread Phlip
Andreas Waldenburger wrote: Function that does stuff def doStuff():     while not wise(up):         yield scorn Now my question is this: How do I kill these people without the authorities thinking they didn't deserve it? Their unit tests are just as complete, illustrative, and

Re: Possible to import from a cStringIO file object vs. file on disk?

2010-02-26 Thread Steve Holden
pyt...@bdurham.com wrote: Is it possible to import from a cStringIO file object (containing compiled byte code) vs. a physical file on disk? I'm thinking that this is possible, given Python's ability to import from zip files, but I'm not sure where to look next. Thank you, Malcolm

Re: Docstrings considered too complicated

2010-02-26 Thread Richard Brodie
Andreas Waldenburger use...@geekmail.invalid wrote in message news:20100226173907.55676...@geekmail.invalid... Reminiscent of: mov AX,BX ; Move the contents of BX into AX Well, there might be some confusion there as to what gets moved where, wouldn't you say? Depends on

Exception in pydoc

2010-02-26 Thread Ricardo Aráoz
I'm developing an in house app. Many coders here are not fluent in english, so docstrings must be in Spanish in spite of recommendations that docstrings better be in English. When I use accented characters (in this case an 'ó') in my docstrings I get : help('OpMejoraBizobj') Traceback (most

Re: Dictionary or Database—Please advise

2010-02-26 Thread Jeremy
On Feb 26, 9:29 am, Chris Rebert c...@rebertia.com wrote: On Fri, Feb 26, 2010 at 7:58 AM, Jeremy jlcon...@gmail.com wrote: I have lots of data that I currently store in dictionaries.  However, the memory requirements are becoming a problem.  I am considering using a database of some sorts

Re: Dictionary or Database_Please advise

2010-02-26 Thread D'Arcy J.M. Cain
On Fri, 26 Feb 2010 11:39:51 -0500 Roy Smith r...@panix.com wrote: Once you get into databases, platform independence will be an issue. There are many databases out there to pick from. If you want something which will work on a lot of platforms, a reasonable place to start looking is

Re: Dictionary or Database輝lease advise

2010-02-26 Thread km
Hi, Probably u should try couchdb! its a document oriented database. ( apache.couchdb.org) u can store your dictionaries as json documents and yes they are simple text files; data structures cna be directly stored into JSON documents. memory efficient too.. python module @

Re: Dictionary or Database—Please advise

2010-02-26 Thread mk
Jeremy wrote: I have lots of data that I currently store in dictionaries. However, the memory requirements are becoming a problem. I am considering using a database of some sorts instead, but I have never used them before. Would a database be more memory efficient than a dictionary? I also

Re: Dictionary or Database—Please advise

2010-02-26 Thread mk
Jeremy wrote: Shelve looks like an interesting option, but what might pose an issue is that I'm reading the data from a disk instead of memory. I didn't mention this in my original post, but I was hoping that by using a database it would be more memory efficient in storing data in RAM so I

Re: Docstrings considered too complicated

2010-02-26 Thread Jean-Michel Pichavant
Andreas Waldenburger wrote: On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk tun...@tundraware.com wrote: On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: [stuff] Reminiscent of: mov AX,BX ; Move the contents of BX into AX Well, there might be some

Re: Dictionary or Database_Please advise

2010-02-26 Thread mk
D'Arcy J.M. Cain wrote: Or PostgreSQL. It's free, runs on lots of platforms, has good Python support, and there's lots of people on the net who know it and are willing to give help and advice. In addition, it is a truly enterprise level, SQL standard, fully transactional database. Don't

Re: Docstrings considered too complicated

2010-02-26 Thread Jean-Michel Pichavant
Roy Smith wrote: In article eq4l57-okf2@ozzie.tundraware.com, Tim Daneliuk tun...@tundraware.com wrote: On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: Hi all, a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and

How to end TCP socket data while using readline()?

2010-02-26 Thread Arjun
Hi, I have a small script that runs a TCP server. A client connects to this server and transmits a stored file line-by-line, and then waits for a confirmation done. However, when I run them the first loop never really ends -- as the TCP server keeps expecting more data. I am using a

Re: Docstrings considered too complicated

2010-02-26 Thread mk
Roy Smith wrote: /** * Tracing facility. Writes the message to the specified output stream. * If output stream is NULL, writes the message to the process log. * * @param msg_id The message id to use for lookup. * @param ostrThe output stream. * @param p1 The first substition

SystemError: error return without exception set

2010-02-26 Thread Shailendra
Hi All, I am getting error in SystemError: error return without exception set which i am not able debug. I made following test program which gives same error. =test.py== import numpy class testClass: def __init__(self,param1=1,param2=2):

collections use __next__() in python 2.6?

2010-02-26 Thread Gary Robinson
The Python 2.6.4 docs for collections at http://docs.python.org/library/collections.html say that __next__() is an abstract method for the Iterable ABC. But my understanding is that __next__() isn't supposed to be used until Python 3. Also, I'm using the Mapping ABC, which inherits from

Re: When will Java go mainstream like Python?

2010-02-26 Thread John Nagle
Gregory Ewing wrote: Lawrence D'Oliveiro wrote: And then there’s caching. Modern CPUs owe most of their speed to assumptions that programs will obey locality of reference. Pointer-chasing is a cache- hostile activity. Another thing to consider is the rate at which garbage is created. Java's

Six Minutes and fourty two seconds

2010-02-26 Thread Tobiah
Now that I use python, this is the amount of time per day that I spend adding forgotten semicolons while debugging other languages. -- http://mail.python.org/mailman/listinfo/python-list

Re: lists of variables

2010-02-26 Thread Aahz
In article mailman.22.1266722722.4577.python-l...@python.org, Michael Pardee python-l...@open-sense.com wrote: I'm relatively new to python and I was very surprised by the following behavior: http://starship.python.net/crew/mwh/hacks/objectthink.html -- Aahz (a...@pythoncraft.com) *

Re: Six Minutes and fourty two seconds

2010-02-26 Thread Matt Nordhoff
Tobiah wrote: Now that I use python, this is the amount of time per day that I spend adding forgotten semicolons while debugging other languages. You can fix that by not using other languages. : -- Matt Nordhoff -- http://mail.python.org/mailman/listinfo/python-list

Re: SystemError: error return without exception set

2010-02-26 Thread MRAB
Shailendra wrote: Hi All, I am getting error in SystemError: error return without exception set which i am not able debug. I made following test program which gives same error. =test.py== import numpy class testClass: def __init__(self,param1=1,param2=2):

Re: Six Minutes and fourty two seconds

2010-02-26 Thread mk
Tobiah wrote: Now that I use python, this is the amount of time per day that I spend adding forgotten semicolons while debugging other languages. My objects are flat and I don't know who's Guido. I blame it all on Python. How about a PEP Let's make Python look like PHP? Regards, mk --

Re: How to end TCP socket data while using readline()?

2010-02-26 Thread MRAB
Arjun Chennu wrote: No need to flush because you're writing to a file and it'll be flushed anyway when you close it. True. I had introduced those flush lines while I was trying to troubleshoot this annoying situation. :-) You've closed the file view, but the underlying socket is

Re: Possible to import from a cStringIO file object vs. file on disk?

2010-02-26 Thread python
Steve, You'll need to write a custom importer. PEP 302 contains the necessary details. Thanks for pointing me to PEP 302 and the imp module. It looks like imp.load_compiled(name, pathname[, file]) is what I need, but the description of this method (and similar methods) has the following

Re: Is this secure?

2010-02-26 Thread Peter Pearson
On Wed, 24 Feb 2010 20:16:24 +0100, mk mrk...@gmail.com wrote: On 2010-02-24 20:01, Robert Kern wrote: I will repeat my advice to just use random.SystemRandom.choice() instead of trying to interpret the bytes from /dev/urandom directly. Out of curiosity: def gen_rand_string(length):

Re: collections use __next__() in python 2.6?

2010-02-26 Thread Raymond Hettinger
On Feb 26, 10:08 am, Gary Robinson gary...@me.com wrote: The Python 2.6.4 docs for collections athttp://docs.python.org/library/collections.htmlsay that __next__() is an abstract method for the Iterable ABC. But my understanding is that __next__() isn't supposed to be used until Python 3.

Re: Is this secure?

2010-02-26 Thread Peter Pearson
On Wed, 24 Feb 2010 21:02:07 +0100, mk mrk...@gmail.com wrote: [snip] rand_str_SystemRandom_seeding mean 3845.15384615 std dev 46.2016419186 l 3926 1.75 std devs away from mean y 3916 1.53 std devs away from mean d 3909 1.38 std devs away from mean a 3898 1.14 std devs away from mean p

Re: Dictionary or Database—Please advise

2010-02-26 Thread CM
On Feb 26, 10:58 am, Jeremy jlcon...@gmail.com wrote: I have lots of data How much is lots? that I currently store in dictionaries.  However, the memory requirements are becoming a problem.  I am considering using a database of some sorts instead, but I have never used them before.  Would a

Re: lists of variables

2010-02-26 Thread Alf P. Steinbach
* Michael Pardee: I'm relatively new to python and I was very surprised by the following behavior: a=1 b=2 'a' refers to an object representing the integer 1. Since 1 is an immutable value you can just as well think of it as 'a' containing the value 1, because a reference to an immutable

A more specific query ...

2010-02-26 Thread Gib Bogle
How can I interrogate Python to find out where it is looking to find the PyQt4 DLLs in a Windows installation? Secondarily, how is this search path set? -- http://mail.python.org/mailman/listinfo/python-list

any news from Python Magazine ?

2010-02-26 Thread OdarR
Seems rather late...: http://pythonmagazine.com/ We'll be back, better than ever, on January 26th, 2010. Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: Docstrings considered too complicated

2010-02-26 Thread Mel
Jean-Michel Pichavant wrote: Andreas Waldenburger wrote: On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk tun...@tundraware.com wrote: Reminiscent of: mov AX,BX ; Move the contents of BX into AX Well, there might be some confusion there as to what gets moved where, wouldn't

Re: Dictionary or Database—Please advise

2010-02-26 Thread Patrick Sabin
Shelve looks like an interesting option, but what might pose an issue is that I'm reading the data from a disk instead of memory. I didn't mention this in my original post, but I was hoping that by using a database it would be more memory efficient in storing data in RAM so I wouldn't have to

Re: Docstrings considered too complicated

2010-02-26 Thread Grant Edwards
On 2010-02-26, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Andreas Waldenburger wrote: On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk tun...@tundraware.com wrote: On 2/24/2010 2:23 PM, Andreas Waldenburger wrote: [stuff] Reminiscent of: mov AX,BX

  1   2   >