Scripy released

2010-01-28 Thread Joan Miller
Are you tired of bash scripting? http://pypi.python.org/pypi/Scripy http://bitbucket.org/ares/scripy/ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Re: myths about python 3

2010-01-28 Thread Stefan Behnel
Benjamin Kaplan, 27.01.2010 22:25: On Wed, Jan 27, 2010 at 3:56 PM, John Nagle na...@animats.com wrote: 2. Python 3 is supported by multiple Python implementations. FALSE - Only CPython supports 3.x. Iron Python, Unladen Swallow, PyPy, and Jython have all stayed with 2.x

Data exchange between Delphi and Python (Win)

2010-01-28 Thread Durumdara
Hi! I have an exotic db, with exotic drivers, and it have buggy ODBC driver. But I have native driver - under Delphi. I need to access this DB under Pylons (or mod_python). I wrote one solution that working with XML. But I search for easier way to transform and move data between apps. I saw

Re: Library support for Python 3.x

2010-01-28 Thread Ben Finney
David Cournapeau courn...@gmail.com writes: Unstable may be strong - every minor version of python has a lifespan of several years. But yes, that's an hindrance for packagers: you need to package binaries for every minor version of python It's important to note that this is mitigated,

Re: myths about python 3

2010-01-28 Thread Stefan Behnel
Ben Finney, 27.01.2010 22:50: Christian Heimes writes: John Nagle wrote: 1. Python 3 is supported by major Linux distributions. FALSE - most distros are shipping with Python 2.4, or 2.5 at best. You are wrong. Modern versions of Debian / Ubuntu are using Python 2.6. Only if by

Re: Library support for Python 3.x

2010-01-28 Thread Stefan Behnel
David Cournapeau, 28.01.2010 06:58: On Thu, Jan 28, 2010 at 7:38 AM, Terry Reedy wrote: For a windows user who depends on pre-built binaries, every new release breaks *every* library that is not pure Python and needs to be compiled. That's not windows specific - most packages which

Re: python 3's adoption

2010-01-28 Thread Paul Rubin
Jonathan Gardner jgard...@jonathangardner.net writes: If you're going to have statements, you're going to need the null statement. That's pass. Why? Expressions are statements, so you could just say pass (in quotes, denoting a string literal), or 0, or None, os anything else like that, instead

Re: myths about python 3

2010-01-28 Thread Paul Rubin
Stefan Behnel stefan...@behnel.de writes: The amount of work that the Jython project put into catching up from 2.1 to 2.5/6 (new style classes! generators!) is really humongous compared to the adaptations that an implementation needs to do to support Python 3 code. I wonder whether Jython

Re: Library support for Python 3.x

2010-01-28 Thread David Cournapeau
On Thu, Jan 28, 2010 at 5:08 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: It's important to note that this is mitigated, ironically enough, by intentionally targeting a minimum Python minor version because the code base makes use of Python features not available in older versions. That

Re: Library support for Python 3.x

2010-01-28 Thread David Cournapeau
On Thu, Jan 28, 2010 at 5:40 PM, Stefan Behnel stefan...@behnel.de wrote: That doesn't completely match my experience. It's true that there is no guarantee that the ABI will stay compatible, but when you compile lxml against Py2.4 on a 32bit machine, it will continue to import in Py2.5 and

Re: python 3's adoption

2010-01-28 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 27 Jan 2010 18:29:25 +0100, Alf P. Steinbach wrote: The main problem with the incompatibility is for porting code, not for writing code from scratch. Correct. It's a trivial problem, but still a problem. It's also a problem wrt. learning the language. This

Re: Library support for Python 3.x

2010-01-28 Thread Stefan Behnel
David Cournapeau, 28.01.2010 09:54: On Thu, Jan 28, 2010 at 5:40 PM, Stefan Behnel wrote: That doesn't completely match my experience. It's true that there is no guarantee that the ABI will stay compatible, but when you compile lxml against Py2.4 on a 32bit machine, it will continue to

Re: Library support for Python 3.x

2010-01-28 Thread Paul Rubin
David Cournapeau courn...@gmail.com writes: So yes, you could say just try and if it crashes, check that it is not ABI-related. In practice, this is very poor engineering in my book... I just looked at PEP 384 and I don't see anything in it about version numbers in the interfaces. I certainly

Re: Ad hoc lists vs ad hoc tuples

2010-01-28 Thread Duncan Booth
Terry Reedy tjre...@udel.edu wrote: Constant tuples (a tuple whose members are all seen as constants by the compiler) are now pre-compiled and constructed once and put into the code object as such rather than re-constructed with each run of the code. Sadly that's not entirely accurate.

Re: python 3's adoption

2010-01-28 Thread Luis M . González
Please don't post more noise and ad hominem attacks to the group, Steve. Ad hominem? Please, operor non utor lingua non notus per vulgaris populus. Gratias ago vos... -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3's adoption

2010-01-28 Thread Gib Bogle
Luis M. González wrote: Please don't post more noise and ad hominem attacks to the group, Steve. Ad hominem? Please, operor non utor lingua non notus per vulgaris populus. Gratias ago vos... ad hominem is lingua notus per vulgaris populus, the vulgar pop of these parts, anyway. --

Re: Total maximal size of data

2010-01-28 Thread denis
On Jan 25, 8:05 pm, Alexander Moibenko moibe...@fnal.gov wrote: I have a simple question to which I could not find an answer. What is the [total maximal] size of list including size of its elements? Beware, sys.getsizeof(alist) is 4*len(alist) + a bit, regardless of alists's contents ?! See

Re: List weirdness - what the heck is going on here?

2010-01-28 Thread Rotwang
Owen Jacobson wrote: On 2010-01-27 21:06:28 -0500, Rotwang sg...@hotmail.co.uk said: Hi all, I've been trying to make a class with which to manipulate sound data, and have run into some behaviour I don't understand which I hope somebody here can explain. The class has an attribute called

interaction of mode 'r+', file.write(), and file.tell(): a bug or undefined behavior?

2010-01-28 Thread Lie Ryan
In the code: f = open('input.txt', 'r+') for line in f: s = line.replace('python', 'PYTHON') # f.tell() f.write(s) When f.tell() is commented, 'input.txt' does not change; but when uncommented, the f.write() succeeded writing into the 'input.txt' (surprisingly, but not entirely

is there any alternative to savefig?

2010-01-28 Thread kiwanuka
Hi all, I wonder if anyone knows any alternative function in pylab (or otherwise) that could be used to save an image. My problem is as follows: --- from pylab import * ... figure(1) fig1 = gca() figure(2) fig2 = gca() figure(3) fig3 = gca() for i,data_file in

Re: Library support for Python 3.x

2010-01-28 Thread Daniel Fetchinson
I'm going to be starting some new Python projects in Python 2.6, but am concerned that at least three of the libraries I will be using--pycrypto, paramiko and feedparser--are not currently supported in Python 3.x. The authors of these programs have not given any indication that work is

Re: Generic proxy (that proxies methods like __iter__)

2010-01-28 Thread D HANNEY
On Jan 27, 3:07 pm, Arnaud Delobelle arno...@googlemail.com wrote: On 27 Jan, 14:41, D HANNEY spam2...@nney.com wrote: [...] See [1] for an explanation.  Here is an idea: you could get round that by generating a class on the fly, if you don't mind changing the class of the object (untested):

Re: Stuck on a three word street name regex

2010-01-28 Thread Brian D
[snip] Regex doesn't gain you much. I'd split the string and then fix the parts as necessary:   def parse_address(address): ...     parts = address.split() ...     if parts[-2] == S: ...         parts[1 : -1] = [parts[-2]] + parts[1 : -2] ...     parts[1 : -1] = [ .join(parts[1 :

Re: Stuck on a three word street name regex

2010-01-28 Thread Brian D
On Jan 28, 7:40 am, Brian D brianden...@gmail.com wrote: [snip] Regex doesn't gain you much. I'd split the string and then fix the parts as necessary:   def parse_address(address): ...     parts = address.split() ...     if parts[-2] == S: ...         parts[1 : -1] =

Re: Generic proxy (that proxies methods like __iter__)

2010-01-28 Thread D HANNEY
On Jan 28, 1:31 pm, D HANNEY spam2...@nney.com wrote: Your solution works if I change type(obj) to say obj.__class__. If I don't make this change Python complains TypeError: Error when calling the metaclass bases type 'instance' is not an acceptable base type. So, I've got something that

Re: Portable way to tell if a process is still alive

2010-01-28 Thread Laszlo Nagy
Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like to know if a process (given with its process id) is

Re: Stuck on a three word street name regex

2010-01-28 Thread Lie Ryan
On 01/28/10 11:28, Brian D wrote: I've tackled this kind of problem before by looping through a patterns dictionary, but there must be a smarter approach. Two addresses. Note that the first has incorrectly transposed the direction and street name. The second has an extra space in it before

Re: Portable way to tell if a process is still alive

2010-01-28 Thread exarkun
On 10:50 am, gand...@shopzeus.com wrote: Suppose we have a program that writes its process id into a pid file. Usually the program deletes the pid file when it exists... But in some cases (for example, killed with kill -9 or TerminateProcess) pid file is left there. I would like to know if a

Re: interaction of mode 'r+', file.write(), and file.tell(): a bug or undefined behavior?

2010-01-28 Thread Anthony Tolle
On Jan 28, 7:12 am, Lie Ryan lie.1...@gmail.com wrote: In the code: f = open('input.txt', 'r+') for line in f:     s = line.replace('python', 'PYTHON')     # f.tell()     f.write(s) [snip] My guess is that there are a few possible problems: 1) In this case, writing to file opened

Re: interaction of mode 'r+', file.write(), and file.tell(): a bug or undefined behavior?

2010-01-28 Thread Alf P. Steinbach
* Anthony Tolle: On Jan 28, 7:12 am, Lie Ryan lie.1...@gmail.com wrote: In the code: f = open('input.txt', 'r+') for line in f: s = line.replace('python', 'PYTHON') # f.tell() f.write(s) [snip] My guess is that there are a few possible problems: 1) In this case, writing to

Need help with a program

2010-01-28 Thread evilweasel
Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA 0 AGATAAGCTAATTAAGCTACTGG 0 AGATAAGCTAATTAAGCTACTGGGTT 1

Re: Need help with a program

2010-01-28 Thread Alf P. Steinbach
* evilweasel: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA 0 AGATAAGCTAATTAAGCTACTGG 0 AGATAAGCTAATTAAGCTACTGGGTT 1

Re: Need help with a program

2010-01-28 Thread Mark Dickinson
On Jan 28, 3:07 pm, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. snip for j in range(0, b):     if lister[j] == 0: At a guess, this line should be: if lister[j] == '0':

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:07 PM, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA   0

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:28 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Thu, Jan 28, 2010 at 4:07 PM, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I

Re: Need help with a program

2010-01-28 Thread D'Arcy J.M. Cain
On Thu, 28 Jan 2010 07:07:04 -0800 (PST) evilweasel karthikramaswam...@gmail.com wrote: I am a newbie to python, and I would be grateful if someone could Welcome. point out the mistake in my program. Basically, I have a huge text file similar to the format below: You don't say how it isn't

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:31 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Thu, Jan 28, 2010 at 4:28 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Thu, Jan 28, 2010 at 4:07 PM, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I

Re: is there any alternative to savefig?

2010-01-28 Thread kiwanuka
On Jan 28, 12:29 pm, kiwanuka robert.kiwan...@gmail.com wrote: Hi all, I wonder if anyone knows any alternative function in pylab (or otherwise) that could be used to save an image. My problem is as follows: --- from pylab import * ... figure(1) fig1 = gca() figure(2)

Re: is there any alternative to savefig?

2010-01-28 Thread Alf P. Steinbach
* kiwanuka: On Jan 28, 12:29 pm, kiwanuka robert.kiwan...@gmail.com wrote: Hi all, I wonder if anyone knows any alternative function in pylab (or otherwise) that could be used to save an image. My problem is as follows: --- from pylab import * ... figure(1) fig1 = gca() figure(2)

Re: Need help with a program

2010-01-28 Thread evilweasel
I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been found in a particular sample). So, I would need to ignore the ones

Re: Symbols as parameters?

2010-01-28 Thread Roald de Vries
On Jan 22, 2010, at 11:56 AM, Roald de Vries wrote: Hi Martin, On Jan 21, 2010, at 8:43 AM, Martin Drautzburg wrote: Hello all, When passing parameters to a function, you sometimes need a paramter which can only assume certain values, e.g. def move (direction): ... If

Re: python 3's adoption

2010-01-28 Thread Mitchell L Model
I have been working with Python 3 for over a year. I used it in writing my book Bioinformatics Programming Using Python (http://oreilly.com/catalog/9780596154509 ). I didn't see any point in teaching an incompatible earlier version of a language in transition. In preparing the book and its

Re: myths about python 3

2010-01-28 Thread Aahz
In article pan.2010.01.28.00.35...@remove.this.cybersource.com.au, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Wed, 27 Jan 2010 16:25:46 -0500, Benjamin Kaplan wrote: When Python 2.6 came out, Jython was still on 2.2. The difference between 2.2 and 2.6 is almost as big of a

Good Book

2010-01-28 Thread talal awadh
Many people who want to learn Islam or are new converts find it hard to have a simplified guide that explains to them the basics of Islam in a nutshell; so I decided to collect the basic guidelines and gather them in an e-book I named it Basic Islam for Introducing Islam

Re: python 3's adoption

2010-01-28 Thread Roy Smith
In article mailman.1545.1264694607.28905.python-l...@python.org, Mitchell L Model mlm...@comcast.net wrote: I use the sep and end keywords all the time. What are 'sep' and 'end'? I'm looking in http://docs.python.org/3.1/genindex-all.html and don't see those mentioned at all. Am I just

Re: myths about python 3

2010-01-28 Thread Aahz
In article zt68n.3893$pv.1...@news-server.bigpond.net.au, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: Carl Banks: There is also no hope someone will fork Python 2.x and continue it in perpetuity. Well, someone might try to fork it, but they won't be able to call it Python. Over

Re: Need help with a program

2010-01-28 Thread nn
On Jan 28, 10:50 am, evilweasel karthikramaswam...@gmail.com wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been

Re: python 3's adoption

2010-01-28 Thread Alf P. Steinbach
* Roy Smith: In article mailman.1545.1264694607.28905.python-l...@python.org, Mitchell L Model mlm...@comcast.net wrote: I use the sep and end keywords all the time. What are 'sep' and 'end'? I'm looking in http://docs.python.org/3.1/genindex-all.html and don't see those mentioned at

Re: Good Book

2010-01-28 Thread J
On Thu, Jan 28, 2010 at 11:09, talal awadh allah...@gmail.com wrote: Many people who want to learn Islam or are new converts find it hard I just wanted to thank you for reminding me that I needed to write a mail filter to delete this kind of drivel. I appreciate the reminder! Cheers, Jeff --

Re: python 3's adoption

2010-01-28 Thread Lie Ryan
On 01/28/10 19:37, Paul Rubin wrote: Jonathan Gardner jgard...@jonathangardner.net writes: If you're going to have statements, you're going to need the null statement. That's pass. Why? Expressions are statements, so you could just say pass (in quotes, denoting a string literal), or 0, or

RE: myths about python 3

2010-01-28 Thread Dino Viehland
Stefan wrote: From an implementors point of view, it's actually quite the opposite. Most syntax features of Python 3 can be easily implemented on top of an existing Py2 Implementation (we have most of them in Cython already, and I really found them fun to write), and the shifting-around in the

Re: myths about python 3

2010-01-28 Thread Antoine Pitrou
Le Thu, 28 Jan 2010 00:19:24 +, Steven D'Aprano a écrit : 4. Python 3 will make you irresistible to women. FALSE - Python 3 coders are no more likely to get a date than any other programmer. They spend less time coding, so they /can/ get more dates (what a strange English word)

Re: python 3's adoption

2010-01-28 Thread Lie Ryan
On 01/28/10 20:12, Alf P. Steinbach wrote: * Steven D'Aprano: On Wed, 27 Jan 2010 18:29:25 +0100, Alf P. Steinbach wrote: Instead of: print fileObj, x, y, z you use regular function syntax with a meaningful keyword: print(x, y, z, file=fileObj) If you want suppress the newline at the

Re: myths about python 3

2010-01-28 Thread Antoine Pitrou
Le Wed, 27 Jan 2010 17:36:29 -0800, alex23 a écrit : I've been a big supporter of Py3 from the beginning, but this repeated claim of US becoming the mainline interpreter for 3.x pretty much kills dead a lot of my interest. As long as the U-S JIT can be disabled at compile-time (and also at

Re: Need help with a program

2010-01-28 Thread Arnaud Delobelle
nn prueba...@latinmail.com writes: On Jan 28, 10:50 am, evilweasel karthikramaswam...@gmail.com wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the

Re: Need help with a program

2010-01-28 Thread John Posner
On 1/28/2010 10:50 AM, evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been found in a particular sample).

Re: Stuck on a three word street name regex

2010-01-28 Thread Brian D
Correction: [snip] the expression parts[1 : -1] means gather list items from the second element in the list (index value 1) to one index position before the end of the list. [snip] MRAB's solution was deserving of a more complete solution: def parse_address(address): # Handles

Re: python 3's adoption

2010-01-28 Thread Alf P. Steinbach
* Lie Ryan: On 01/28/10 20:12, Alf P. Steinbach wrote: import builtins org_print = print builtins.print = 666 print( trallala ) Traceback (most recent call last): File stdin, line 1, in module TypeError: 'int' object is not callable org_print( but is that really so

Re: Stuck on a three word street name regex

2010-01-28 Thread Brian D
On Jan 28, 8:27 am, Lie Ryan lie.1...@gmail.com wrote: On 01/28/10 11:28, Brian D wrote: I've tackled this kind of problem before by looping through a patterns dictionary, but there must be a smarter approach. Two addresses. Note that the first has incorrectly transposed the direction

Re: Need help with a program

2010-01-28 Thread D'Arcy J.M. Cain
On Thu, 28 Jan 2010 18:49:02 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Using regexp may increase readability (if you are familiar with it). If you have a problem and you think that regular expressions are the solution then now you have two problems. Regex is really overkill for

Re: Library support for Python 3.x

2010-01-28 Thread Terry Reedy
On 1/28/2010 1:37 AM, Paul Rubin wrote: David Cournapeaucourn...@gmail.com writes: That's not windows specific - most packages which distribute binary packages need to package binaries for every minor version (2.4, 2.5, etc...) I doubt that's what Paul was referring to, though - he seemed

Re: Need help with a program

2010-01-28 Thread Jean-Michel Pichavant
evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been found in a particular sample). So, I would need to

Re: python 3's adoption

2010-01-28 Thread Terry Reedy
On 1/28/2010 3:37 AM, Paul Rubin wrote: Jonathan Gardnerjgard...@jonathangardner.net writes: If you're going to have statements, you're going to need the null statement. That's pass. Why? Expressions are statements, so you could just say pass (in quotes, denoting a string literal), or 0, or

Re: Need help with a program

2010-01-28 Thread Jean-Michel Pichavant
D'Arcy J.M. Cain wrote: On Thu, 28 Jan 2010 18:49:02 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Using regexp may increase readability (if you are familiar with it). If you have a problem and you think that regular expressions are the solution then now you have two

Wrap a function

2010-01-28 Thread Joan Miller
I've to call to many functions with the format: run(cmd) were cmd is a command with its arguments to pass them to the shell and run it, i.e. run(pwd) or run(ls /home) Does anybody knows any library to help me to avoid the use of the main quotes, and brackets? I would to use anything as:

Re: myths about python 3

2010-01-28 Thread Carl Banks
On Jan 28, 8:10 am, a...@pythoncraft.com (Aahz) wrote: In article zt68n.3893$pv.1...@news-server.bigpond.net.au, Neil Hodgson  nyamatongwe+thun...@gmail.com wrote: Carl Banks: There is also no hope someone will fork Python 2.x and continue it in perpetuity.  Well, someone might try to

Why doesn't filterwarnings suppress this message?

2010-01-28 Thread John Nagle
Feedparser isn't supported for Python 3.0, so in Python 2.6, many warning messages appear. I'm trying, in Python 2.6, to suppress the warning message: ./feedparser\feedparser.py:69: DeprecationWarning: the sgmllib module has been removed in Python 3.0 import sgmllib,

Re: Need help with a program

2010-01-28 Thread Steven Howe
On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been

Re: python 3's adoption

2010-01-28 Thread Terry Reedy
On 1/28/2010 11:03 AM, Mitchell L Model wrote: I have been working with Python 3 for over a year. I used it in writing my book Bioinformatics Programming Using Python (http://oreilly.com/catalog/9780596154509). I didn't see any point in teaching an incompatible earlier version of a language in

Re: Need help with a program

2010-01-28 Thread Mensanator
On Jan 28, 12:28 pm, Steven Howe howe.ste...@gmail.com wrote: On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to

Re: Why doesn't filterwarnings suppress this message?

2010-01-28 Thread Peter Otten
John Nagle wrote: Feedparser isn't supported for Python 3.0, so in Python 2.6, many warning messages appear. I'm trying, in Python 2.6, to suppress the warning message: ./feedparser\feedparser.py:69: DeprecationWarning: the sgmllib module has been removed in Python 3.0 import

Re: Wrap a function

2010-01-28 Thread Josh Holland
On 2010-01-28, Joan Miller pelok...@gmail.com wrote: I've to call to many functions with the format: run(cmd) Check the docs on os.system(). -- Josh dutchie Holland j...@joshh.co.uk http://www.joshh.co.uk/ http://twitter.com/jshholland http://identi.ca/jshholland --

Great example of a python module/package following up to date conventions.

2010-01-28 Thread Big Stu
I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together. I'm hoping for example code that demonstrates: -Strict adherence to PEP 8 -thorough use of Docstrings -Conventional directory structure/package layout -Appropriate use

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 19:16, Josh Holland j...@joshh.co.uk wrote: On 2010-01-28, Joan Miller pelok...@gmail.com wrote: I've to call to many functions with the format: run(cmd) Check the docs on os.system(). No. I've a function that uses subprocess to run commands on the same shell and so substitute

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Josh Holland
On 2010-01-28, Big Stu stu.dohe...@gmail.com wrote: I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together. I'm hoping for example code that demonstrates: Surely most of the Standard Library should satisfy all your

Re: python 3's adoption

2010-01-28 Thread Fencer
On 2010-01-28 17:03, Mitchell L Model wrote: I have been working with Python 3 for over a year. I used it in writing my book Bioinformatics Programming Using Python (http://oreilly.com/catalog/9780596154509). That book sounds very interesting, even though I am more interested in the

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread exarkun
On 07:28 pm, j...@joshh.co.uk wrote: On 2010-01-28, Big Stu stu.dohe...@gmail.com wrote: I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together. I'm hoping for example code that demonstrates: Surely most of the Standard

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Big Stu
On Jan 28, 2:28 pm, Josh Holland j...@joshh.co.uk wrote: On 2010-01-28, Big Stu stu.dohe...@gmail.com wrote: I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together.  I'm hoping for example code that demonstrates:

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Joan Miller
On 28 ene, 19:17, Big Stu stu.dohe...@gmail.com wrote: I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together.  I'm hoping for example code that demonstrates: -Strict adherence to PEP 8 -thorough use of Docstrings

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Josh Holland
On 2010-01-28, exar...@twistedmatrix.com exar...@twistedmatrix.com wrote: Have you actually looked at any of the standard library? Not recently or in depth, no. I would have thought that it would be of high quality. I must have been mistaken. -- Josh dutchie Holland j...@joshh.co.uk

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread Big Stu
Have you actually looked at any of the standard library? Jean-Paul I'm looking at urllib2 right now and it is covering a bunch of the bases I'm looking for. And grepping in the /usr/lib/python2.5/ folder for import statements on various things I'm interested in is bringing up some good

Re: myths about python 3

2010-01-28 Thread Steve Holden
Carl Banks wrote: On Jan 28, 8:10 am, a...@pythoncraft.com (Aahz) wrote: In article zt68n.3893$pv.1...@news-server.bigpond.net.au, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: Carl Banks: There is also no hope someone will fork Python 2.x and continue it in perpetuity. Well, someone

Re: Wrap a function

2010-01-28 Thread Steve Holden
Joan Miller wrote: On 28 ene, 19:16, Josh Holland j...@joshh.co.uk wrote: On 2010-01-28, Joan Miller pelok...@gmail.com wrote: I've to call to many functions with the format: run(cmd) Check the docs on os.system(). No. I've a function that uses subprocess to run commands on the same shell

Why am I getting this Error message

2010-01-28 Thread Ray Holt
Why am I getting the following error message. Area has been declared as an attribute of Circle. Thanks, Ray class Circle: def __init__(self): self.radius = 1 def area(self): return self.radius * self.radius * 3.14159 c = Circle() c.radius = 3 print c.area() Traceback (most

Re: Need help with a program

2010-01-28 Thread MRAB
Steven Howe wrote: On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times

Re: Wrap a function

2010-01-28 Thread John Posner
On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandj...@joshh.co.uk wrote: On 2010-01-28, Joan Millerpelok...@gmail.com wrote: I've to call to many functions with the format: run(cmd) Check the docs on os.system(). No. I've a function that uses subprocess to run

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 19:54, Steve Holden st...@holdenweb.com wrote: Joan Miller wrote: On 28 ene, 19:16, Josh Holland j...@joshh.co.uk wrote: On 2010-01-28, Joan Miller pelok...@gmail.com wrote: I've to call to many functions with the format: run(cmd) Check the docs on os.system(). No. I've a

Re: Great example of a python module/package following up to date conventions.

2010-01-28 Thread exarkun
On 07:49 pm, stu.dohe...@gmail.com wrote: Have you actually looked at any of the standard library? Jean-Paul I'm looking at urllib2 right now and it is covering a bunch of the bases I'm looking for. And grepping in the /usr/lib/python2.5/ folder for import statements on various things I'm

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 19:58, John Posner jjpos...@optimum.net wrote: On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandj...@joshh.co.uk  wrote: On 2010-01-28, Joan Millerpelok...@gmail.com  wrote: I've to call to many functions with the format: run(cmd) Check the docs on

Re: Why am I getting this Error message

2010-01-28 Thread Chris Rebert
On Thu, Jan 28, 2010 at 11:57 AM, Ray Holt mrhol...@sbcglobal.net wrote: Why am I getting the following error message. Area has been declared as an attribute of Circle. Thanks, Ray class Circle:  def __init__(self): self.radius = 1  def area(self): return self.radius *

Re: Wrap a function

2010-01-28 Thread Sean DiZazzo
On Jan 28, 12:13 pm, Joan Miller pelok...@gmail.com wrote: On 28 ene, 19:58, John Posner jjpos...@optimum.net wrote: On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandj...@joshh.co.uk  wrote: On 2010-01-28, Joan Millerpelok...@gmail.com  wrote: I've to call to

Re: Wrap a function

2010-01-28 Thread Peter
On Jan 29, 6:58 am, John Posner jjpos...@optimum.net wrote: On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandj...@joshh.co.uk  wrote: On 2010-01-28, Joan Millerpelok...@gmail.com  wrote: I've to call to many functions with the format: run(cmd) Check the docs on

Re: Why am I getting this Error message

2010-01-28 Thread Steve Holden
Ray Holt wrote: Why am I getting the following error message. Area has been declared as an attribute of Circle. Thanks, Ray class Circle: def __init__(self): self.radius = 1 def area(self): return self.radius * self.radius * 3.14159 c = Circle() c.radius = 3 print

Re: Why am I getting this Error message

2010-01-28 Thread MRAB
Ray Holt wrote: Why am I getting the following error message. Area has been declared as an attribute of Circle. Thanks, Ray class Circle: def __init__(self): self.radius = 1 def area(self): return self.radius * self.radius * 3.14159 c = Circle() c.radius = 3 print c.area()

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 20:20, Peter peter.milli...@gmail.com wrote: On Jan 29, 6:58 am, John Posner jjpos...@optimum.net wrote: On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandj...@joshh.co.uk  wrote: On 2010-01-28, Joan Millerpelok...@gmail.com  wrote: I've to call to

Re: Wrap a function

2010-01-28 Thread Joan Miller
On 28 ene, 20:34, Joan Miller pelok...@gmail.com wrote: On 28 ene, 20:20, Peter peter.milli...@gmail.com wrote: On Jan 29, 6:58 am, John Posner jjpos...@optimum.net wrote: On 1/28/2010 2:24 PM, Joan Miller wrote: On 28 ene, 19:16, Josh Hollandj...@joshh.co.uk  wrote: On

mix statically typed with dynamically typed

2010-01-28 Thread Yingjie Lan
We all know that Python is dynamically typed, and dynamically typed languages are generally slower than statically typed ones. I wonder if it is possible at all for Python to mix statically-typed-ness with dynamically-typed-ness to boost up its speed a little bit, especially when speed is

Re: myths about python 3

2010-01-28 Thread Terry Reedy
On 1/28/2010 2:51 PM, Steve Holden wrote: Carl Banks wrote: Regardless of how magnaminous the people of PSF are, the unfortunate reality is that trademark owners are forced by the law to be particularly petty. PSF's IP lawyer will advise not to allow unsanctioned fork of Python 2.7 to call

Re: Need help with a program

2010-01-28 Thread nn
Arnaud Delobelle wrote: nn prueba...@latinmail.com writes: On Jan 28, 10:50 am, evilweasel karthikramaswam...@gmail.com wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the

Re: myths about python 3

2010-01-28 Thread Ethan Furman
Steven D'Aprano wrote: 4. Python 3 will make you irresistible to women. FALSE What?!? Drat!!! Guess I'll have to learn Lisp... ;) ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >