Re: [Tutor] Tutorial executable from python script.

2010-03-21 Thread Karim Liateni
to rely on machine installation and provide a unique version with my application installation. I know we did the same for TCL to be sure to have 8.4 version. I just wanted to know if there is some tutos about this topic. Regards Karim Lie Ryan wrote: On 03/21/2010 06:00 AM, Karim Liateni wrote

Re: [Tutor] Tutorial executable from python script.

2010-03-20 Thread Karim Liateni
and not depand on any local machine installation environment. I need as to embed gtk python library for graphical use. Thanks Karim Alan Gauld wrote: Karim Liateni karim.liat...@free.fr wrote on machine which doesn't have recent version (2.0) of python. Given that v2 is at least 10 years old now

Re: [Tutor] parsing a chunked text file

2010-03-19 Thread Karim Liateni
Hello, Thanks both of you for these useful information. Regards Karim Hugo Arts wrote: On Thu, Mar 18, 2010 at 12:54 PM, Stefan Behnel stefan...@behnel.de wrote: Karim Liateni, 04.03.2010 01:23: Yes, a *big* difference in the true sense of the word. Your code (assuming you meant to write

[Tutor] Tutorial executable from python script.

2010-03-19 Thread Karim Liateni
Hello, I want to do a executable for linux/unix from python scripts and thus o allow to run on machine which doesn't have recent version (2.0) of python. I found the compile() method but how can I use it to make all in one executable which could be run on old system (old python). If you

Re: [Tutor] Any Tutor there ? Removing redundant parameters in a models file having include files.

2010-03-03 Thread Karim Liateni
Hello Alan, Steven, I was narrow minded about this topic and did not see the benefits of these multiple Python implementations. You opened my eyes. Regards Karim Steven D'Aprano wrote: On Tue, 2 Mar 2010 11:25:44 am Andreas Kostyrka wrote: Furthermore I do not think that most of the

Re: [Tutor] parsing a chunked text file

2010-03-03 Thread Karim Liateni
Hello Steven, Is there a big difference to write your first functions as below because I am not familiar with yield keyword? def skip_blanks(lines): Remove leading and trailing whitespace, ignore blank lines. return [line.strip() in lines if line.strip()] I tried to write as well the

Re: [Tutor] Any Tutor there ? Removing redundant parameters in a models file having include files.

2010-03-02 Thread Karim Liateni
Hello, Thanks a lot for this state of the art of the language, very instructive. I see now top of the iceberg ;o) Karim Steven D'Aprano wrote: On Tue, 2 Mar 2010 07:07:57 am Karim Liateni wrote: Thanks for this precision! I'm using standard python so this is ok! Why people use

[Tutor] Any Tutor there ? Removing redundant parameters in a models file having include files.

2010-02-28 Thread Karim Liateni
Hello Tutor, Since Friday I get no answers to my first post. So I re-post it was missed by the numerous arriving email: This is my first program in python. I am doing electrical simulation in spectre (spice like). I have a models file which holds many parameters and include files of

Re: [Tutor] Any Tutor there ? Removing redundant parameters in a models file having include files.

2010-02-28 Thread Karim Liateni
Lie Ryan wrote: On 03/01/10 01:12, Alan Gauld wrote: def getLines(file): Get the content of a file in a lines list form. f = open(file, 'r') lines = f.readlines() f.close() return lines I'm not sure these functions add enough value to ghave them. I';d probably just use

Re: [Tutor] Any Tutor there ? Removing redundant parameters in a models file having include files.

2010-02-28 Thread Karim Liateni
Lie Ryan wrote: On 03/01/10 02:49, Karim Liateni wrote: Lie Ryan wrote: On 03/01/10 01:12, Alan Gauld wrote: def getLines(file): Get the content of a file in a lines list form. f = open(file, 'r') lines = f.readlines() f.close() return lines I'm

Re: [Tutor] Removing redundant parameters in a models file having include files.

2010-02-27 Thread Karim Liateni
Ok I must add an explanation The program must removes includes files of already existing parameters in the models file. Karim karim.liat...@free.fr wrote: Hello All, This is my first program in python. I am doing electrical simulation in spectre (spice like). I have a models file which

[Tutor] Removing redundant parameters in a models file having include files.

2010-02-26 Thread karim . liateni
Hello All, This is my first program in python. I am doing electrical simulation in spectre (spice like). I have a models file which holds many parameters and include files of parameters. But in batch mode the automatic construction (by the simulator) of this file is not correct. It

[Tutor] Fwd: Removing redundant parameters in a models file having include files.

2010-02-26 Thread karim . liateni
Hello All, This is my first program in python. I am doing electrical simulation in spectre (spice like). I have a models file which holds many parameters and include files of parameters. But in batch mode the automatic construction (by the simulator) of this file is not correct. It