[RELEASED] Python 3.2 rc 3

2011-02-14 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the third release candidate of Python 3.2. Python 3.2 is a continuation of the efforts to improve and stabilize the Python 3.x line. Since the final release of Python 2.7, the 2.x line

[ANN] Leipzig Python User Group - Meeting, February 15, 2011, 08:00pm

2011-02-14 Thread Mike Müller
=== Leipzig Python User Group === We will meet on Tuesday, February 15 at 8:00 pm at the training center of Python Academy in Leipzig, Germany ( http://www.python-academy.com/center/find.html ). Everybody who uses Python, plans to do so or is interested in learning more about the language is

Release of faulthandler 1.4

2011-02-14 Thread Victor Stinner
faulthandler is a module to display the Python backtrace on a fatal error (eg. segfault), after a delay (eg. 60 minutes) or when a user signal is send (eg. SIGUSR1). Changes of the version 1.4: * Add register() and unregister() functions * Add optional all_threads argument to enable() * Limit

Re: Class or Dictionary?

2011-02-14 Thread Terry Reedy
On 2/13/2011 8:33 PM, Martin De Kauwe wrote: Cool! Thanks this seems straight forward, however if I do it this way then once I change it (i.e. after reading user param file) I can't pass the changed version to another module can i? Or am I being stupid? Unless I do it my way I think import

Re: Class or Dictionary?

2011-02-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: On Feb 14, 12:02 pm, Terry Reedytjre...@udel.edu wrote: snip Cool! Thanks this seems straight forward, however if I do it this way then once I change it (i.e. after reading user param file) I can't pass the changed version to another module

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 7:12 pm, Terry Reedy tjre...@udel.edu wrote: On 2/13/2011 8:33 PM, Martin De Kauwe wrote: Cool! Thanks this seems straight forward, however if I do it this way then once I change it (i.e. after reading user param file) I can't pass the changed version to another module can i? Or

Re: files,folders,paths

2011-02-14 Thread ecu_jon
i think i got it. my dirlist wasn't the right way to go, i needed to iterate thu what oswalk was giving me in dirs, and files. not bruteforce strip to a string. i have been starting at an early version and a later version for the last 4 hours or so, and i think i have it this only handles the

Re: files,folders,paths

2011-02-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: this is a reply to both Dave Angel and Ben Finney. this version of testing i think incorperates what you guys are saying. a href=http://thanksforallthefish.endofinternet.net/ testing1.pytestin1.py/a except maybe the os.join.path in the last function.

Re: Re: Class or Dictionary?

2011-02-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: snip from other_model import OtherSubModel class Model: def __init__(self): # included other external modules (i.e. in other files) om =therSubModel() def run(self): # call other submodel and pass params

Re: files,folders,paths

2011-02-14 Thread ecu_jon
On Feb 14, 4:43 am, Dave Angel da...@ieee.org wrote: On 01/-10/-28163 02:59 PM, ecu_jon wrote: this is a reply to both Dave Angel and Ben Finney. this version of testing i think incorperates what you guys are saying. a href=http://thanksforallthefish.endofinternet.net/

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 8:51 pm, Dave Angel da...@ieee.org wrote: On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: snip from other_model import OtherSubModel class Model:      def __init__(self):          # included other external modules (i.e. in other files)          om =therSubModel()  

Re: files,folders,paths

2011-02-14 Thread ecu_jon
On Feb 14, 4:43 am, Dave Angel da...@ieee.org wrote: On 01/-10/-28163 02:59 PM, ecu_jon wrote: this is a reply to both Dave Angel and Ben Finney. this version of testing i think incorperates what you guys are saying. a href=http://thanksforallthefish.endofinternet.net/

Re: How to create a dict based on such a file?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 6:10 pm, aspineux aspin...@gmail.com wrote: On 14 fév, 06:47, Wang Coeus wangco...@gmail.com wrote: Hi all, I am new to python. Currently I encountered a problem, please help me to solve this. Thanks in advance! I have a file like below: ConfigParser Library does exacly what

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 8:57 pm, Martin De Kauwe mdeka...@gmail.com wrote: On Feb 14, 8:51 pm, Dave Angel da...@ieee.org wrote: On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: snip from other_model import OtherSubModel class Model:      def __init__(self):          # included other

Re: multiprocessing more

2011-02-14 Thread Andrea Crotti
On Feb 14, 12:14 am, Adam Skutt ask...@gmail.com wrote: On Feb 13, 12:34 pm, Andrea Crotti andrea.crott...@gmail.com wrote: First of all, does it make sense to use multiprocessing and a short value as boolean to check if the simulation is over or not? Maybe, but without knowing exactly

Re: Call to Update All Tutorials to Python3.x Standards.

2011-02-14 Thread flebber
On Feb 14, 11:35 am, Cameron Simpson c...@zip.com.au wrote: On 13Feb2011 14:47, rantingrick rantingr...@gmail.com wrote: | On Feb 13, 4:30 pm, Steven D'Aprano steve| +comp.lang.pyt...@pearwood.info wrote: | The official stance of the Python development team is that 2.7 and 3.x | will

Re: multiprocessing more

2011-02-14 Thread Adam Skutt
On Feb 14, 5:33 am, Andrea Crotti andrea.crott...@gmail.com wrote: Well the other possibility that I had in mind was to spawn the very long process in an asynchronous way, but then I still have the problem to notify the rest of the program that the simulation is over. Is there a way to have

Re: [python-committers] [RELEASED] Python 3.2 rc 3

2011-02-14 Thread Mark Summerfield
On Mon, 14 Feb 2011 07:40:00 +0100 Georg Brandl ge...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the third release candidate of Python 3.2. Python 3.2 is a continuation of the efforts to improve and

Re: EPD 7.0 released

2011-02-14 Thread sturlamolden
On 14 Feb, 01:50, Robert Kern robert.k...@gmail.com wrote: I'd just like to jump in here to clear up this last statement as an Enthought employee. While Enthought and its employees do contribute to the development of numpy and scipy in various ways (and paying us money is a great way to let

Re: EPD 7.0 released

2011-02-14 Thread Colin J. Williams
On 14-Feb-11 06:59 AM, sturlamolden wrote: On 14 Feb, 01:50, Robert Kernrobert.k...@gmail.com wrote: I'd just like to jump in here to clear up this last statement as an Enthought employee. While Enthought and its employees do contribute to the development of numpy and scipy in various ways

Re: [Tutor] Accessing query results html frame : PLEASE READ ME :o)

2011-02-14 Thread Karim
Hello, As I get no response from the tutor python list, I am continuing to investigate my problem. In fact the issue is that there are 2 forms in the interactive page and my request does nothing instead I get the interactive page not the submission I asked (query results). The 2 forms are:

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
I managed to get it to work like it explained, apologies not sure what I did wrong earlier, odd. Anyway thanks a lot for all of the suggestions + help -- http://mail.python.org/mailman/listinfo/python-list

Re: EPD 7.0 released

2011-02-14 Thread sturlamolden
On 14 Feb, 13:35, Colin J. Williams cjwilliam...@gmail.com wrote: The purchase price for what, until now, has been open source and free seems high. The price is not high compared to other tools scientists are using, e.g. Matlab and S-PLUS. If you consider to buy an MKL license from Intel only

Re: Arrays/List, filters, Pytho, Ruby

2011-02-14 Thread LL.Snark
On 12/02/2011 04:49, Terry Reedy wrote: On 2/11/2011 4:24 PM, LL.Snark wrote: Hi, I'm looking for a pythonic way to translate this short Ruby code : t=[6,7,8,6,7,9,8,4,3,6,7] i=t.index {|x| xt.first} If you don't know Ruby, the second line means : What does Ruby do if there is no such

Some interactive Python tutorials on basic stats, possibly useful for teaching

2011-02-14 Thread Raj
Dear Python folks, Those of you whose duties include teaching basic stats might be interested in these interactive tutorial files, designed to illustrate basic concepts. Running the code opens up an interactive figure window. When you click on a figure to add new points, the statistical tests

How to run another python script?

2011-02-14 Thread Dan Lee
Hi. I just knew what python is. Now I'm about to write backup script.Now I got 2 scripts. AAA : generate zip file BBB : delete old file. AAA is done. Now I'm going to code BBB file. and I will fix AAA to call BBB to delete dump file at the end. Please let me know How can I call the BBB file

Re: How to run another python script?

2011-02-14 Thread rantingrick
On Feb 14, 9:51 am, Dan Lee allbory@gmail.com wrote: AAA : generate zip file BBB : delete old file. AAA is done. Now I'm going to code BBB file. and I will fix AAA to call BBB to delete dump file at the end. Please let me know How can I call the BBB file from AAA file. Simple: Make a

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 13, 10:39 pm, Christian Heimes li...@cheimes.de wrote: Am 14.02.2011 00:12, schrieb rantingrick: False! There IS harm in using super when super not needed. The difference is readability! And don't downplay that aspect. You yourself have said this in the past. It seems *some* of us

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Mauro Caceres
Where is the buggy code? Show me how Ship.__init__() can break. Anyone can argue, few can offer facts. If you bring an argument that Ship.__init__() can break if someone changes the code then that IS NOT an valid argument. ANY code can be broken with the addition or subtraction of a single

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Ian Kelly
On Sun, Feb 13, 2011 at 9:39 PM, Christian Heimes li...@cheimes.de wrote: If you have a short memory then you should definitely use one way -- the correct way for all cases -- to call the parent's class init method. Otherwise your future self is going to hate your current self for introducing

encoding

2011-02-14 Thread Verde Denim
All I'm a bit new to py coding and need to setup some code to encode/decode base 128. Anyone here have some info they can point me to do get this done? I've been looking around on the web for a few days and can't seem to lay my hands on anything definitive. Thanks in advance for your help. --

Re: EPD 7.0 released

2011-02-14 Thread Robert Kern
On 2/14/11 5:59 AM, sturlamolden wrote: On 14 Feb, 01:50, Robert Kernrobert.k...@gmail.com wrote: I'd just like to jump in here to clear up this last statement as an Enthought employee. While Enthought and its employees do contribute to the development of numpy and scipy in various ways (and

Re: encoding

2011-02-14 Thread Ian Kelly
On Mon, Feb 14, 2011 at 10:10 AM, Verde Denim tdl...@gmail.com wrote: All I'm a bit new to py coding and need to setup some code to encode/decode base 128. Anyone here have some info they can point me to do get this done? I've been looking around on the web for a few days and can't seem to

Re: encoding

2011-02-14 Thread MRAB
On 14/02/2011 17:10, Verde Denim wrote: All I'm a bit new to py coding and need to setup some code to encode/decode base 128. Anyone here have some info they can point me to do get this done? I've been looking around on the web for a few days and can't seem to lay my hands on anything

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Michael Sparks
It can be broken if someone tries to use the class as is - that is treating the class as a model - to drive a display of the ship. If it was written using super() then that wouldn't be a problem. For example, I could write a display mixin that I'd like to use like this: class VisibleShip(ship,

Re: encoding

2011-02-14 Thread Verde Denim
On Mon, Feb 14, 2011 at 12:35 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Feb 14, 2011 at 10:10 AM, Verde Denim tdl...@gmail.com wrote: All I'm a bit new to py coding and need to setup some code to encode/decode base 128. Anyone here have some info they can point me to do get

ANN: ActivePython 2.7.1.4 is now available

2011-02-14 Thread Sridhar Ratnakumar
ActiveState is pleased to announce ActivePython 2.7.1.4, a complete, ready-to-install binary distribution of Python 2.7. http://www.activestate.com/activepython/downloads What's New in ActivePython-2.7.1.4 == *Release date: 14-Feb-2011* New Features

Re: encoding

2011-02-14 Thread Verde Denim
On Mon, Feb 14, 2011 at 12:46 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 14/02/2011 17:10, Verde Denim wrote: All I'm a bit new to py coding and need to setup some code to encode/decode base 128. Anyone here have some info they can point me to do get this done? I've been looking around

Re: How to run another python script?

2011-02-14 Thread Sven
On Mon, 14 Feb 2011 07:56:53 -0800, rantingrick wrote: On Feb 14, 9:51 am, Dan Lee allbory@gmail.com wrote: AAA : generate zip file BBB : delete old file. AAA is done. Now I'm going to code BBB file. and I will fix AAA to call BBB to delete dump file at the end. Please let me know

Re: How to run another python script?

2011-02-14 Thread Jean-Michel Pichavant
Dan Lee wrote: Hi. I just knew what python is. Now I'm about to write backup script.Now I got 2 scripts. AAA : generate zip file BBB : delete old file. AAA is done. Now I'm going to code BBB file. and I will fix AAA to call BBB to delete dump file at the end. Please let me know How can I call

Re: encoding

2011-02-14 Thread MRAB
On 14/02/2011 18:03, Verde Denim wrote: On Mon, Feb 14, 2011 at 12:46 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: On 14/02/2011 17:10, Verde Denim wrote: All I'm a bit new to py coding and need to setup some code to encode/decode

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 14, 11:55 am, Michael Sparks spark...@gmail.com wrote: It can be broken if someone tries to use the class as is - that is treating the class as a model - to drive a display of the ship. If it was written using super() then that wouldn't be a problem. For example, I could write a

Re: encoding

2011-02-14 Thread Adam Tauno Williams
On Mon, 2011-02-14 at 13:03 -0500, Verde Denim wrote: On Mon, Feb 14, 2011 at 12:46 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 14/02/2011 17:10, Verde Denim wrote: All I'm a bit new to py coding and need to setup some code to encode/decode base 128. Anyone here have

Re: How to create a dict based on such a file?

2011-02-14 Thread Dan Stromberg
On Sun, Feb 13, 2011 at 9:47 PM, Wang Coeus wangco...@gmail.com wrote: Hi all, I am new to python. Currently I encountered a problem, please help me to solve this. Thanks in advance! I have a file like below: ++ block1 {  key1=value1  key2=value2  

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Michael Sparks
On Feb 14, 7:15 pm, rantingrick rantingr...@gmail.com wrote: On Feb 14, 11:55 am, Michael Sparks spark...@gmail.com wrote: It can be broken if someone tries to use the class as is - that is treating the class as a model - to drive a display of the ship. If it was written using super() then

Non-linear regression help in Python

2011-02-14 Thread Akand Islam
Hello all, I want to do non-linear regression by fitting the model (let say, y = a1*x+b1*x**2+c1*x**3/exp(d1*x**4)) where the parameter (say c1) must be in between (0 to 1), and others can be of any values. How can I perform my job in python? Thanks in advance. -- Akand --

Re: Non-linear regression help in Python

2011-02-14 Thread Krzysztof Bieniasz
Dnia Mon, 14 Feb 2011 13:02:25 -0800, Akand Islam napisał(a): Hello all, I want to do non-linear regression by fitting the model (let say, y = a1*x+b1*x**2+c1*x**3/exp(d1*x**4)) where the parameter (say c1) must be in between (0 to 1), and others can be of any values. How can I perform my

Re: How to create a dict based on such a file?

2011-02-14 Thread Wang Coeus
Dan Stromberg drsali...@gmail.com writes: On Sun, Feb 13, 2011 at 9:47 PM, Wang Coeus wangco...@gmail.com wrote: Hi all, I am new to python. Currently I encountered a problem, please help me to solve this. Thanks in advance! I have a file like below: ++

Re: Non-linear regression help in Python

2011-02-14 Thread sturlamolden
On 14 Feb, 22:02, Akand Islam sohel...@gmail.com wrote: Hello all, I want to do non-linear regression by fitting the model (let say, y = a1*x+b1*x**2+c1*x**3/exp(d1*x**4)) where the parameter (say c1) must be in between (0 to 1), and others can be of any values. How can I perform my job in

Re: How to create a dict based on such a file?

2011-02-14 Thread Nicholas Devenish
On 14/02/2011 19:25, Dan Stromberg wrote: pyparsing should be able to make pretty short work of exactly the format you want. FWIW, the creator of the many .ini format(s), Microsoft, no longer recommends using .ini files. I don't know what Microsoft uses now, but it seemed their immediate

Re: How to create a dict based on such a file?

2011-02-14 Thread Steven D'Aprano
On Mon, 14 Feb 2011 11:25:00 -0800, Dan Stromberg wrote: FWIW, the creator of the many .ini format(s), Microsoft, no longer recommends using .ini files. That's because they want people to use the registry. INI files are simple, easy to parse, lightweight, and human readable and human

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Westley Martínez
On Mon, 2011-02-14 at 11:15 -0800, rantingrick wrote: On Feb 14, 11:55 am, Michael Sparks spark...@gmail.com wrote: It can be broken if someone tries to use the class as is - that is treating the class as a model - to drive a display of the ship. If it was written using super() then that

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 14, 1:45 pm, Michael Sparks spark...@gmail.com wrote: I hardly call 87 lines of code miles of code though myself.  I call it a relatively trivial example aimed at showing the benefit of using super() in your code rather than hard coding brittle fragility into your code. You accuse my

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread James Mills
On Tue, Feb 15, 2011 at 9:32 AM, rantingrick rantingr...@gmail.com wrote: In any event, normally i would expect people to use a bit of common sense when wielding an interface ESPECIALLY when they wrote it! Like for instance... If i gave someone a loaded gun i would not bother telling that

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread James Mills
On Tue, Feb 15, 2011 at 9:32 AM, rantingrick rantingr...@gmail.com wrote: Those who write code bases should design-in practicality, re- usability, and extendability as a forethought and NOT an afterthought. Of course i am not suggesting that everyone must be clairvoyant. However the vast

lint warnings

2011-02-14 Thread Andrea Crotti
I work on emacs with flymake activated and pylint, pyflakes and pep8 running in background to notify for some style problems. Now there are at a couple of pylint warnings which I don't understand 1. Warning (W, filter_enums): Used builtin function 'map' [2 times] what is the problem with using

Re: Which is the best book to learn python

2011-02-14 Thread Aahz
In article mailman.1150.1295890778.6505.python-l...@python.org, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Python is easy to learn, I'm not sure it's possible to write a bad book about it. Yes, it is. I can name two: Deitel: Python How to Program Perl to Python Migration -- Aahz

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread alex23
On Feb 15, 9:47 am, James Mills prolo...@shortcircuit.net.au wrote: On Tue, Feb 15, 2011 at 9:32 AM, rantingrick rantingr...@gmail.com wrote: Those who write code bases should design-in practicality, re- usability, and extendability as a forethought and NOT an afterthought. Of course i am

Re: How to create a dict based on such a file?

2011-02-14 Thread Dan Stromberg
On Mon, Feb 14, 2011 at 3:06 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 14 Feb 2011 11:25:00 -0800, Dan Stromberg wrote: FWIW, the creator of the many .ini format(s), Microsoft, no longer recommends using .ini files. That's because they want people to use the

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 14, 6:06 pm, alex23 wuwe...@gmail.com wrote: On Feb 15, 9:47 am, James Mills prolo...@shortcircuit.net.au wrote: On Tue, Feb 15, 2011 at 9:32 AM, rantingrick rantingr...@gmail.com wrote: ... [snip: eloquent speech!] ... I actually agree with this. :) The problem is that it's not a

Re: lint warnings

2011-02-14 Thread Chris Rebert
On Mon, Feb 14, 2011 at 3:48 PM, Andrea Crotti andrea.crott...@gmail.com wrote: I work on emacs with flymake activated and pylint, pyflakes and pep8 running in background to notify for some style problems. Now there are at a couple of pylint warnings which I don't understand 1. Warning (W,

Re: lint warnings

2011-02-14 Thread Ben Finney
Andrea Crotti andrea.crott...@gmail.com writes: I work on emacs with flymake activated and pylint, pyflakes and pep8 running in background to notify for some style problems. Now there are at a couple of pylint warnings which I don't understand 1. Warning (W, filter_enums): Used builtin

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Westley Martínez
On Mon, 2011-02-14 at 16:53 -0800, rantingrick wrote: On Feb 14, 6:06 pm, alex23 wuwe...@gmail.com wrote: On Feb 15, 9:47 am, James Mills prolo...@shortcircuit.net.au wrote: On Tue, Feb 15, 2011 at 9:32 AM, rantingrick rantingr...@gmail.com wrote: ... [snip: eloquent speech!] ...

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread alex23
rantingrick rantingr...@gmail.com wrote: A respect forged from collaboration. A respect of comrades in arms. This is the future i bring to c.l.py! Really? I see no collaboration, respect nor camaraderie in anything you've posted to date. So I'm confident the future you bring will be pretty much

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Steven D'Aprano
On Tue, 15 Feb 2011 09:47:54 +1000, James Mills wrote: On Tue, Feb 15, 2011 at 9:32 AM, rantingrick rantingr...@gmail.com wrote: Those who write code bases should design-in practicality, re- usability, and extendability as a forethought and NOT an afterthought. Of course i am not suggesting

Re: How to create a dict based on such a file?

2011-02-14 Thread alex23
On Feb 15, 9:06 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: As I see it, the biggest problems with INI files are: * the INI file module that comes with Python is quite primitive; * there are many slightly different behaviours you might want in an INI file, and no clean

Re: files,folders,paths

2011-02-14 Thread ecu_jon
well i think i will close this out. redid recursive foldering now for 3rd or 4th time. below script works from a windows to another folder (destination1) or a unc path(destination2). i tried it on my linux box, and the error deals with writing to a remote smb share. i think if it was mounted

Re: lint warnings

2011-02-14 Thread Steven D'Aprano
On Tue, 15 Feb 2011 14:10:38 +1100, Ben Finney wrote: Andrea Crotti andrea.crott...@gmail.com writes: I work on emacs with flymake activated and pylint, pyflakes and pep8 running in background to notify for some style problems. Now there are at a couple of pylint warnings which I don't

Re: Which is the best book to learn python

2011-02-14 Thread Bill Allen
Alan Gauld has written a very good online book called Learning to Program. I would definitely recommend it. http://www.alan-g.me.uk/l2p/index.htm -Bill On Mon, Jan 24, 2011 at 11:09, santosh hs santosh.tron...@gmail.com wrote: Hi All, i am beginner to python please tell me which is the

Re: Non-linear regression help in Python

2011-02-14 Thread Akand Islam
On Feb 14, 3:24 pm, Krzysztof Bieniasz krzysztof.t.bieni...@gmail.com wrote: Dnia Mon, 14 Feb 2011 13:02:25 -0800, Akand Islam napisał(a): Hello all, I want to do non-linear regression by fitting the model (let say, y = a1*x+b1*x**2+c1*x**3/exp(d1*x**4)) where the parameter (say c1) must

Re: Non-linear regression help in Python

2011-02-14 Thread Akand Islam
On Feb 14, 4:28 pm, sturlamolden sturlamol...@yahoo.no wrote: On 14 Feb, 22:02, Akand Islam sohel...@gmail.com wrote: Hello all, I want to do non-linear regression by fitting the model (let say, y = a1*x+b1*x**2+c1*x**3/exp(d1*x**4)) where the parameter (say c1) must be in between (0 to

Re: How to create a dict based on such a file?

2011-02-14 Thread Westley Martínez
On Mon, 2011-02-14 at 19:41 -0800, alex23 wrote: On Feb 15, 9:06 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: As I see it, the biggest problems with INI files are: * the INI file module that comes with Python is quite primitive; * there are many slightly different

Re: How to create a dict based on such a file?

2011-02-14 Thread Dan Stromberg
On Mon, Feb 14, 2011 at 8:31 PM, Westley Martínez aniko...@gmail.com wrote: On Mon, 2011-02-14 at 19:41 -0800, alex23 wrote: On Feb 15, 9:06 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: As I see it, the biggest problems with INI files are: * the INI file module that

Re: How to create a dict based on such a file?

2011-02-14 Thread Steven D'Aprano
On Mon, 14 Feb 2011 19:41:00 -0800, alex23 wrote: On Feb 15, 9:06 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: As I see it, the biggest problems with INI files are: * the INI file module that comes with Python is quite primitive; * there are many slightly different

Re: lint warnings

2011-02-14 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: On Tue, 15 Feb 2011 14:10:38 +1100, Ben Finney wrote: The ‘map’ builtin is deprecated; I don't believe it is. Do you have any evidence for this claim? I was mis-remembering PEP 3100. Anyway, I regard it as deprecated; list

Re: Problem with giant font sizes in tkinter

2011-02-14 Thread Steven D'Aprano
On Sun, 13 Feb 2011 23:42:06 +, Rhodri James wrote: On Fri, 11 Feb 2011 02:08:01 -, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 10 Feb 2011 15:48:47 +, Cousin Stanley wrote: Steven D'Aprano wrote: I have a tkinter application under Python 2.6 which is

[issue11210] PyErr_SetFromWindowsErrWithFilenameObject() doesn't exist: remove it from pyerrors.h

2011-02-14 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(int, const char *); has a strange prototype: FilenameObject usually indicates a PyObject* argument, not a char* argument. The function doesn't exist in

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: On Mon, Feb 14, 2011 at 8:33 AM, Antoine Pitrou rep...@bugs.python.org wrote: I'm still not comfortable with a convention that relies on *clients* of the PEP 3118 API not mucking with the internals of the Py_buffer struct. Which clients?

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Another idea we may want to revisit is the PyManagedBuffer concept, which would be a true PyObject that existed solely to simplify sharing of Py_buffer structs. If memoryview used such an object internally, then copying and slicing would be

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: OK, to summarise that revisit into a coherent proposal: 1. Add PyManagedBuffer as an even lower level wrapper around Py_buffer. The only thing this would support is doing GetBuffer on construction and ReleaseBuffer when destroyed (or when

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: On further reflection, I realised point 4 in that suggestion isn't reliable in a formal sense. Consider: with memoryview(a) as m: m[:] The slice won't reference the buffer again, but isn't guaranteed by the language definition to have

[issue11188] test_time error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: File .../Lib/test/test_time.py, line 351, in test_mktime self.assertEqual(time.mktime(tt), t) OverflowError: mktime argument out of range I don't know which values are out of range. But I guess that the test fails because of

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm *much* happier with the rule based on malloc/free semantics where the *pointer* passed to PyObject_GetBuffer must match a single later call to PyObject_ReleaseBuffer. Agreed that Py_buffer should have been a PyObject from the start,

[issue11193] test_subprocess error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't understand why the test pass on FreeBSD, Solaris and Mac OS X, but not on AIX. Oh, the command line and the filesystem encodings may be different. test_undecodable_env() of test_subprocess.py uses os.environ which uses

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: The managed buffer needs to be a separate object so that multiple memoryview objects can share it. Essentially, we would end up with two APIs - the raw Py_buffer API and the higher level PyManagedBuffer one. C extensions would have the choice

[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2011-02-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue670664 ___ ___

[issue7305] urllib2.urlopen() segfault using SSL on Solaris

2011-02-14 Thread Fabian Groffen
Fabian Groffen grob...@gentoo.org added the comment: I can reproduce this on Solaris 10/Sparc64 only, using Python 2.7.1. My core files aren't really useful though, nothing it can point to, everything is corrupt. -- nosy: +grobian versions: +Python 2.7

[issue11208] example misprint in documentation whatsnew/3.2

2011-02-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11208 ___ ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: If it helps, one way to think of it is that post-redesign, the PyManagedBuffer would be the real API object, with Py_buffer merely a way for data exporters to provide the information needed to initialise the managed buffer properly. (That

[issue7305] urllib2.urlopen() segfault using SSL on Solaris

2011-02-14 Thread Fabian Groffen
Fabian Groffen grob...@gentoo.org added the comment: Perhaps I should have been a bit more clear. Python 2.6 works fine for me on Solaris 10/Sparc64 (64-bits). Python 2.7.1 also works on Solaris 10/Sparc (32-bits), but not on Sparc64 (64-bits). --

[issue11193] test_subprocess error on AIX

2011-02-14 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I am not sure this is what you want: LC_ALL=C ./python Python 3.2rc3 (py3k:88417M, Feb 14 2011, 10:37:42) [GCC 4.2.0] on aix6 Type help, copyright, credits or license for more information. import sys sys.getfilesystemencoding()

[issue11193] test_subprocess error on AIX

2011-02-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: sys.getfilesystemencoding() 'iso8859-1' Ok, I expected this result. Can you also try: $ LC_ALL=C ./python -c import sys; print(ascii(sys.argv)) $(echo -ne abc\xff) ['-c', 'abc\udcff'] $ LC_ALL=C python3.1 -c import locale;

[issue11211] gzip.open() fails for gzipped file

2011-02-14 Thread Toni Mueller
New submission from Toni Mueller tonimuel...@users.sourceforge.net: I have files that I would like to read with Python, but can't: $ python jmlreader.py woerter-allg.jml Traceback (most recent call last): File jmlreader.py, line 14, in module readFile(sys.argv[1]) File jmlreader.py,

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-02-14 Thread Pauli Virtanen
Pauli Virtanen p...@iki.fi added the comment: Nick's plan of action above seems mostly OK to me. Though, it might be simpler to collapse the PyManagedBuffer object to PyMemoryView, even if this requires memoryviews to serve two purposes. [Nick:] I'm still not comfortable with a convention

[issue11211] gzip.open() fails for gzipped file

2011-02-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: test.jml is a ZIP archive, not a gzip archive. gzip -d is kind enough to unpack it even if it is ZIP file and not a gzip file. So it's not a Python bug at all. -- nosy: +haypo resolution: - invalid status: open - closed

[issue11212] Python memory limit on AIX

2011-02-14 Thread Sébastien Sablé
New submission from Sébastien Sablé sa...@users.sourceforge.net: On AIX, executables are compiled by default so that they cannot allocate more than 256MB of memory. This is not enough in some cases; for example this is not enough to get the Python test suite to run completely. As explained

[issue11212] Python memory limit on AIX

2011-02-14 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: Here is a patch that would provide an --enable-aix-maxdata option to configure, in order to support 512MB of mermory. I have not tested it yet. -- keywords: +patch Added file:

[issue11193] test_subprocess error on AIX

2011-02-14 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: $ LANG=C ./python -Wd -E -bb -c import sys; print(ascii(sys.argv)) $(echo -ne abc\xff)['-c', 'abc\xff'] ['-c', 'abc\xff'] $ LANG=C ./python -Wd -E -bb -c import locale; print(locale.nl_langinfo(locale.CODESET)) ISO8859-1 $ LANG=C

[issue11188] test_time error on AIX

2011-02-14 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: I tried the following patch (_AIX is defined on AIX platforms): Index: Modules/timemodule.c === --- Modules/timemodule.c(révision 88420) +++

[issue9920] test_cmath on atan fails on AIX

2011-02-14 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: Here is the result after applying that patch: == FAIL: test_specific_values (__main__.CMathTests)

  1   2   >