Re: Unicode questions

2010-10-21 Thread OdarR
On Oct 19, 9:02 pm, Tobiah wrote: > I've been reading about the Unicode today. > I'm only vaguely understanding what it is > and how it works. > ... > Thanks, > > Tobiah Hi, A good advice, read this presentation, http://farmdev.com/talks/unicode/ Explanation and advices for coding. Olivier --

Re: loop through each line in a text file

2010-02-26 Thread OdarR
On 26 fév, 22:08, qtrimble wrote: > I'm a python newbie but I do have some basic scripting experience.  I > need to take the line starting with "wer" and extract the year and day > of year from that string.  I want to be able to add the year and day > of year from the last line having "wer*" to th

any news from Python Magazine ?

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

Re: use strings to call functions

2010-02-09 Thread OdarR
On 9 fév, 11:01, Stefan Behnel wrote: > Klaus Neuner, 09.02.2010 10:04: > > > my program is supposed to parse files that I have created myself and that > > are on my laptop. It is not supposed to interact with anybody else > > than me. > > Famous last words. > > Stefan I knew it. Olivier -- htt

Re: use strings to call functions

2010-02-08 Thread OdarR
On 9 fév, 02:50, Jean-Michel Pichavant wrote: > Aahz wrote: > > In article > > <0efe23a6-b16d-4f92-8bc0-12d056bf5...@z26g2000yqm.googlegroups.com>, > > OdarR   wrote: > > >> and with eval(), did you try ? > > > WARNING: eval() is almost always th

Re: use strings to call functions

2010-02-08 Thread OdarR
On 8 fév, 22:28, a...@pythoncraft.com (Aahz) wrote: > In article > <0efe23a6-b16d-4f92-8bc0-12d056bf5...@z26g2000yqm.googlegroups.com>, > > OdarR   wrote: > > >and with eval(), did you try ? > > WARNING: eval() is almost always the wrong answer to any quest

Re: use strings to call functions

2010-02-08 Thread OdarR
On 8 fév, 11:57, Klaus Neuner wrote: > Hello, > > I am writing a program that analyzes files of different formats. I > would like to use a function for each format. Obviously, functions can > be mapped to file formats. E.g. like this: > > if file.endswith('xyz'): >     xyz(file) > elif file.endswi

Re: Persistent Distributed Objects

2009-10-10 Thread OdarR
On 10 oct, 05:39, "bouncy...@gmail.com" wrote: > Sorry about being interpreted as being vague. `et me try to narrow it down. > program a creates objects b c d which each need to use 1 disk space 2 ram 3 > processor time. I would like to create a heckpoint which would save the work > of the obje

Re: Persistent Distributed Objects

2009-10-10 Thread OdarR
On 10 oct, 05:39, "bouncy...@gmail.com" wrote: > Sorry about being interpreted as being vague. `et me try to narrow it down. > program a creates objects b c d which each need to use 1 disk space 2 ram 3 > processor time. I would like to create a heckpoint which would save the work > of the obje

Re: How to run python script in emacs

2009-10-07 Thread OdarR
On 7 oct, 22:07, "Sells, Fred" wrote: > Hitting ctrl-c, twice quickly works for me. > ? what do you mean ? Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: best vi / emacs python features

2009-10-07 Thread OdarR
On 7 oct, 19:29, Tim Chase wrote: > Perhaps this is a reference to the alt/meta/control/buckey/super > key-chords that emacs is infamous for using that don't always get > reliably transmitted by all terminal-emulation programs and > consoles.  It was one of my nudging factors towards vi (and later

Re: best vi / emacs python features

2009-10-07 Thread OdarR
On 7 oct, 18:44, Jean-Michel Pichavant wrote: > Being a vi fan, I can just tell you that emacs is for loosers, and no > one will dare to challenge this. vi is very good for newbees, I recommend it. > vi/emacs is like choosing between the Celtics or the Lakers, there is no > reason for that, the

best vi / emacs python features

2009-10-07 Thread OdarR
hello, * this is not a troll * which kind of help you have with your favorite editor ? personnally, I find emacs very nice, in the current state of my knowledge, when I need to reindent the code. you know how this is critical in python...:-) I don't use other python-mode features for the moment

Re: How to run python script in emacs

2009-10-07 Thread OdarR
On 26 sep, 17:54, devilkin wrote: > I'm just starting learning python, and coding inemacs. I usually > splitemacswindow into two, coding in one, and run script in the > other, which is not very convenient. anyone can help me with it? is > there any tricks likeemacsshort cut? > > also please recomm

Re: why python got less developers ?

2009-08-28 Thread OdarR
On 28 août, 02:47, MRAB wrote: > Deep_Feelings wrote: > > python got relatively fewer numbers of developers than other high > > level languages like .NET , java .. etc  why ? > > Fewer needed? excellent answer. LOL. Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: fork, threads and proper closing

2009-06-29 Thread OdarR
On 29 juin, 14:44, Francesco Bochicchio wrote: > On 29 Giu, 07:10, OdarR wrote: > > > > > On 28 juin, 23:26, Tomasz Pajor wrote: > > > > Hello, > > > > Configuration is as follows. > > > > I have a starter process which creates 3 sub proces

Re: fork, threads and proper closing

2009-06-28 Thread OdarR
On 28 juin, 23:26, Tomasz Pajor wrote: > Hello, > > Configuration is as follows. > > I have a starter process which creates 3 sub processes (forks) and each > of this processes creates a number of threads. > Threads in that processes have semaphore so on KeyboardInterrupt without > sending a sigte

Re: Beginning with Python; the right choice?

2009-06-27 Thread OdarR
On 27 juin, 04:22, "sato.ph...@gmail.com" wrote: > Hi, > > As you can imagine, I am new, both to this group and to Python.  I > have read various posts on the best book to buy or online tutorial to > read and have started to go through them.  I was wondering, as someone > with virtually no program

Re: looking for a book on python

2009-06-27 Thread OdarR
On 27 juin, 02:48, Randy Foiles wrote: > Hello and thank you for taking your time to read this. >         I was interested in learning about python.  In the long ago past I did > learn some programing but I have not used any of it for years.  I do > remember some basics however so the book does no

Re: python needs a tutorial for install and setup on a Mac

2009-06-22 Thread OdarR
On 22 juin, 12:44, Kushal Kumaran > Have you seen the page athttp://www.python.org/download/mac/and the > pages linked from it? > As a (usefull) add-on : iPython (a must), I found this page a good help : http://www.brianberliner.com/2008/04/ipython-on-mac-os-x-105-leopard/ Olivier -- http://mail

Re: python needs a tutorial for install and setup on a Mac

2009-06-22 Thread OdarR
On 22 juin, 12:44, Kushal Kumaran wrote: > On Sun, Jun 21, 2009 at 9:04 PM, Vincent Davis > wrote: > > I am running python on a mac and when I was getting going it was difficult > > to setup information. Specifically how modify bash_profile, how pythonpath > > works and how to set it up. how to s

Re: Status of Python threading support (GIL removal)?

2009-06-21 Thread OdarR
On 21 juin, 03:27, Jure Erznožnik wrote: > Add: > Carl, Olivier & co. - You guys know exactly what I wanted. > Others: Going back to C++ isn't what I had in mind when I started > initial testing for my project. Do you think multiprocessing can help you seriously ? Can you benefit from multiple cp

Re: Status of Python threading support (GIL removal)?

2009-06-20 Thread OdarR
On 20 juin, 11:02, Carl Banks wrote: > Here's the thing: not everyone complaining about the GIL is trying to > get the "raw power of their machines."  They just want to take > advantage of multiple cores so that their Python program runs > faster. > > It would be rude and presumptuous to tell such

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 21:41, Carl Banks wrote: > He's saying that if your code involves extensions written in C that > release the GIL, the C thread can run on a different core than the > Python-thread at the same time.  The GIL is only required for Python > code, and C code that uses the Python API.  C cod

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 21:05, Christian Heimes wrote: > I've seen a single Python process using the full capacity of up to 8 > CPUs. The application is making heavy use of lxml for large XSL > transformations, a database adapter and my own image processing library > based upon FreeImage. interesting... > O

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 19:13, s...@pobox.com wrote: >     Olivier> what do you mean ? > >     Olivier> Cpython can't benefit from multi-core without multiple >     Olivier> processes. > > It can, precisely as Martin indicated.  Only one thread at a time can hold > the GIL.  That doesn't mean that multiple thr

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 16:16, Martin von Loewis If you know that your (C) code is thread safe on its own, you can > release the GIL around long-running algorithms, thus using as many > CPUs as you have available, in a single process. what do you mean ? Cpython can't benefit from multi-core without multiple

Re: multiprocessing and process run time

2009-06-19 Thread OdarR
On 19 juin, 16:40, Thomas Robitaille wrote: > Hi, > > I'm making use of the multiprocessing module, and I was wondering if there > is an easy way to find out how long a given process has been running for. > For example, if I do > > import multiprocessing as mp > import time > > def time_waster():

Re: Status of Python threading support (GIL removal)?

2009-06-19 Thread OdarR
On 19 juin, 11:52, Jure Erznožnik wrote: > See here for > introduction:http://groups.google.si/group/comp.lang.python/browse_thread/thread/3... > > Digging through my problem, I discovered Python isn't exactly thread > safe and to solve the issue, there's this Global Interpreter Lock > (GIL) in p

Re: Multi-Threading and KeyboardInterrupt

2009-06-15 Thread OdarR
On 13 juin, 07:25, Mike Kazantsev wrote: > There was quite interesting explaination of what happens when you send > ^C with threads, posted on concurrency-sig list recently: > >  http://blip.tv/file/2232410 >  http://www.dabeaz.com/python/GIL.pdf > > Can be quite shocking, but my experience w/ thr

Re: Python Image Library IOError - cannot find JPEG decoder?

2009-02-25 Thread OdarR
On 24 fév, 18:34, Dario Traverso wrote: > I've been trying to install the Python Image Library  (PIL) on my Mac   > OSX Leopard laptop, but have been running into some difficulties. > > I've built the library, using the included setup.py  script. The build   > summary checks out ok, and sounds the

Re: flexible find and replace ?

2009-02-18 Thread OdarR
Thanks to everybody. I need to test your propositions now :) Olivier -- http://mail.python.org/mailman/listinfo/python-list

flexible find and replace ?

2009-02-16 Thread OdarR
Hi guys, how would you do a clever find and replace, where the value replacing the tag is changing on each occurence ? "...TAGTAGTAG..TAG." is replaced by this : "...REPL01REPL02REPL03..REPL04..." A better and

Re: What is difference between ADO and RDO

2009-02-06 Thread OdarR
On 6 fév, 19:36, Scott David Daniels wrote: > OdarR wrote: > > On 6 fév, 10:56, Agile Consulting wrote: > >> Explain ADO and RDO > > > RU a bot ? > > I expect someone is experimenting with their spam generator. An agile one :) Olivier -- http://mail.python.org/mailman/listinfo/python-list

Re: What is difference between ADO and RDO

2009-02-06 Thread OdarR
On 6 fév, 10:56, Agile Consulting wrote: > Explain ADO and RDO RU a bot ? Olivier -- http://mail.python.org/mailman/listinfo/python-list