Re: ANN: magnitude 0.9.1

2007-10-16 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > I am happy to announce the first release of magnitude, a > library for computing with physical quantities. It is > released under the Apache v. 2 license. > > A physical quantity is a number with a unit, like 10 > km/h. Units can be any of the SI units, plus a bunch o

Re: Parallel insert to postgresql with thread

2007-10-26 Thread Laurent Pointal
s may share the module, but not connections. 2 Threads may share the module and connections. 3 Threads may share the module, connections and cursors. """ http://www.python.org/dev/peps/pep-0249/ -- Laurent POINTAL - [EM

Re: How python writes text into another windows application

2007-10-30 Thread Laurent Pointal
tion via its gui. http://sourceforge.net/projects/pywinauto -- Laurent POINTAL - [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Establishing if an Object is Defined

2007-01-10 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Hi, > > The following code works - > > one = 1 > if one == 1: > ok = 1 > print ok > > but this does not, without exception - > > one = 2 > if one == 1: > ok = 1 > print ok > > How do I establish before printing ok if it actually exists so as to > avoid this ex

Re: convert binary data to int

2007-01-10 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Hello, > > > I need to convert a 3 byte binary string like > "\x41\x00\x00" to 3 int values ( (65,0,0) in this case). > The string might contain characters not escaped with a \x, like > "A\x00\x00" > > > Any ideas? >>> s = "\x41\x00\x00" >>> [ ord(c) for c in s ]

Re: maximum number of threads

2007-01-10 Thread Laurent Pointal
Paul Sijben a écrit : > Gabriel Genellina wrote: >> Simply you can't, as you can't have 1 open files at once. Computer >> resources are not infinite. > > sure but *how* fast they run out is the issue here > >> Do you really need so many threads? > > I might be able to do with a few less but

Re: Print message with Colors

2007-01-11 Thread Laurent Pointal
prk a écrit : > Hi Folks, > > Is there any procesure for print messages with colors. Yes, see: http://www.google.fr/search?q=python+print+color http://groups.google.fr/groups?as_q=python+print+color&num=100&as_ugroup=comp.lang.python See also ANSI escape sequences for the more general subject

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Laurent Pointal
Bjoern Schliessmann a écrit : > Sean Davis wrote: > >> The author of one of the python database clients mentioned that >> using one thread to retrieve the data from the oracle database and >> another to insert the data into postgresql with something like a >> pipe between the two threads might mak

Re: pygame and python 2.5

2007-01-12 Thread Laurent Pointal
siggi a écrit : > Hi all, > > when I rtry to install pygame (pygame-1.7.1release.win32-py2.4.exe, the most > ciurrent version I found) it requires Python 2.4! Will I really have to > uninstall my Python 2.5 and install the old Python 2.4 in order to use > pygame? Note: You can have both versions

Re: check if there is data in stdin without blocking

2007-01-15 Thread Laurent Pointal
hg a écrit : > hg wrote: > >> Hi, >> >> Is there a way ? ... select ? >> >> >> >> hg > PS: > > import sys > import select > > l_r = select.select([sys.stdin],[],[],0) > > gives me: > File "select.py", line 2, in ? > import select > File "/home/philippe/Desktop/select.py", line 4, in ? >

Re: Python Windows Editors

2007-01-23 Thread Laurent Pointal
W. Watson a écrit : > I downloaded python-2.5.msi and installed it. I believe its editor is > IDE. I understand there's a Win editor called pythonwin. I believe it's > in the download pywin32-210.win32-py2.5.exe, but I'm not sure if this > exe file has just the editor or all of Python. Comments? If

Re: beep or sound playing under linux

2007-01-23 Thread Laurent Pointal
hg a écrit : > Hi, > > Is there a way to do that ? > > Regards, > > hg > Some links: Official doc: http://docs.python.org/lib/mmedia.html ==> http://docs.python.org/lib/module-ossaudiodev.html PyAudio (binding to portaudio): ==> http://people.csail.mit.edu/hubert/pyaudio/ Maybe with pyG

Re: Removing outdated files

2007-01-23 Thread Laurent Pointal
Jan Danielsson a écrit : > Hello all, > >I have a backup system which produces files using the following pattern: ... > >Obviously, I have little need for *all* those files. What I want to > do is to delete old files according to this pattern: > >- Keep all backup files which are two

Re: Python Windows Editors

2007-01-23 Thread Laurent Pointal
stef a écrit : > Laurent Pointal wrote: >> W. Watson a écrit : >> >>> I downloaded python-2.5.msi and installed it. I believe its editor is >>> IDE. I understand there's a Win editor called pythonwin. I believe it's >>> in the download p

Re: I need suggests

2007-01-23 Thread Laurent Pointal
Pat a écrit : > I have to do a big programm. Could someone give me some suggests about > IDE (on Linux) and books to learn. > + For the IDE: http://wiki.python.org/moin/IntegratedDevelopmentEnvironments Test some, take the one corresponding to your taste/feeling. + For books: http://wiki.python

Re: Yank Bastards KILLED THEIR OWN PEOPLE to stage 911 DRAMA

2007-01-29 Thread Laurent Pointal
bryan rasmussen a écrit : > See, if the python list mail server was written in Lisp Paul Graham > would already have been able to write up a spam filter to ban this > guy. > > Seriously though, shouldn't Thermate be banned by now. I read this from comp.lang.python... and its very hard to ban peo

Re: Why does this not work?

2007-02-02 Thread Laurent Pointal
alain a écrit : > On Feb 2, 1:57 pm, Bart Van Loon <[EMAIL PROTECTED]> wrote: >> It was 2 Feb 2007 04:41:48 -0800, when alain wrote: >> >>> I tried the following: >>> myobj=object() >>> myobj.newattr=5 >>> results in: >>> Traceback (most recent call last): >>> File "", line 1, in ? >>> AttributeE

Re: newbie/ merging lists of lists with items in common

2007-02-02 Thread Laurent Pointal
ardief a écrit : > Hi everyone > Here is my problem: > I have a list that looks like this - > [['a', '13'], ['a', '3'], ['b', '6'], ['c', '12'], ['c', '15'], ['c', > '4'], ['d', '2'], ['e', '11'], ['e', '5'], ['e', '16'], ['e', '7']] > > and I would like to end up with something like this, i.e. wi

Re: newbie/ merging lists of lists with items in common

2007-02-02 Thread Laurent Pointal
Neil Cerutti a écrit : > On 2007-02-02, ardief <[EMAIL PROTECTED]> wrote: > This is a job for... duhn-duhn-DH! Captain CHAOS! > > Er... I mean itertools.groupby. > > def key_func(t): > return t[0] Not needed: --> from operator import itemgetter See in the example: http://docs

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > When they have to ... > > One of the big things about Python is that its penetration slows it > down. There's more legacy code and interdependant systems around now > that Python is more successful and more mature. > > Here's a thought -- perhaps it would be worth ha

Re: Python 3.0 (Was: when will python 2.5 take in mainstream?)

2007-02-05 Thread Laurent Pointal
Steven Bethard a écrit : > Laurent Pointal wrote: >> For Python 3.0, AFAIK its a big rewrite and developers know that it will >> be uncompatible in large parts with existing code. > > Wrong on both counts. ;-) Python 3.0 is not a rewrite. It's based on the > same c

Re: when will python 2.5 take in mainstream?

2007-02-05 Thread Laurent Pointal
Jean-Paul Calderone a écrit : > On Mon, 05 Feb 2007 10:19:26 +0100, Laurent Pointal > <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] a écrit : >>> When they have to ... >>> >>> One of the big things about Python is that its penetration sl

Re: Calling J from Python

2007-02-05 Thread Laurent Pointal
Diez B. Roggisch wrote: > m=: >@(0&{) > v=: >@(1&{) > h=: >@(2&{) > qu =: >@(3&{) > z=: [EMAIL PROTECTED]: > ret =: |[EMAIL PROTECTED]: > init =: z;z;z;i. > f1m =: (m,[EMAIL PROTECTED]);v;h;[EMAIL PROTECTED] > f5m =: (z;(v,{:@m);h;qu,[EMAIL PROTECTED]) @ (f1m^:5) > f1h =: (z;

Re: Calling J from Python

2007-02-05 Thread Laurent Pointal
Bruno Desthuilliers wrote: > Gosi a écrit : >> On Feb 5, 2:59 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> J has very many advanced operations. > > what's an "advanced operation" ? An operation which dont stay in place. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python cheatsheets

2007-02-06 Thread Laurent Pointal
Bart Ogryczak wrote: > On Jan 7, 10:03 pm, gonzlobo <[EMAIL PROTECTED]> wrote: >> Curious if anyone has a python cheatsheet* published? I'm looking for >> something that summarizes all commands/functions/attributes. Having >> these printed on a 8" x 11" double-sided laminated paper is pretty >> c

Re: How to prevent from race conditions to share data between many process and thread in python

2007-02-07 Thread Laurent Pointal
mars a écrit : > I use TurboGears to do some web service. TurboGears use cherrypy. When > web browser access this site, the cherrypy will call my python > program. So my program looks like a lib. When web browser access the > site, the http server will fock a process or gerenate a thread. I need >

Re: Formatting milliseconds to certain String

2007-02-12 Thread Laurent Pointal
Deniz Dogan a écrit : > Hello. > I need help with a small problem I'm having. > > I want to make a function which takes an integer representing some time > in milliseconds and returns the same time but formatted as > "hours:minutes:seconds,milliseconds" with leading zeros whenever possible. > > E

Re: Help with Optimization of Python software: real-time audio controller

2007-02-12 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > As mentioned above, my application deals with music training. I have a > Tkinter GUI, which communicates via pyserial with an external device I > built myself. The code reads in a MIDI file and converts the song to > "output data " for the external device and the GUI,

Re: WHAT IS THIS?

2007-02-17 Thread Laurent Pointal
Captain wrote: > Just bought a new PC with Windows XP Media Edition. I have two entries in > the "Add or Remove Programs" section of Control Panel, but there is no > corresponding item in the Start Menu. One entry says: Python 2.2.3 and > the > other says: Python 2.2 pywin32 extensions (build203

Re: Help Required for Choosing Programming Language

2007-02-20 Thread Laurent Pointal
Mark Morss a écrit : > On Feb 16, 4:22 pm, [EMAIL PROTECTED] wrote: >> I am VB6 programmer and wants to start new programming language but i >> am unable to deciced. >> >> i have read about Python, Ruby and Visual C++. but i want to go >> through with GUI based programming language like VB.net >> >

Re: Weird result returned from adding floats depending on order I add them

2007-02-20 Thread Laurent Pointal
joanne matthews (RRes-Roth) a écrit : > I'm getting different results when I add up a list of floats depending > on the order that I list the floats. For example, the following returns > False: > def check(): > totalProp=0 > inputs=[0.2,0.2,0.2,0.1,0.2,0,0.1] > for each in inputs:

Re: ocaml to python

2007-02-20 Thread Laurent Pointal
Gigs_ wrote: > Is there any way to convert ocaml code to python? but not manually For Python and ocaml, my bookmark contains this link: http://www.programs4all.net/programs/Pycaml-Python-Embedding-API-for-Ocaml.htm But no ocaml to Python compiler... -- http://mail.python.org/mailman/listinfo/

Re: eval('000052') = 42?

2007-02-21 Thread Laurent Pointal
Astan Chee a écrit : > Hi, > I just tried to do > eval('00052') and it returned 42. > Is this a known bug in the eval function? Or have I missed the way eval > function works? > Thanks Ad Erik replied, a literal value beginning by 0 is interpreted as an octal value (and beginning by 0x it is inter

Re: converting u'11\xa022' to '11\xa022'

2007-02-21 Thread Laurent Pointal
Gabriel Genellina a écrit : > En Wed, 21 Feb 2007 00:31:32 -0300, alf <[EMAIL PROTECTED]> escribió: >> 2-list of supported encodings? > I don't know how to query the list, except by reading the documentation > for the codecs module. >>> from encodings import aliases >>> aliases.aliases {'iso_

Re: Europe Tests Established Chemicals on Millions of Animals

2007-02-23 Thread Laurent Pointal
You help nothing by posting subjects unrelated to the *programming language* Python into a usenet group about this language. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lib for audio?

2007-11-29 Thread Laurent Pointal
Dave a écrit : > I need to read microphone input and determine frequency. Is there a lib > for that? > > Thanks, > Dave Another possible solution, the PortAudio binding (pyportaudio). http://people.csail.mit.edu/hubert/pyaudio/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating API documentation as a textfile

2007-12-04 Thread Laurent Pointal
MonkeeSage a écrit : > On Dec 3, 8:58 am, Samuel <[EMAIL PROTECTED]> wrote: >> On Mon, 03 Dec 2007 06:45:45 -0800, Giampaolo Rodola' wrote: >>> dir.__doc__ >> This contains only the docstring one object (module, class, >> function, ...). I was thinking more of the complete API documentation >> that

Re: Some python syntax that I'm not getting

2007-12-07 Thread Laurent Pointal
Chris a écrit : > On Dec 7, 2:31 pm, waltbrad <[EMAIL PROTECTED]> wrote: >> I understand how D['say'] gets you 5, But I still don't understand >> the line after the 5. >> >> How is the character 's' some special code? And I don't get what is >> going on with the % character. I'm used to it's use

Re: Writing backwards compatible code - when?

2006-04-24 Thread Laurent Pointal
Scott David Daniels a écrit : > Bob Greschke wrote: >> Is there a list of all of the Python commands and modules that tell >> when (what version) they were added to Python? I was hoping the new >> Essential Reference would have it, but it doesn't. > > Here's a reference that stops at 2.3: > >

Re: Python editor recommendation.

2006-05-11 Thread Laurent Pointal
Dale Strickland-Clark a écrit : > Vim. > > Everything else is Notepad. ++, yes Notepad++ !!! (windows only) See http://notepad-plus.sourceforge.net/uk/site.htm :-) > > DeepBlue wrote: > >> Hi all, >> >> Can any one please recommend me an editor for coding Python. Thank u. >> I have Komodo (

Re: WTF? Printing unicode strings

2006-05-19 Thread Laurent Pointal
Ron Garret a écrit : > In article <[EMAIL PROTECTED]>, > Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >> Ron Garret wrote: >> >> u'\xbd' >>> u'\xbd' >> print _ >>> Traceback (most recent call last): >>> File "", line 1, in ? >>> UnicodeEncodeError: 'ascii' codec can't encode character u'\

Re: Includeing Python in text files

2006-05-22 Thread Laurent Pointal
Paolo Pantaleo a écrit : > I am working on this: > > I have a text file, containig certain section in the form > python code here > py?> > > I parse the text file and substitute the python code with its result > [redirecting sys.stdin to a StringIO]. It something like php or > embedded perl. >

Re: enumerate() question

2006-05-22 Thread Laurent Pointal
Gregory Petrosyan a écrit : > Hello! > I have a question for the developer[s] of enumerate(). Consider the > following code: > > for x,y in coords(dots): > print x, y > > When I want to iterate over enumerated sequence I expect this to work: > > for i,x,y in enumerate(coords(dots)): > pr

Re: Testing for file type

2006-05-22 Thread Laurent Pointal
Andrew Robert a écrit : > Hi Everyone, > > Is there a way to test if a file is binary or ascii within Python? > > I'd prefer not to text against file extension. > > Any help you can provide would be greatly appreciated. May look at unix "file" command sources... A+ L.Pointal. -- http://mail

Re: Importing java within python

2008-01-17 Thread Laurent Pointal
Thanks everyone... >> -- >> http://mail.python.org/mailman/listinfo/python-list >> To complement Henry Chang reply, you can also take a look at: http://jpype.sourceforge.net/ (Java To Python Integration) http://jepp.sourceforge.net/ (Java Embeded Python) See my other Python/Java links at http://w

Re: Pythonland documentation

2008-01-19 Thread Laurent Pointal
x27;ve been used to > doxygen in c++ land, and although it makes a reasonable stab with a > python project in java mode, the output is a bit messy. > > Can any one suggest a more tailored tool? or do I risk a flamewar? :) You can take a look at epydoc http://epydoc.sourceforge.net/

Re: dream hardware

2008-02-13 Thread Laurent Pointal
Le Tue, 12 Feb 2008 10:05:59 -0800, castironpi a écrit : > What is dream hardware for the Python interpreter? Dream... I dont know, but hardware for the Python interpreter, yes. http://www.telit.co.it/product.asp?productId=96 -- Laurent POINTAL - [EMAIL PROTECTED] -- http://mail.python.

Re: Where can I find :

2008-03-31 Thread Laurent Pointal
into Python", there is an online version, translation in some languages other than english (if needed). It propose a line by line explanation on many scripts targetting language and libraries usage. http://www.diveintopython.org/ -- Laurent POINTAL - [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in High School

2008-04-01 Thread Laurent Pointal
hat, given your available time, > would you be proficient enough to teach it? And if you want to do easy and simple 3D graphics programming, look at VPython http://www.vpython.org/ -- Laurent POINTAL - [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: webcam (usb) access under Ubuntu

2008-04-15 Thread Laurent Pointal
ust a wrapper to V4L2, so you must know what options and image format your camera support and use these (you may have to convert image by yourself - see PIL and Numpy for quick data processing functions). To find the supported options you can use xawtv and give it ad-hoc cli option to make it verbose. A+ Laurent. -- Laurent POINTAL - [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading binary from a file...

2006-03-08 Thread Laurent Pointal
Steve Holden a écrit : > KraftDiner wrote: >> Hi! >> In python I'm able to read in binary data from a file. >> data = file.read() # Reads in an entire file. >> > Note that you should open the file in binary mode to be > platform-agnostic and as portable as possible. (Just in case you aren't). > >

Re: Send email notification

2006-03-08 Thread Laurent Pointal
Ernesto a écrit : > Is there a special module for mail ? > > I'd like to send an email [to 'n' unique email addresses] from a python > script. If you want all adressee to be the only one visible in to: field, you must send n emails. For such a purpose, see iMailer module here: http://

Re: Connecting to gnuplot with Popen?

2006-03-31 Thread Laurent Pointal
Anton81 a écrit : > Hi, > > it seems to be a FAQ, but I still haven't found a solution. I want to > control gnuplot with a python program. The following at least gives me the > gnuplot output: Unless you absolutely need to write your own code, you should try: http://gnuplot-py.sourceforge.net/ A

[ANN] New version 2.1.0 of L.Pointal's Python 3 Cheat Sheet

2025-05-14 Thread Laurent Pointal via Python-list
Hello, In the context of a move for hosting of my one recto-verso pdf cheat sheet, I updated it to add Python's news stuff and make a new 2.1.0 version (latest version, 2.0.6, was from 2017). DOWNLOAD English version is at https://py3cheatsheet.lisn.fr/ (its a short URL fore real host

<    1   2   3