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 > 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 shows text in a

Re: lint warnings

2011-02-14 Thread Ben Finney
Steven D'Aprano 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 comprehensions are more flexible and

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 +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 wrote: > On Mon, 2011-02-14 at 19:41 -0800, alex23 wrote: >> On Feb 15, 9:06 am, Steven D'Aprano > +comp.lang.pyt...@pearwood.info> wrote: >> > As I see it, the biggest problems with INI files are: >> > >> > * the INI file module that comes with Py

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 +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 differ

Re: Non-linear regression help in Python

2011-02-14 Thread Akand Islam
On Feb 14, 4:28 pm, sturlamolden wrote: > On 14 Feb, 22:02, Akand Islam 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

Re: Non-linear regression help in Python

2011-02-14 Thread Akand Islam
On Feb 14, 3:24 pm, Krzysztof Bieniasz 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 > > be in between (0 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 wrote: > Hi All, > i am beginner to python please tell me which is the best available > referenc

Re: lint warnings

2011-02-14 Thread Steven D'Aprano
On Tue, 15 Feb 2011 14:10:38 +1100, Ben Finney wrote: > Andrea Crotti 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. Wa

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 somewh

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 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 or obvious way to tell which one

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 > 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 everyon

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread alex23
rantingrick 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 the same as the pas

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 wrote: > > On Feb 15, 9:47 am, James Mills wrote: > > > > > On Tue, Feb 15, 2011 at 9:32 AM, rantingrick > > > wrote: > ... > [snip: eloquent speech!] > ... > > > I actually agree with this. :) > > The problem is

Re: lint warnings

2011-02-14 Thread Ben Finney
Andrea Crotti 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 function 'map' [2 times] >

Re: lint warnings

2011-02-14 Thread Chris Rebert
On Mon, Feb 14, 2011 at 3:48 PM, Andrea Crotti 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, filter_enums): Used bu

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 14, 6:06 pm, alex23 wrote: > On Feb 15, 9:47 am, James Mills wrote: > > > On Tue, Feb 15, 2011 at 9:32 AM, rantingrick wrote: ... [snip: eloquent speech!] ... > > I actually agree with this. :) > The problem is that it's not a philosophy which the ranting one > practices, Actually I coul

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 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 registry. > > INI files are simp

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread alex23
On Feb 15, 9:47 am, James Mills wrote: > On Tue, Feb 15, 2011 at 9:32 AM, rantingrick 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 clair

Re: Which is the best book to learn python

2011-02-14 Thread Aahz
In article , Jean-Michel Pichavant 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 (a...@pythoncraft.com) <*> http://www.pythoncraft.com/

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 ma

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread James Mills
On Tue, Feb 15, 2011 at 9:32 AM, rantingrick 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 amount of time involv

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread James Mills
On Tue, Feb 15, 2011 at 9:32 AM, rantingrick 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 person "Hey, don't aim

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 14, 1:45 pm, Michael Sparks 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 coding habits

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 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

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 writab

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 succ

Re: Non-linear regression help in Python

2011-02-14 Thread sturlamolden
On 14 Feb, 22:02, Akand Islam 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 python? First

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

2011-02-14 Thread Wang Coeus
Dan Stromberg writes: > On Sun, Feb 13, 2011 at 9:47 PM, Wang Coeus 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=value

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

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 -- http://mail.python.o

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Michael Sparks
On Feb 14, 7:15 pm, rantingrick wrote: > On Feb 14, 11:55 am, Michael Sparks 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. > >

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 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 >  key3=value3 >

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 > 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 poi

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 14, 11:55 am, Michael Sparks 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 display mixin that I

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 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 base 128. A

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: 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 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

Re: encoding

2011-02-14 Thread Verde Denim
On Mon, Feb 14, 2011 at 12:46 PM, MRAB 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 on the web for

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 & Upgra

Re: encoding

2011-02-14 Thread Verde Denim
On Mon, Feb 14, 2011 at 12:35 PM, Ian Kelly wrote: > On Mon, Feb 14, 2011 at 10:10 AM, 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 > > look

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, sp

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 definitive.

Re: encoding

2011-02-14 Thread Ian Kelly
On Mon, Feb 14, 2011 at 10:10 AM, 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 o

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 Kern 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 g

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. -- http

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread Ian Kelly
On Sun, Feb 13, 2011 at 9:39 PM, Christian Heimes 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 potential bug

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 s

Re: Extending classes __init__behavior for newbies

2011-02-14 Thread rantingrick
On Feb 13, 10:39 pm, Christian Heimes 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 have very

Re: How to run another python script?

2011-02-14 Thread rantingrick
On Feb 14, 9:51 am, Dan Lee 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 call using the

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 from

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 show

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| x What does Ruby do if there is no such element? For Python, the answer should be either None or Value

Re: EPD 7.0 released

2011-02-14 Thread sturlamolden
On 14 Feb, 13:35, "Colin J. Williams" 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 to build NumPy and

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: [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: 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 Kern 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

Re: EPD 7.0 released

2011-02-14 Thread sturlamolden
On 14 Feb, 01:50, Robert Kern 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 us > do > more of

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 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 stabilize > the

Re: multiprocessing & more

2011-02-14 Thread Adam Skutt
On Feb 14, 5:33 am, Andrea Crotti 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 an asynchronous progr

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

2011-02-14 Thread flebber
On Feb 14, 11:35 am, Cameron Simpson wrote: > On 13Feb2011 14:47, rantingrick wrote: > | On Feb 13, 4:30 pm, Steven D'Aprano +comp.lang.pyt...@pearwood.info> wrote: > > | > The official stance of the Python development team is that 2.7 and 3.x > | > will co-exist for a long, long time. Removing

Re: multiprocessing & more

2011-02-14 Thread Andrea Crotti
On Feb 14, 12:14 am, Adam Skutt wrote: > On Feb 13, 12:34 pm, Andrea Crotti 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 what you're doing it's difficult

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 8:57 pm, Martin De Kauwe wrote: > On Feb 14, 8:51 pm, Dave Angel wrote: > > > > > > > On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: > > > > > > > > from other_model import OtherSubModel > > > class Model: > > > >      def __init__(self): > > > >          # included other external

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 wrote: > On 14 fév, 06:47, Wang Coeus 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 you want but with .ini fi

Re: files,folders,paths

2011-02-14 Thread ecu_jon
On Feb 14, 4:43 am, Dave Angel 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. > > http://thanksforallthefish.endofinternet.net/ > > testing1.py">testin1.py >

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 8:51 pm, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: > > > > > > 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 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. > > http://thanksforallthefish.endofinternet.net/ > > testing1.py">testin1.py >

Re: Re: Class or Dictionary?

2011-02-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Martin De Kauwe wrote: 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 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. http://thanksforallthefish.endofinternet.net/ testing1.py">testin1.py except maybe the os.join.path in the last function. here is the

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 folde

Re: Class or Dictionary?

2011-02-14 Thread Martin De Kauwe
On Feb 14, 7:12 pm, Terry Reedy 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 am I bei

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 Reedy 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

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 cons