Re: Pythondocs.info : collaborative Python documentation project

2006-09-18 Thread Laurent Pointal
[EMAIL PROTECTED] wrote: > Hi, > > I am a bit disapointed with the current Python online documentation. I > have read many messages of people complaining about the documentation, > it's lack of examples and the use of complicated sentences that you > need to read 10 times before understanding wha

Re: python threading and timing

2006-10-02 Thread Laurent Pointal
Python C extension module (doing realtime work on its own - but never relying on python GIL in critical times), communicating with normal python scripts (shared memory... things which dont need the GIL if possible). A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-27 Thread Laurent Pointal
Fred Bayer a écrit : > > Tony Belding wrote: >> I'm interested in using an off-the-shelf interpreted language as a >> user-accessible scripting language for a MUCK. I'm just not sure if I >> can find one that does everything I need. The MUCK must be able to >> call the interpreter and execute sc

Re: PythonTidy

2006-11-30 Thread Laurent Pointal
claration from vim-style to emacs-style: > I'll take it as an insult :) This is not "emacs-style", this is Python normalized source encoding directive for correct interpretation of u"..." strings by Python interpreter. See http://www.python.org/dev/peps/pep-0263/ A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonTidy

2006-11-30 Thread Laurent Pointal
Laurent Pointal a écrit : > See http://www.python.org/dev/peps/pep-0263/ Aye, sorry for my missreading... [seem I hurt the emacs guy] -- http://mail.python.org/mailman/listinfo/python-list

Re: Ruby/Python/REXX as a MUCK scripting language

2006-12-01 Thread Laurent Pointal
Cameron Laird a écrit : > In article <[EMAIL PROTECTED]>, > Laurent Pointal <[EMAIL PROTECTED]> wrote: >> Fred Bayer a écrit : >>> Tony Belding wrote: >>>> I'm interested in using an off-the-shelf interpreted language as a >>>> user-a

Re: RAD for python

2006-12-04 Thread Laurent Pointal
progman a écrit : > is there a VB-alike tool for python to create forms?? Maybe take a look at DaboDev http://dabodev.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: About the 79 character line recommendation

2006-12-06 Thread Laurent Pointal
Olivier Langlois a écrit : > Hi, > > There was a coding standard where I worked and the intention behind this > requirement was to make the code printer friendly. Printing code source > with lines longer than 80 chars greatly hinder readability on paper. Try using size 10 font in place of size 12

Re: Am I stupid or is 'assert' broken in Python 2.5??

2006-12-06 Thread Laurent Pointal
1, in ? AssertionError: It is empty >>> assert (myString, "It is empty") If you use parenthesis to group the condition to test and the error message, then the whole created tuple is used as a condition to test... and this condition is true so assert dont raise any exception. So, just remove your parenthesis and all will go the expected way. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: concatenating strings

2006-12-15 Thread Laurent Pointal
EHC a écrit : > hello! > > since i am a py noob, please bear with me ; ) > > how is it possible to concat a string and an integer in a > print-command? i've tried > > print "This robot is named %s. The current speed setting is %d, and %s > has a lifetime of %d" % (self.name , self.speed , self.n

Re: importing / loading a module / class dynamically

2007-01-05 Thread laurent rahuel
Hi, Using exec or eval ISN'T what should be done ever. When you have troubles importing you should : - Add some repository to your sys.path and/or - Use the buildin import method and/or - Use Mr Eby's Importing module (http://python.org/pypi/Importing) Regards, Laurent hg a éc

Re: find a .py path

2007-01-05 Thread laurent rahuel
Hi, What about : import os.path print os.path.abspath(__file__) hg a écrit : > Hi, > > Is there an easy way for a script being executed (from anywhere) to know > where is is ... something in os.path ? > > Thanks, > > hg > -- http://mail.python.org/mailman/listinfo/python-list

Re: django and mod_python

2006-03-06 Thread Laurent Rahuel
st specific(s) list(s). > Hi, There are also some wxpython, pyqt, ... mailing-list, iircc and you don't seem to bother requesters with not being at the right place ;-) Regards, Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread Laurent RAHUEL
RFQ wrote: > Hi, I'm struggling here to do the following with any success: > > I have a comma delimited file where each line in the file is something > like: > > PNumber,3056,Contractor,XYZ Contracting,Architect,ABC Architects,... This is NOT a CSV file. A CSV file would be : PNumber,Contracto

Re: Reading a CSV file into a list of dictionaries

2005-06-07 Thread Laurent RAHUEL
John Machin wrote: > Laurent RAHUEL wrote: >> RFQ wrote: >> >> >>>Hi, I'm struggling here to do the following with any success: >>> >>>I have a comma delimited file where each line in the file is something >>>like: >>&

Re: which "GUI module" you suggest me to use?

2007-06-06 Thread Laurent Pointal
display data and run javascript. Less integrated, simpler to setup. Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: launching default browser

2007-06-08 Thread Laurent Pointal
alf wrote: > Hi, > > I wonder how to launch from python default Windows browser? In fact I > have the same question for Linux. > > thx in advancve, Via webbrowser module http://docs.python.org/lib/module-webbrowser.html (note: its in top five in google search for Python + launch + browser...)

Re: IndentationError: unexpected indent

2007-06-14 Thread Laurent Pointal
desktop a écrit : > I have this class: > > class case(blop.case): > def __init__(self, n, a, b): > blop.case.__init__(self) > print 'Monty Python's Flying Circus has a ' within it...' > ... > ... > > But I get an error when I run the .py script from shell saying: > > print

Re: for web application development

2007-06-14 Thread Laurent Pointal
james_027 a écrit : > hi everyone, > > I am very new to python, I am almost done learning the python language > enough that I can start learning developing web app in python. I have > gone thru many research and I still say that I will want to develop > web app in python. Although some says php sh

Re: Cretins.

2007-06-14 Thread Laurent Pointal
Cousin Stanley a écrit : >> On Thu, 14 Jun 2007 09:32:10 +1000, Ben Finney wrote: >> >>> "Dr. Pastor" <[EMAIL PROTECTED]> writes: >>> Please do not do business with those cretins who without authorization attaching [spam footers] >>> Indeed. The cost of Usenet access should not be transla

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-14 Thread Laurent Pointal
n the parsed value into an INT64 after parsing. You dont know if PY_LONG_LONG or INT64 wil not be defined differently in the future, so use them where they are specified, do the assignment, and leave the compiler warn you if anything become invalid in the futur. My 2 cents. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute script on remote computer

2007-06-20 Thread Laurent Pointal
Evan Klitzke a écrit : > On 6/19/07, Vikas Saini <[EMAIL PROTECTED]> wrote: >> I am trying to run the agent on one machine that will execute the >> script of >> a remote machine. > > It's not clear what OS you're using. But if you're running a > Unix/Linux system and it's a relatively simple scri

Re: Changing sound volume

2007-06-25 Thread Laurent Pointal
simon kagwe a écrit : > Hi, > > I am playing sounds using the winsound module. Is there a way I can change > the > volume? > Maybe with pyGame, but you may have to switch from winsound to pygame.mixer.music http://www.pygame.org/ http://www.pygame.org/docs/ref/music

Re: The best platform and editor for Python

2007-07-01 Thread Laurent Pointal
kimiraikkonen wrote: > Hi, > For experienced with Pyhton users, which developing software and > enviroment would you suggest for Pyhton programming? Compiler+Editor > +Debugger. > > Also what are your suggestions for beginners of Pyhton programming? Under Windows, take a look at PyScripter. For

Re: Pretty Scheme, ??? Python

2007-07-02 Thread Laurent Pointal
Neil Cerutti wrote: ... > How can I make the Python more idiomatic Python? Have you taken a look at pyparsing ? http://pyparsing.wikispaces.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Correct abstraction for TK

2007-07-03 Thread Laurent Pointal
have a quick and clean user input solution with GUI in a function. A+ Laurent. [1] http://www.ferg.org/easygui/ [2] http://www.ferg.org/easygui/screenshot-multenterbox.png [3] From the doc: MULTENTERBOX AND MULTPASSWORDBOX -- GETTING

Re: Access to raw command line?

2007-04-26 Thread Laurent Pointal
command line? > Alternatively, does anybody have suggestion of how to do this in a > clean way? To avoid shell extension, try to quote args: ./myprog.py -t "*.gpx" "*.jpg" Or (IMHO simpler) define anoter switch to identify other files: ./myprog.py -t *.gpx -u *.jpg A

Re: simplest install procedure for Python + packages under winXP ?

2007-04-26 Thread Laurent Pointal
stef a écrit : > hello, > > I'm still in the transition of going from MatLab to Scipy, > and installed previous week a SciPy on a PC twice, > through the new "Enstaller". > It's a pitty that there will be no old installer versions anymore > (although I can understand why). > > Although I succeede

Re: Store variable name in another variable

2007-04-26 Thread Laurent Pointal
loial a écrit : > I need to store a list of variable names in a dictionary or list. I > then later need to retrieve the names of the variables and get the > values from the named variables. The named variables will already have > been created and given a value. "Named variables will already have b

Re: Re-ocurring Events

2007-04-26 Thread Laurent Pointal
Daniel Nogradi a écrit : >> A bit more of a complex one this time, and I thought I'd get your >> opinions >> on the best way to achieve this. Basically I'm looking for a way to >> describe >> a re-occurring event, like a calendar event or appointment I guess. I'm >> likely to use an XML file for

Re: Store variable name in another variable

2007-04-26 Thread Laurent Pointal
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Laurent Pointal <[EMAIL PROTECTED]> wrote: >>loial a �crit : >>> I need to store a list of variable names in a dictionary or list. I >>> then later need to retrieve the names of the variables and g

Re: How to find complementary colour for pixel

2007-04-27 Thread Laurent Pointal
Steven D'Aprano a écrit : > I shouldn't think so... I always forget if black is all ones or all > zeroes, so I checked here: http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html For this I use the mnemotechnics idea of "chromatic coil" [*], when there are *all* colors turning it appear to be *white*. A

Re: Chart drawing tool in python

2007-04-30 Thread Laurent Pointal
> Thank you. > You may look at DISLIN too. http://www.mps.mpg.de/dislin/ http://www.mps.mpg.de/dislin/examples.html http://www.mps.mpg.de/dislin/server.html A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Update to Python Quick Reference Card (for Python 2.4) (v0.67)

2007-04-30 Thread Laurent Pointal
://www.limsi.fr/Individu/pointal/python/pqrc/ Note: Next version will target Python 2.5. I'll keep version for Python 2.4 but should only make minor updates. -- Laurent POINTAL CNRS-LIMSI dépt. CHM, groupes AMI et PS Courriel: [EMAIL PROTECTED](prof) [EMAIL PROTECTED] (perso) Ouebe:

Re: Why are functions atomic?

2007-05-01 Thread Laurent Pointal
Michael wrote: > Why are functions atomic? (I.e. they are not copied.) > > For example, I would like to make a copy of a function so I can change > the default values: > from copy import copy f = lambda x: x f.func_defaults = (1,) g = copy(f) g.func_defaults = (2,)

Re: Why are functions atomic?

2007-05-01 Thread Laurent Pointal
Laurent Pointal wrote: > http://docs.python.org/lib/partial-objects.html OOps http://docs.python.org/lib/module-functools.html -- http://mail.python.org/mailman/listinfo/python-list

Re: What do people use for code analysis.

2007-05-02 Thread Laurent Pointal
Steven W. Orr a écrit : > Lots of code, calls to, calls by, inheritance, multiple tasks, etc. > > What do people use to figure out what's happening? > > TIA > I've collected some links over time: http://www.limsi.fr/Individu/pointal/python.html#liens-metaprog You may look at # depgraph - graph

Re: pack/unpack zero terminated string

2007-05-02 Thread Laurent Pointal
tmp123 a écrit : > Hello, > > Thanks for your time. > > After review the "struct" documentation, it seems there are no option > to pack/unpack zero terminated strings. > > By example, if the packed data contains: byte + zero terminated string > + zero terminated string + byte, it seems no possib

Re: pack/unpack zero terminated string

2007-05-02 Thread Laurent Pointal
tmp123 a écrit : > Hello, > > Thanks for your time. > > After review the "struct" documentation, it seems there are no option > to pack/unpack zero terminated strings. > > By example, if the packed data contains: byte + zero terminated string > + zero terminated string + byte, it seems no possib

Re: [ANN] Update to Python Quick Reference Card (for Python 2.4) (v0.67)

2007-05-02 Thread Laurent Pointal
Casey Hawthorne wrote: > PC-cillin flagged this as a dangerous web site. Maybe PC-cillin tag as dangerous all sites about Python, the famous snake. PS. And why does it tag my laboratory work page as dangerous ? It's pure HTML, I worked to have even no javascript, readable with lynx. -- http:

Re: [ANN] Update to Python Quick Reference Card (for Python 2.4) (v0.67)

2007-05-03 Thread Laurent Pointal
Alex Martelli wrote: > Laurent Pointal <[EMAIL PROTECTED]> wrote: > >> Casey Hawthorne wrote: >> >> > PC-cillin flagged this as a dangerous web site. >> >> Maybe PC-cillin tag as dangerous all sites about Python, the famous >> snake. >>

Re: preferred windows text editor?

2007-05-10 Thread Laurent Pointal
T. Crane a écrit : > Right now I'm using Notepad++. What are other people using? > > trevis Notepad++ :-) And still use ConTEXT from time to time when I have big (MB) xml files to look at. -- http://mail.python.org/mailman/listinfo/python-list

Re: High resolution sleep (Linux)

2007-05-11 Thread Laurent Pointal
John a écrit : > Anyways, what I need is high resolution sleep, not high resolution > timing. Installing a real time OS seems like overkill. IDEA Maybe try creating threading.Event and waiting for it with a timeout. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-14 Thread Laurent Pointal
Martin v. Löwis a écrit : > PEP 1 specifies that PEP authors need to collect feedback from the > community. As the author of PEP 3131, I'd like to encourage comments > to the PEP included below, either here (comp.lang.python), or to > [EMAIL PROTECTED] > > In summary, this PEP proposes to allow no

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Laurent Pointal
Long and interresting discussion with different point of view. Personnaly, even if the PEP goes (and its accepted), I'll continue to use identifiers as currently. But I understand those who wants to be able to use chars in their own language. * for people which are not expert developers (non-pros

Re: What's the best way to iniatilize a function

2007-05-28 Thread Laurent Pointal
Jack wrote: >>> 2. what's the right way to call mylib_exit()? I put it in __del__(self) >>> but it is not being called in my simple test. >> >> instance.__del__ is only called when there are no references to the >> instance. > > I didn't call del explicitly. I'm expecting Python to call it when >

Re: Equivalent to gzinflate() function in PHP.

2007-08-02 Thread Laurent Pointal
HelloHelloHelloHelloHelloHelloHelloHelloHelloHell oHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHell oHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHell oHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHell oHelloHelloHelloHello' >>> IMHO th

Re: Python IMAP web-access

2007-08-02 Thread Laurent Pointal
Damjan a écrit : > Is there some project that implements web access to an IMAP store? > > Maybe something AJAXy like http://roundcube.net/?? I dont know if this fill your need, but in my Python bookmarks, for webmail I have a reference to NiMail (http://www.nimail.org/). A+ Laurent.

Re: Email

2007-08-02 Thread Laurent Pointal
> possible ? > some one give me a pointer towards this. You can use iMailer as an example script to get parts: http://nojhan.free.fr/article.php3?id_article=22 A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: (no) fast boolean evaluation ?

2007-08-03 Thread Laurent Pointal
plied, its standard behavior and cannot be modified. IMHO, if you really need all your expressions to be evaluated, the clean (most readable) way may be: a = b = if a and b : ... A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: (no) fast boolean evaluation ? missing NOT

2007-08-03 Thread Laurent Pointal
cannot be True). But if A is True, the compiler must evaluate the second parameter to know the expression result. [note: for the or operator, the short circuit is done if first operand is True] A+ Laurent. PS. See http://en.wikipedia.org/wiki/Truth_table or google for boolean logic tables. -- http://mail.python.org/mailman/listinfo/python-list

Re: Release of Pmw.1.3

2007-08-08 Thread Laurent Pointal
Two problems when trying setup.py installation: * archive unzip into a ./src/Pmw directory - IMHO src is not a good name. * setup.py install failed: [EMAIL PROTECTED] src]# gunzip -c /home/laurent/nobackup/download/Pmw.1.3.tar.gz | tar -xv [EMAIL PROTECTED] src]# cd src [EMAIL PROTECTED] src

Re: python 2.5 bug

2007-08-11 Thread Laurent Pointal
[EMAIL PROTECTED] wrote: > On 11 kol, 11:59, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> On Sat, 11 Aug 2007 02:41:26 -0700, vedrandekovic wrote: >> > I was install Python 2.5 and uninstall Python 2.4 now I cannot run my >> > scripts, only from idle >> >> > What should I do? >> >> Inst

Re: [half-off] LAMA - how to I use the news server with thunderbird

2007-08-14 Thread Laurent Pointal
sts). See http://news.gmane.org/index.php?prefix=gmane.comp.python A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: JPype - passing to Java main

2007-08-14 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : >> Try this: >> com.JPypeTest.main("arg") >> >> Ian > > Thanks for your suggestion, but it doesn't work (produces an error). This is where you should have copy/pasted the error. ;-) > > Does anybody else have any ideas? Sorry, no. -- http://mail.python.org/mailma

Re: Script to copy database

2007-08-14 Thread Laurent Pointal
Tony a écrit : > I'm new at this and would like to know how set up a script to copy a > database from a local computer to a network at a certain time everyday. > Should be simple enough, but, as of now I am unfamiliar with how to do this. > Would this be done by writing a script and setting up a

Re: LEGB rule, totally confused ...

2007-08-14 Thread Laurent Pointal
f I remove "X = X + 1" I don't get an error ??? If you remove the "X =..." statement, then the compiler dont know a-priori if its local or global, so it search X in both namespaces. > Is this a problem of the traceback procedure or the IDE, > or is Python not comple

Re: Python Book Recommendations

2007-08-15 Thread Laurent Pointal
Azazello a écrit : > On Aug 15, 7:47 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote: >> If I could have only one book, I would buy "Core Python, Second >> Edition," by Wesley Chun. >> >> For the record, I own: >> Core Python, Second Edition (great) >> wxPython in Action (haven't used yet) >> Beginn

Re: clarification

2007-08-17 Thread Laurent Pointal
Thomas Jollans a écrit : > On Friday 17 August 2007, Beema shafreen wrote: >> hi everybody, >> i have a file with data separated by tab >> mydata: >> fhl1fkh2 >> shows these two are separated by tab represented as columns >> i have to check the common data between these two coloumn1 an coloumn

Re: clarification

2007-08-17 Thread Laurent Pointal
Laurent Pointal a écrit : [cleaning] fh = open('sheet1') for line in fh: -- http://mail.python.org/mailman/listinfo/python-list

Re: redirect or cover .bat log

2007-08-22 Thread Laurent Pointal
not completly invisible. [for the remaining, its just subprocess module usage - see examples in doc - and reading from output] A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to minimize command window when running wxPython script

2007-08-24 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Dear friends, > > I have almost completed my first wxPython application. The only thing > I need now is to minimize the command window. How is this accomplished > on Win32? Use a .pyw main module (eventually a wrapper calling your main .py module) - it is associate

Re: curses library

2007-08-25 Thread Laurent Pointal
Ghirai wrote: > Hello list, > > I need to write a console application. > > Are there any wrappers around curses/ncurses? > Or any other similar libraries? > > Thanks. I have some links here: http://www.limsi.fr/Individu/pointal/python.html#liens-graph-curses

Re: SCF released to GPL

2007-08-27 Thread Laurent Pointal
hg a écrit : > 2) I'm desperately searching for the French NG from my client but cannot > find it ... any clue ? Maybe you can pass the message ? Done. See http://groups.google.com/group/fr.comp.lang.python/browse_frm/thread/fa4474921f77b1be/8d6150d502447510#8d6150d502447510 -- http://mail.py

Re: SCF released to GPL

2007-08-28 Thread Laurent Pointal
hg a écrit : > 2) I'm desperately searching for the French NG from my client but cannot > find it ... any clue ? Maybe you can pass the message ? Contact Michel Claveau ( [EMAIL PROTECTED] ) for a solution via his Usenet relay. A+ Laurent. -- http://mail.python.org/mailman/list

Re: Coding Standards

2007-08-31 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > 'Good code' is code that works, is bug free, and is readable and > maintainable. Standards need to be followed for coding. Read more... > > http://brsx.co.uk/SWtesting/FAQs/FAQs012.asp You misstyped your URL and referenced a C++ related document, for Python its here

Re: Python object <-> XML

2007-09-03 Thread Laurent Pointal
manipulate the instance, and > save the result back to XML? > > -Samuel I dont know if this suit your needs: http://uche.ogbuji.net/tech/4suite/amara/ Take a look at the Amara Bindery: http://uche.ogbuji.net/tech/4suite/etc/amara-manual.html#bindery A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

XML: SAX and XInclude

2007-09-10 Thread Laurent Pointal
ll work on OpenDocument XML production - and would like to split PQRC xml source into several files). A+ Laurent. Problem with libxml2: [EMAIL PROTECTED] qrccompiler]$ python compiler.py processing Traceback (most recent call last): File "compiler.py", line 573, in sys.e

Re: XML: SAX and XInclude

2007-09-11 Thread Laurent Pointal
Stefan Behnel a écrit : > Laurent Pointal wrote: >> does anybody know about an XML parser usable with the sax API (xml.sax) >> and with XInclude feature support (directly or via hacks). > > Try lxml.etree. > > http://codespeak.net/lxml/ > > http://codesp

Re: memcpy

2007-09-11 Thread Laurent Pointal
ndex into that array and see my > data. I have a pointer to shared meory but I don't know how to access > it. See module ctypes (14.14 in library reference manual). A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get the complete command line as-is

2007-09-12 Thread Laurent Pointal
(I dont know if it is available in pywin32 package - you may need to write a wrapper with ctypes). See http://msdn2.microsoft.com/en-us/library/ms683156.aspx A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: read part of jpeg file by pure python

2007-09-13 Thread Laurent Pointal
b-picture, and save it back - generally with compression. I can't see how you can bypass the uncompress/compress phases and the corresponding memory use. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Device Drivers in python(kernel modules)

2007-03-07 Thread Laurent Pointal
John Nagle a écrit : > Thomas Ploch wrote: >> rishi pathak schrieb: >> >>> I am not much of a kernel programmer , I have a requirement to shift a >>> python code to work as a kernel module. >>> So I was just wondering whether we can write a kernel module in python. >>> A thought is that if we can s

Generator expression parenthesis mixed with function call ones

2007-03-07 Thread Laurent Pointal
[Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32] Given the following: >>> sum(i for i in range(10)) 45 >>> def f(*args) : print args ... >>> f(i for i in range(10)) (,) >>> def f(a,*args) : print a,ar ... >>> f(4,i for i in range(10)) File "", line 1 SyntaxError:

Re: Generator expression parenthesis mixed with function call ones

2007-03-07 Thread Laurent Pointal
Facundo Batista a écrit : > Laurent Pointal wrote: > > >>>>> f(4,i for i in range(10)) >> File "", line 1 >> SyntaxError: invalid syntax >> >> >> Why does Python allow generator expression parenthesis to be mixed with >>

Re: Generator expression parenthesis mixed with function call ones

2007-03-07 Thread Laurent Pointal
Dennis Lee Bieber wrote: > On Wed, 07 Mar 2007 17:15:33 +0100, Laurent Pointal > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> >> How a Python beginner know that he is using a generator and not a >> list-comprehension ? >> > A l

Re: Generator expression parenthesis mixed with function call ones

2007-03-07 Thread Laurent Pointal
Gabriel Genellina wrote: > En Wed, 07 Mar 2007 12:53:43 -0300, Laurent Pointal > <[EMAIL PROTECTED]> escribió: > >>>>> f(4,i for i in range(10)) >> File "", line 1 >> SyntaxError: invalid syntax > > 2.5 has a better error mes

Re: Generator expression parenthesis mixed with function call ones

2007-03-08 Thread Laurent Pointal
it seem I'm not alone to dislike parens confusion. http://mail.python.org/pipermail/python-dev/2003-October/038906.html Thanks for the pointer. Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a DLL file from Python Code

2007-03-09 Thread Laurent Pointal
lient/server model. Note2: as long as your interface dont change, you can make modifications in both sides without problem. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: UTF-8

2007-03-10 Thread Laurent Pointal
all Python installations, whatever be the defautl encoding. Hope this will become mandatory in a future Python version. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Database module & multithreading

2007-03-10 Thread Laurent Pointal
case multi threading capabilities are # 1 > requirement. > > > Thanx Guys > > Anil See the threadsafety flag of Python DB-API V2 compliant database modules. 0 = no thread safe 1 = threads may share module 2 = + may share connections 3 = + may share cursors A+ Laurent. -- http://

Re: UTF-8 output problems

2007-03-10 Thread Laurent Pointal
ferently when the output is redirected? This failure > occurs for all redirection, by the way: >, >>, 1>2, pipes, and so forth. > > Any ideas? In complement to Marc reply, you can open a file with a specific encoding (see codecs.open() function), and use print >> f,... to fill that file. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Attribute monitoring in a class

2007-03-14 Thread Laurent Pointal
x27;m the 'x' property.") New in version 2.2. """ > obj = Class() > obj.attr = "other whatever" > > *Output:* > It has changed > > / > Thanks for the help. > Regards/ > / A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Grep Equivalent for Python

2007-03-14 Thread Laurent Pointal
Steve Holden a écrit : > Regular expressions aren't really needed here. Untested code follows: > > for line in open('/proc/meminfo').readlines: for line in open('/proc/meminfo').readlines(): > if line.startswith("Memtotal:"): > name, amt, unit = line.split() > print name, amt,

Re: dict.items() vs dict.iteritems and similar questions

2007-03-14 Thread Laurent Pointal
tems and range build complete list when called. Both work, you may prefer xrange/iteritems for iteration on large collections, you may prefer range/items when processing of the result value explicitly need a list (ex. calculate its length) or when you are going to manipulate the original contai

Re: dict.items() vs dict.iteritems and similar questions

2007-03-15 Thread Laurent Pointal
Paul Rubin a écrit : > Laurent Pointal <[EMAIL PROTECTED]> writes: >> Both work, you may prefer xrange/iteritems for iteration on large >> collections, you may prefer range/items when processing of the result >> value explicitly need a list (ex. calculate its length)

Re: spawn process in a new console window

2007-03-15 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > On Mar 14, 9:56 pm, [EMAIL PROTECTED] wrote: >> Hello, >> >> I have a script that launches a sequence of other programs, some GUI, >> some console. I'd like the console programs to launch in their own >> console window, instead of all of them sharing the script's cons

Re: python noob, multiple file i/o

2007-03-16 Thread Laurent Rahuel
Maybe the walk method in os module is what you need http://docs.python.org/lib/os-file-dir.html Regards Jon Clements wrote: > On 16 Mar, 09:02, "Jon Clements" <[EMAIL PROTECTED]> wrote: >> On 16 Mar, 03:56, "hiro" <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> > Hi there, >> >> > I'm very new to p

Re: XML based programming language

2007-03-19 Thread Laurent Pointal
stefaan a écrit : >> Elementtree isn't lex. You are comparing apples and oranges here. Lex >> tokenizes, yacc creates trees. Both of is covered in XML itself - it's >> defined the tokenization and parsing, built into elementtree. So, >> elemnttree is lex _and_ yacc for XML. And if your language is

Re: How many connections can accept a 'binded' socket?

2007-03-20 Thread Laurent Pointal
billiejoex a écrit : > Hi, > I'm writing a small asyncore-based server application serving a lot of > clients. When I have to handle more than 1021 client simoultaneously > the 'binded' socket object raises an error: > > [...] > connections: 1018 > connections: 1019 > connections: 1020 > connectio

Re: why brackets & commas in func calls can't be ommited? (maybe it could be PEP?)

2007-03-22 Thread Laurent Pointal
Dennis Lee Bieber a écrit : > On Thu, 22 Mar 2007 03:27:37 +1100, Steven D'Aprano > <[EMAIL PROTECTED]> declaimed the following in > comp.lang.python: > >> So what should "a b c d" be? >> >> (a, b, c, d) >> a(b, c, d) >> a(b, (c, d)) >> a(b(c, d)) >> a(b(c(d))) >> >> Have I missed anything? Which

Re: how can I invoke a Java code?

2007-03-23 Thread Laurent Pointal
momobear a écrit : > A friend of my write a Java program, and I want use it in my python > program as a module. I searched the topic in Google and find maybe the > better way is use GCJ to compile it. Is there any other way for me? > the simple and speediness choice the better. thanks. See my lin

Re: Create new processes over telnet in XP

2007-03-23 Thread Laurent Pointal
Jorgen Grahn wrote: > On 23 Mar 2007 03:47:14 -0700, Godzilla <[EMAIL PROTECTED]> wrote: >> Hello, >> >> How do you create/spawn new processes in XP over telnet using python? >> I.e. I would like to create a new process and have it running in the >> background... > > Ssh -- or even rsh -- are bet

Re: Create new processes over telnet in XP

2007-03-26 Thread Laurent Pointal
r because it uses a GUI. Take a look at PortablePython, this may be the easy solution... http://www.portablepython.com/ A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML Parsing

2007-03-28 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > I want to parse this XML file: > As you might have guessed, I want to create files from this XML file > contents, so how can I do this? > What modules should I use? What options do I have? Where can I find > tutorials? Will I be able to put > this on the internet (on

Re: Remote XML Parsing

2007-03-30 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > How can I parse a remote XML file with Python? > And what will I be able to do with this XML file in Python? > > Sorry if this is a noob-ish question. You can process XML data with Python as long as you can get it - you will be able to do what you want with it. How

Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread Laurent Pointal
Max Kubierschky a écrit : > Hello, > > I'm planning to give a game programming course for kids of mixed age. > For this, I am looking for an open source 2D game development kit. > I am also willing to participate in the development of the development kit. > > Features I'd like to see > - Possibil

Re: Library for windows ini-files ?

2007-03-30 Thread Laurent Pointal
stef a écrit : > hello, > > is there a Python library for easy reading and writing windows ini-files ? http://docs.python.org/lib/module-ConfigParser.html A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Object Oriented Database with interface for Pyhton

2007-03-30 Thread Laurent Pointal
MC a écrit : > Salut! > > Heureusement qu'il y a qq français pour faire un peu de ménage... Question de décalage horaire ? -- http://mail.python.org/mailman/listinfo/python-list

Re: clean up html document created by Word

2007-03-30 Thread Laurent Pointal
jd wrote: > I am looking for python code (working or sample code) that can take an > html document created by Microsoft Word and clean it up (if you've > never had to look at a Word-generated html document, consider yourself > lucky ;-) Alternatively, if you know of a non-python solution, I'd > l

<    1   2   3   4   5   >