relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
Hi Folks, I was arguing with a guy who was sure that incrementing a variable i with "i += 1" is faster than "i = i + 1". I couldn't tell if he was right or wrong so I did a little benchmark with the very useful timeit module. Here are the results on my little Linux Eeepc Netbook (using Python 3.

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
Well I agree with you about string concatenation, but here I'm talking about integers incrementation... -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
Thanks for these explanations. So 2% speed difference just between "B..." and "I..." entries in a huge alphabetically-ordered switch case? Wow. Maybe there is some material for speed enhancement here... -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
Well 2% more time after 1 million iterations so you're right I won't consider it. -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
Actually 6% between float themselves is just as not-understandable. -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
> With 64 bit 3.2.2 on my Win 7 Pentium, the difference was 4% and with > floats (0.0 and 1.0), 6% For floats it is understandable. But for integers, seriously, 4% is a lot. I would never have thought an interpreter would have differences like this in syntax for something as fundamental as add

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent
I did the test several times with floats on my machine and the difference is not as big as for integers: ==> "i = i + 1.0" is 0.732% faster than "i += 1.0". It seems normal as the float addition is supposed to be slower than integer addition, thus the syntaxic difference is comparatively less

Best way to check that you are at the beginning (the end) of an iterable?

2011-09-07 Thread Laurent
Hi there, What is the simplest way to check that you are at the beginning or at the end of an iterable? I'm using enumerate with Python 3.2 (see below) but I'm wondering if there would be a better way. l = ['a', 'b', 'a', 'c'] for pos, i in enumerate(l): if pos == 0: print("head =

Re: Best way to check that you are at the beginning (the end) of an iterable?

2011-09-07 Thread Laurent
I totally understand the performance issue that an hypothetical "istail" would bring, even if I think it would just be the programmer's responsibility not to use it when it's not certain that an end can be detected. But I don't see why *adding* something like "ishead" would be so bad (at worse

Re: Best way to check that you are at the beginning (the end) of an iterable?

2011-09-07 Thread Laurent
Yes of course the use of a boolean variable is obvious but I'm mixing python code with html using Mako templates. In Mako for code readability reasons I try to stick to simple "for" and "if" constructions, and I try to avoid variables declarations inside the html, that's all. Thanks anyway. --

Re: scope of function parameters

2011-05-30 Thread Laurent
add__(6) ^ SyntaxError: invalid syntax while >>> a=5 >>> a.__add__(6) 11 Very well. I learned something today. Thanks Laurent -- http://mail.python.org/mailman/listinfo/python-list

How to manage event of COM objects...

2005-12-05 Thread Laurent
I need that MyApp_AppEvents class knows the thread object to call a thread function when the event occurs(for example I need to toggle a flag) I've got no idea how to do that! Anyone has encoutered the problem? I've tryied to use getevents but with no result... Help! Best regards, Laurent

Re: Learning Python...

2005-12-05 Thread Laurent
Falc wrote: > Hi there... > > I have been looking at learning Python, so far it looks like an > absolutely grat language. I am having trouble finding some free > resources to learn Python from. I am on windows and the only experience > I have with programming is with PHP. > > I have been trying t

Re: What is your favorite Python web framework?

2005-07-18 Thread laurent
hello, I follow somes projects that have a pythonic way to make web site. there's thats projects : http://www.cherrypy.org/ and http://subway.python-hosting.com/ subway aim to be like ruby on rails frameworks , simple and fast developpment. It uses cherrypy and other project like : *

Re: How to find Python path in Visual C++ install wizard

2005-08-13 Thread laurent
nd produce some files : python.zip (for python higher 2.3) and python.dll and other dll for application that needs some dynamic python's extension. regards, Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to check that you are at the beginning (the end) of an iterable?

2011-09-07 Thread Laurent
Yes, I was just hoping for something already included that I wouldn't know (i'm new to Python). -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to check that you are at the beginning (the end) of an iterable?

2011-09-07 Thread Laurent
Interesting. I will check that yield functionality out. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to check that you are at the beginning (the end) of an iterable?

2011-09-07 Thread Laurent
> I don't think this question is meaningful. There are basically two > fundamental types of iterables, sequences and iterators. > > Sequences have random access and a length, so if the "start" and "end" of > the sequence is important to you, just use indexing: > > beginning = sequence[0] > end =

Re: Running Python Demo on the Web?

2011-09-07 Thread Laurent
Neat. But I can see some "print(x)" and some "print x". What is the Python version? -- http://mail.python.org/mailman/listinfo/python-list

Re: using python in web applications

2011-09-10 Thread Laurent
[troll] For a serious web based MMO you'd rather stick to low level and forget about bloated Object Relational Mapping java-like layered kind of frameworks that are made for Rapid Applications Development, not for efficiency. [/troll] "Eve Online", a well known MMORPG was developped with stackle

Re: using python in web applications

2011-09-10 Thread Laurent
Well PyPy is just an implementation of Python among many others (but limited to version 2.7). It is not a web server. If you want to make PyPy interact with a web server (such as nginx) you have to use a special protocol such as WSGI or Fast-CGI. For best performances you can for instance use uW

Re: using python in web applications

2011-09-11 Thread Laurent
+1 for PostgreSQL. It's faster than MySQL for years now, and is much more seriously featured. If you don't need ACID properties (transactions stuff) you should also give Document-based databases like MongoDB a try. It changed my code life. -- http://mail.python.org/mailman/listinfo/python-list

Re: 1/2 evaluates to 0

2011-10-12 Thread Laurent
Include from __future__ import division on the top of your file from __future__ import division 1/2 0.5 Wohaw. This means that this behavior is going to be default in a foreseeable future ? Thanks Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Entre local et global

2011-10-28 Thread Laurent
Le 28/10/2011 10:43, ll.snark a écrit : On 27 oct, 17:06, Laurent Claessens wrote: > J'aimerais donc pouvoir indiquer dans fonca, que la variable lst est > celle définie dans fonc1. > Je ne veux pas d'une variable locale à fonca, ni une variable globale > à tout m

property decorator and inheritance

2011-11-10 Thread Laurent
Hi. I couldn't find a way to overwrite a property declared using a decorator in a parent class. I can only do this if I use the "classic" property() method along with a getter function. Here's an example: #!/usr/bin/python3 class Polite: def __init__(self): self._greeting = "He

Re: property decorator and inheritance

2011-11-10 Thread Laurent
Yes using a separate class variable would transfer the problem to the class level. But adding 10 class variables if I have 10 properties would be ugly. Maybe I should reformulate the subject of this thread to "is there some python magic to pass parameters to decorator-declared properties ?" --

Re: property decorator and inheritance

2011-11-11 Thread Laurent
Hey yes it's working that way. But I don't like it very much either. If as OKB said the whole point is that outside functions can't detect a property then I'm going to stick with the non-decorator way. Thanks anyway. -- http://mail.python.org/mailman/listinfo/python-list

problem of types:

2006-01-14 Thread Laurent
I do not understand why he is talking me about 'str', no str given!!! I have this: - def to_float(elt): if type(elt) is list: return map(to_float, elt) else: return float(elt) def Denombrement(A,b,c,type): . . . A = to_float(A) b

my openGL API need threads!!! But how to ,ake it work???

2006-02-02 Thread Laurent
Hi, here is the context: I'm coding a openGL API I will need for a project for my school. This API is quite simple: an ooglScene describe all needed to make an openGL, and inherits from a list. So an ooglScene is fundamentaly a list of ooglObjects (which is organised as a Composite Pattern). oo

Re: my openGL API need threads!!! But how to ,ake it work???

2006-02-02 Thread Laurent
Here are my codes: it doesn't use threading...! # # test_pyoogl.py # #!/usr/bin/env python from pyoogl import * import unittest class test(unittest.TestCase): def testWind

Re: my openGL API need threads!!! But how to ,ake it work???

2006-02-02 Thread Laurent
That is exactly what I do not want!! this is not transparent, I'm sure it is possible to make what I want: Scene = ooglScene() Scene.run() scene.append(ooglPoint()) -- http://mail.python.org/mailman/listinfo/python-list

Re: my openGL API need threads!!! But how to ,ake it work???

2006-02-02 Thread Laurent
This is not a fantasm... Why this can not work?? in a thread a loop (the glut main loop) called by Scene.run() and in a second something else, e.g. function A A want to add an object in the Scene, the it call Scene.append(anObject) and in his next step, the glutmainloop will see that there is a

Re: my openGL API need threads!!! But how to ,ake it work???

2006-02-02 Thread Laurent
threading.Thread(target = Scene.run).start() WORKS !!! great thx ;) now this should be better if the thread can ben declared inside the class! -- http://mail.python.org/mailman/listinfo/python-list

Re: my openGL API need threads!!! But how to ,ake it work???

2006-02-02 Thread Laurent
Youpe! That work as I want Thx everybody ;) The problem was that I launched the glut main loop into a thread, and then it was separated from his initialisations functions I put it into another method and launch that method into a thread...! That work! -- http

Re: Do you consider Python a 4GL? Why (not)?

2013-06-11 Thread Laurent Pointal
> each error. (Before "integrated" development environments) This is a + for compiled environments that you effectively cannot have with Python, non-syntaxic errors found at runtime. A+ Laurent. -- Laurent POINTAL - laurent.poin...@laposte.net -- http://mail.python.org/mailman/listinfo/python-list

Re: use Python to post image to Facebook

2012-06-24 Thread Laurent Pointal
ould appreciate it ever so much, Dave:) Note: if you develop such a tool, make it a "Web Out Of Browser" module. http://weboob.org/ -- Laurent POINTAL - laurent.poin...@laposte.net -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I implement "cd" like shell in Python?

2012-06-28 Thread Laurent Pointal
> > plus you could add some error-handling code. To have a shell / python script interaction for cwd management, you can take a look at autojump https://github.com/joelthelion/autojump/wiki Its a Python script + different shells glue. A+ Laurent. -- Laurent POINTAL - laurent

argparse limitations

2012-07-27 Thread Benoist Laurent
Hi, I'm impletting a tool in Python. I'd like this tool to behave like a standard unix tool, as grep for exemple. I chose to use the argparse module to parse the command line and I think I'm getting into several limitations of this module. > First Question. How can I configure the the ArgumentPa

Re: argparse limitations

2012-07-27 Thread Benoist Laurent
Le Jul 27, 2012 à 4:43 PM, Oscar Benjamin a écrit : > > > On 27 July 2012 15:26, Benoist Laurent wrote: > Hi, > > I'm impletting a tool in Python. > I'd like this tool to behave like a standard unix tool, as grep for exemple. > I chose to use the argparse mo

Re: argparse limitations

2012-07-27 Thread Benoist Laurent
Yes basically looks like you get it. I have to further test it but my first impression is that it's correct. So actually the point was to use nargs="?". Thank you very much. Ben Le Jul 27, 2012 à 5:44 PM, Peter Otten a écrit : > Benoist Laurent wrote: > >> I&#x

Re: argparse limitations

2012-07-31 Thread Benoist Laurent
2 bar.txt:42 $ cat foo.txt | grep 42 42 $ grep -c 42 foo.txt 1 Cheers, Ben Le Jul 27, 2012 à 7:08 PM, Benoist Laurent a écrit : > > > Yes basically looks like you get it. > I have to further test it but my first impression is that it's correct. > > So actually t

Re: argparse limitations

2012-07-31 Thread Benoist Laurent
else: for fname in args.fname: with(open(fname, "rt")) as f: content = f.read() # do somet Benoist Le Jul 31, 2012 à 11:55 AM, Oscar Benjamin a écrit : > > On Jul 31, 2012 10:32 AM, "Benoist Laurent" wrote: &

Re: argparse limitations

2012-07-31 Thread Benoist Laurent
d choice: '10' (choose from 'foo', 'bar') Any solution? Cheers, Ben Le Jul 31, 2012 à 12:37 PM, Benoist Laurent a écrit : > Really sorry about that. > > So, for the community, below is the full code for a tool that behaves like a > Unix standard tool

Re: argparse limitations

2012-07-31 Thread Benoist Laurent
Le Jul 31, 2012 à 1:45 PM, Oscar Benjamin a écrit : > > > On 31 July 2012 12:03, Benoist Laurent wrote: > Finally. > > The code I proposed doesn't work in this case: if you add any positional > argument to one of the subparsers, then the parsing doesn't work

Re: argparse limitations

2012-07-31 Thread Benoist Laurent
rks that way. I'll do this way. Thank a lot. Ben Le Jul 31, 2012 à 3:04 PM, Oscar Benjamin a écrit : > > > On 31 July 2012 13:51, Benoist Laurent wrote: > > Le Jul 31, 2012 à 1:45 PM, Oscar Benjamin a écrit : > >> >> >> On 31 July 2012 12:03, Benoist L

Re: Printing a text over an image

2012-11-07 Thread Laurent Pointal
photo on top of his name and room number). http://www.reportlab.com/software/opensource/ Once created the pdf, you must find a solution to send it to the printer... > > Thanks in advance, > > Martha A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Killing threads, and os.system()

2012-01-30 Thread Laurent Claessens
t were called by os.system() ? My aim is of course to write an ultimate log file containing the status of the program when KeyboardInterupt was raised. (if not, the unix command "kill" does the job ;) ) Thanks for any help have a good day Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Killing threads, and os.system()

2012-01-31 Thread Laurent Claessens
2.6+, I'd recommend converting from os.system() to subprocess.Popen(). .Popen() objects now have .terminate() and .kill() methods. Ok, I'll try that Popen. Indeed I think that my threads are stuck waiting os.system to complete. Thanks Laurent -- http://mail.python.org/mailman/listi

Re: Naming convention for in-house modules (Newbie question)

2012-02-09 Thread Laurent Claessens
kages. Thanks. This is not 100% an answer to the question, but you should read that : http://www.python.org/dev/peps/pep-0008/ This explain you WhatCaseToChoose for_naming youVariables. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Naming convention for in-house modules (Newbie question)

2012-02-09 Thread Laurent Claessens
This is not 100% an answer to the question, but you should read that : http://www.python.org/dev/peps/pep-0008/ The OP mentions PEP 8 in the bit of his message that you *don't* quote. Well... I've to sleep. Sorry :( Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: what is best method to set sys.stdout to utf-8?

2012-03-07 Thread Laurent Claessens
te(x) sys.stdout=MyStdOut() ... well ... a part of the fact that it is much longer ? Laurent Claessens -- http://mail.python.org/mailman/listinfo/python-list

Re: Distribution

2012-03-20 Thread Laurent Claessens
for information.| -- sage: from scipy import stats sage: X=stats.poisson.rvs sage: X(4) 5 sage: X(4) 2 sage: X(4) 3 Hope it helps Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: string interpolation for python

2012-04-02 Thread Laurent Claessens
ot;.format(b['name'],b['job']) In the case in which b is an object having "job" and "name" attribute, the dynamic string will write "$b.name$ works as $b.job$" instead of "{0}.name works as {0}.job".format(b) Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Naming future objects and their methods

2012-04-15 Thread Laurent Pointal
ata) if dataput.sent(timeout=1.0): print "Data has been sent." else: print "Data hasn't been sent within one second." -- Laurent POINTAL - laurent.poin...@laposte.net 3 allée des Orangers - 91940 Les Ulis - France Tél. 01 69 29 06 59 -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a string to list for submission to easygui multenterb​ox

2012-05-02 Thread Laurent Pointal
title,qstack): > if choice[0] == None: > print ("No entries made") > break > > > print("CHOICE IS: ",choice). CHOICE IS: > ('', 'ksals', '', '',

English version for Mémento Python 3 (draft, readers needed)

2012-06-05 Thread Laurent Pointal
Hello, I started a first translation of my document originally in french. Could some fluent english people read it and indicate errors or bad english expressions. http://perso.limsi.fr/pointal/python:memento Thanks. A+ Laurent. -- Laurent POINTAL - laurent.poin...@laposte.net -- http

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-05 Thread Laurent Pointal
Paul Rubin wrote: > Laurent Pointal writes: >> I started a first translation of my document originally in french. Could >> some fluent english people read it and indicate errors or bad english >> expressions. >> >> http://perso.limsi.fr/pointal/python:memento

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Laurent Pointal
Paul Rubin wrote: > Laurent Pointal writes: >>> There are a few other things like that, and I'll try to look more >>> carefully tonight, I can't spend more time on it right now. >> I updated the document into 1.0.5a (and fix some other errors). > > A f

Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-06 Thread Laurent Pointal
Ulrich Eckhardt wrote: > Am 05.06.2012 19:32, schrieb Laurent Pointal: >> I started a first translation of my document originally in french. Could >> some fluent english people read it and indicate errors or bad english >> expressions. > > Just one note up front: Lan

Re: the stupid encoding problem to stdout

2011-06-09 Thread Laurent Claessens
should think about add stderr to the class MyPrint If you know French, I strongly recommend "Comprendre les erreurs unicode" by Victor Stinner : http://dl.afpy.org/pycon-fr-09/Comprendre_les_erreurs_unicode.pdf Have a nice day Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: the stupid encoding problem to stdout

2011-06-09 Thread Laurent Claessens
should think about add stderr to the class MyPrint If you know French, I strongly recommend "Comprendre les erreurs unicode" by Victor Stinner : http://dl.afpy.org/pycon-fr-09/Comprendre_les_erreurs_unicode.pdf Have a nice day Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: the stupid encoding problem to stdout

2011-06-09 Thread Laurent Claessens
should think about add stderr to the class MyPrint If you know French, I strongly recommend "Comprendre les erreurs unicode" by Victor Stinner : http://dl.afpy.org/pycon-fr-09/Comprendre_les_erreurs_unicode.pdf Have a nice day Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path and Path

2011-06-16 Thread Laurent Claessens
rst convert to '/some/path/and/file' and then hash ? By the way it remains some problems with /some/another/../path/and/file which should also be the same. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: What is this syntax ?

2011-06-19 Thread Laurent Claessens
uote " in a string, you put in between single quote '. (and vice versa) So here you have the string '"' which is " then +x (add x) then +'"' Try also >>> print "'" ' >>> print "'" " Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
Le 19/06/2011 17:19, Chris Angelico a écrit : On Mon, Jun 20, 2011 at 12:42 AM, Laurent Claessens wrote: Hello I've a list of tasks to perform. Each of them is a threading.Thread. Basically I have : while task_list : task = task_list[0] task.run() task_list.remove

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
Le 19/06/2011 18:03, Chris Angelico a écrit : On Mon, Jun 20, 2011 at 1:39 AM, Laurent Claessens wrote: My problem is that when FileToCopyTask raises an error, the program does not stop. In fact when the error is Disk Full, I want to stop the whole program because I know that the next task

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
e. Thanks all Laurent -- http://mail.python.org/mailman/listinfo/python-list

threading : make stop the caller

2011-06-19 Thread Laurent Claessens
to be included in a loop, but I can make them raise personnal exceptions. How can I do ? Thanks Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: threading : make stop the caller

2011-06-19 Thread Laurent Claessens
I read the library documentation. I think that if I get a trick to kill a thread, then I'm done. Is there a way ? Laurent Le 19/06/2011 17:39, Laurent Claessens a écrit : Le 19/06/2011 17:19, Chris Angelico a écrit : On Mon, Jun 20, 2011 at 12:42 AM, Laurent Claessens

Re: help me in knowing the syntax for loop and switch statements in python 3.2

2011-06-23 Thread Laurent Claessens
Le 23/06/2011 11:48, mahantesh varavattekar a écrit : Hi, i am new to python please help to let me know the syntax for python 3.2. with examples. and how can i use these things for ranges http://lmgtfy.com/?q=python+syntax+range+example Laurent -- http://mail.python.org/mailman/listinfo

Re: reg: playing with the list

2011-06-24 Thread Laurent Claessens
ist: if is_prime(n): new_list.append(n) SECOND POSSIBILITY : new_list=[ n for n in old_list if is_prime(n) ] There is a primiality test in Sage which is basically a module over python (www.sagemath.org). Have a good WE Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: how to call a function for evry 10 secs

2011-06-30 Thread Laurent Claessens
. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Laurent Payot
I made Python my language of choice because of its readability and simpleness, and not because of its speed. But it's always good to know what is the fastest sometimes when you don't want to write a module in C. So I was just wondering if there was a difference. There is, of a few percent. Anywa

nntplib encoding problem

2011-02-27 Thread Laurent Duchesne
k (most recent call last): File "", line 1, in UnicodeEncodeError: 'utf-8' codec can't encode character '\udce8' in position 3: surrogates not allowed Thanks, Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: nntplib encoding problem

2011-02-28 Thread Laurent Duchesne
ogateescape parameter and which should not.. I guess I could reencode them all and it wouldn't cause any problems? Laurent On Mon, 28 Feb 2011 02:12:20 +, MRAB wrote: On 28/02/2011 01:31, Laurent Duchesne wrote: Hi, I'm using python 3.2 and got the following err

Re: alphanumeric list

2011-03-15 Thread Laurent Claessens
if a is a number and append something else in that case. Depending what you want, you can even do s.replace("1","ONE").replace("2","TWO").replace("3","FIVE") This is however far from being random ;) Have good tests Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: alphanumeric list

2011-03-16 Thread Laurent Claessens
you have to do is to read about basic python. Search for python tutorial on the net. Then try the following exercices : Exercises 1 print the first 1000 intergers 2 print the sine of 1 ... 1000 3 print the intergers x between 1 and 1000 such that cos(x) is between 0 and 0.5 Have a good afternoon Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: alphanumeric list

2011-03-16 Thread Laurent Claessens
you have to do is to read about basic python. Search for python tutorial on the net. Then try the following exercices : Exercises 1 print the first 1000 intergers 2 print the sine of 1 ... 1000 3 print the intergers x between 1 and 1000 such that cos(x) is between 0 and 0.5 Have a good afternoon Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.walk() to get full path of all files

2011-03-17 Thread Laurent Claessens
inted text. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorator Syntax

2011-03-22 Thread Laurent Claessens
And I'm willing to bet that there are plenty of scripts out there that use "dec" as a name for Decimal objects. You won. I owe you a beer ;) Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-deterministic output

2011-03-28 Thread Laurent Claessens
shell : sage: p=plot(x**2,-1,1) sage: p.get_minmax_data() {'xmin': -1.0, 'ymin': 1.2545281288559271e-05, 'ymax': 1.0, 'xmax': 1.0} Hope it helps Laurent [1] www.sagemath.org -- http://mail.python.org/mailman/listinfo/python-list

Re: [2.5.1] Script to download and rename bunch of files?

2011-04-08 Thread Laurent Claessens
r way. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-05-08 Thread Mali Laurent
On Apr 16, 5:20 am, Alec Taylor wrote: > Good Afternoon, > > I'm looking for an IDE which offers syntax-highlighting, > code-completion, tabs, an embedded interpreter and which is portable > (for running from USB on Windows). > > Here's a mockup of the app I'm looking for:http://i52.tinypic.com/2u

Re: Python backup programs?

2011-05-10 Thread Laurent Claessens
1. time. One backup takes between 10 minutes and one hour. I don't really care. 2. space. Since my backup is a copy (and copy of copies), my backup directory takes ~150Go while my home is about 25 Go. Hope it answer your question. Have a nice day Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: checking if a list is empty

2011-05-11 Thread Laurent Claessens
e no value". I spent a while to figure out the problem :) Conclusion: the boolean value of an object is to be used with care in order to tests if an optional parameter is given or not (when default value is None). Have a good noon Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: checking if a list is empty

2011-05-11 Thread Laurent Claessens
object being None. It was my conclusion too ;) Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: checking if a list is empty

2011-05-11 Thread Laurent Claessens
object being None. It was my conclusion too ;) Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
Yes, I want to extract the data that is contained in an image file. Greets Basti > Yes, I want to extract the data that is contained in an image file. > Greets Maybe ask to imagemagick's or matplotlib. They should know if it is possible at all. Good luck. Lauren

Re: Parsing a graph image

2011-05-13 Thread Laurent Claessens
don’t know matlab >might provide some tools .. just guessing ) then its easy i think to pick (X,Y) as time and value ? You made me think that in addition to ask to imagemagick's and matplotlib, one can also as to Sage[1] In order of pythonicity : - matplotlib - sage - imagemagick

Re: scope of function parameters

2011-05-30 Thread Laurent Claessens
ve an example of an object that has no name ? I've missed something ... Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-30 Thread Laurent Claessens
Le 30/05/2011 11:02, Terry Reedy a écrit : On 5/30/2011 3:38 AM, Laurent wrote: Cool. I was thinking that "5" was the name, but >>> 5.__add__(6) File "", line 1 5.__add__(6) Try 5 .__add__(6) What is the rationale behind the fact to add a space betwe

Re: scope of function parameters

2011-05-30 Thread Laurent Claessens
What is the rationale behind the fact to add a space between "5" and ".__add__" ? Why does it work ? It's a hint for the tokenizer. I didn't know the tokenizer. Now I understand. Thanks Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-30 Thread Laurent Claessens
What is the rationale behind the fact to add a space between "5" and ".__add__" ? Why does it work ? It's a hint for the tokenizer. I didn't know the tokenizer. Now I understand. Thanks Laurent -- http://mail.python.org/mailman/listinfo/python-list

[ANN] German translation of Python 3 Cheat Sheet

2016-09-14 Thread Laurent Pointal
Hello, The Python 3 Sheet Cheat (Mémento Bases Python 3) has been translated into german by StR Martin Putzlocher. Thanks to him. It can be downloaded on the same page as english and french versions: https://perso.limsi.fr/pointal/python:memento A+ L.Pointal. -- https://mail.python.org/mailman

Update to Python 3 Cheat Sheet

2017-01-28 Thread Laurent Pointal
Hi, I updated the cheat sheet on the aesthetic side. Parts bloc and their title are now more easily identified with colors (but its nice with B&W printing too). French and german versions have also been updated. See https://perso.limsi.fr/pointal/python:memento A+ L.Pointal. -- https://mail.p

Re: After a year using Node.js, the prodigal son returns

2016-05-07 Thread Laurent Pointal
Brython (http://www.brython.info/) (ok, its translated into JavaScript for execution in the web browser… maybe somedays it will be asmsjs) A+ Laurent. -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   >