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

Re: Printing a text over an image

2012-11-07 Thread Laurent Pointal
Martha Morrigan wrote: > > 3) Any more simple approach or module to deals with printers (paper > and/or pdf) will be welcome. For pdf, you can take a look at ReportLab's Toolkit. I used it to build a "trombinoscope" (ie an employee directory with each member's photo on top of his name and room

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

[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
Chris Angelico wrote: > On Fri, May 6, 2016 at 11:45 PM, Grant Edwards > wrote: >>> JavaScript is terrible. Really, really bad. And because of that, it >>> has the potential to sweep the world. >> >> If your reasoning is correct, it'll never be able to overtake PHP. >> >> I've never written anyth

Re: Performance with and without the garbage collector

2016-05-14 Thread Laurent Pointal
Steven D'Aprano wrote: > Just for kicks, I've been playing around with running code snippets with > and without the garbage collector enabled, looking to see if it will make > any obvious difference to performance. > > So far, I haven't found any. > > For instance, I tried: > > a = [i**3 for i

Re: A tough one: split on word length?

2016-05-16 Thread Laurent Pointal
DFS wrote: > Have: > '584323 Fri 13 May 2016 17:37:01 - (UTC) 584324 Fri 13 May 2016 > 13:44:40 -0400 584325 13 May 2016 17:45:25 GMT 584326 Fri 13 May 2016 > 13:47:28 -0400' > > Want: > [('584323', 'Fri 13 May 2016 17:37:01 - (UTC)'), >('584324', 'Fri 13 May 2016 13:44:40 -0400'), >

Re: Request for opinions: A cross language development tool

2016-06-23 Thread Laurent Pointal
Tal Zion wrote: > Bridge compiles Python modules into native code, What is "native", really microprocessor executable binary ? How do you adapt to diversity? > which requires us to > support Python *language* features (for, while, class, generators, etc) > but it reuses CPython's libraries (li

Re: I need a pure python module from PyPI without additional packages on my OS.

2016-07-03 Thread Laurent Pointal
Seti Volkylany wrote: > I heard about cairo, but it required installed on my computer before. Some precision would be wellcome. Do you need any pure Python module from PyPI ? Do you need a "cairo compatible" pure Python module from PyPI ? A+ L.P. -- https://mail.python.org/mailman/listinfo/py

Re: What the deal with python3.5m.so and python3.5.so ??

2016-07-03 Thread Laurent Pointal
Steven Truppe wrote: > Hi all, > > can someone tell me the difference between python3.5m.so and python3.5.so > ?? The 'm' tagged version is for a Python compiled with PyMalloc: https://www.python.org/dev/peps/pep-3149/ (found it with Blender's bundled Python) > > Tanks in advance, > Steven T

Re: Touch screen development in Python

2016-07-11 Thread Laurent Pointal
Jahn wrote: > Hi , > Does anyone use Python for developping applications that work with a > touch screen? You should take a look at Kivy: https://kivy.org/ A+ L.Pointal. -- https://mail.python.org/mailman/listinfo/python-list

Re: Touch screen development in Python

2016-07-13 Thread Laurent Pointal
Jahn wrote: > I was thinking about Python touch screen applications for industrial > boards( computers). > If I have a touch screen with that industrial board, what I must have > installed to be able to > write touch screen applications in Python? If you go with Kivy (its built for multitouch g

Re: an error

2016-07-19 Thread Laurent Pointal
WePlayGames WeEnjoyIt wrote: > elif p2==8: >pygame1.blit(image3,(143,146) <= missing ) > total+=1 > fps=40 > clockfps.tick(fps) > pygame.display.update() > > the problem with this is that i get an syntax error at the very end at the > TOTAL+=1 when i delete this it tells me

Re: logging: getLogger() or getLogger(__name__)?

2016-07-27 Thread Laurent Pointal
Malcolm Greene wrote: > I've read that best practice for logging is to place the following line > at the top of all modules: > > logger = getLogger(__name__) > > I'm curious why the following technique wouldn't be a better choice: > > logger = getLogger() > > Are there scenarios that favor

Re: Writing big XML files where beginning depends on end.

2005-11-28 Thread Laurent Pointal
Magnus Lycka wrote: > We're using DOM to create XML files that describes fairly > complex calculations. The XML is structured as a big tree, > where elements in the beginning have values that depend on > other values further down in the tree. Imagine something > like below, but much bigger and much

Re: appending messages in imaplib

2005-12-05 Thread Laurent Pointal
[EMAIL PROTECTED] wrote: > So I have the unfortunate task of migrating several hundred users from > local mail (mbox and mh) up to an exchange server as part of wearisome > SOX compliance nonsense. > > I thought the best path through this thicket would be to knock up a > quick python script using

Re: Creating referenceable objects from XML

2005-12-05 Thread Laurent Pointal
Michael Williams wrote: > Hi All, > > I'm looking for a quality Python XML implementation. All of the DOM > and SAX implementations I've come across so far are rather convoluted. > Are there any quality implementations that will (after parsing the XML) > return an object that is accessible by

Re: Unpacking Binary Data - not using struct module

2004-12-16 Thread Laurent Pointal
Geoffrey wrote: My questions ... 1) Does anyone recognize this numeric format ? Seem to be some decimal coded binary, where you only use hexa from 0 to 9, coding corresponding decimal digits. The trailing hexa F may be used to indicate the end of the number (if number can have variable length) as

Re: understanding someone else's program

2013-11-18 Thread Laurent Pointal
gt; making it difficult to trace what happens to a certain variable > > Am using ERIC4 IDE. To help for documentation, you may test pycallgraph, eventually depgraph if there are multiple modules. http://pycallgraph.slowchop.com/en/master/ http://www.tarind.com/depgraph.html A+ Laurent. --

Re: run command line on Windows without showing DOS console window

2013-11-20 Thread Laurent Pointal
-nd http://example.com/packages/ >> >> the path to wget is C:\Program Files\GnuWin32\bin\wget.exe >> > > subprocess.call(["wget", "-r", "-np", "-nd", "http://example.com";]) Complement: use .pyw extension for

Re: Bug in Python 3.5.1

2015-12-24 Thread Laurent Pointal
Hello, nisthesec...@verizon.net wrote: > Dear Sir, >I downloaded and installed Python 3.5.1 in Windows 10. >The pip command was not part of it. >In the future, can you kindly include numpy, scipy, and pygame as part >of the Python release? >I am a teacher trying to teach P

Re: ouvrir python

2016-01-06 Thread Laurent Pointal
Vincent Vande Vyvre wrote: > Le 04/01/2016 10:10, Jacques Rosier a écrit : >> J’ai téléchargé Python 351. Il est dans la liste des applications de mon >> ordi (Lenovo; Windows 10). Mais impossible de l’ouvrir. Que faire? > Cette liste de diffusion est anglophone, je te recommande de poster sur > c

Re: from a module return a class

2016-03-18 Thread Laurent Pointal
John Gordon wrote: > In <56eaecc8$0$3658$426a7...@news.free.fr> Laurent Pointal > writes: > >> >> user_pword = promptUser_PWord() >> > >> > Show us the complete definition of promptUser_PWord(). > >> AFAIU It looks to be the module…

Re: from a module return a class

2016-03-19 Thread Laurent Pointal
kevind0...@gmail.com wrote: > Hello: > > Working with python 2.7. > > I have a module promptUser_PWord that will prompt a user for their user > name and pword. Works fine stand alone. > I also have a module, genXLS that does a bunch of processing it has worked > fine for months. And a class U

Re: from a module return a class

2016-03-19 Thread Laurent Pointal
John Gordon wrote: > In > kevind0...@gmail.com writes: > >> ## prompt the user for a User name a& pWord >> user_pword = promptUser_PWord() > >> I get the error >> File "H:\dev\eclipse\workspace\genXls\src\genXls\promptUser_PWord.py", >> line 58 >> return user_pword >> SyntaxErr

Re: Help understanding list operatoins inside functions in python 3

2015-01-13 Thread Laurent Pointal
Hello, stephen.bou...@gmail.com wrote: > I'm a bit confused why in the second case x is not [1,2,3]: > > x = [] > > def y(): > x.append(1) > > def z(): > x = [1,2,3] Here x is a local, so global x is not modified. If you want to modify gobal x, write: def z(): global x x = [1,

[Annonce] Une introduction à Python 3 - nouvelle version

2015-01-18 Thread Laurent Pointal
[updated book in french] Bonjour, L'ouvrage d'introduction à la programmation avec Python3 de B.Cordeau et L.Pointal a été mis à jour en version 1.618. Outre des améliorations dans la mise en page, les modifications suivantes ont été réalisées: * Tous les dessins ont été refaits en utilisant l

Re: decimal numbers

2014-02-15 Thread Laurent Pointal
luke.gee...@gmail.com wrote: > hello, > i have been working on a python resistor calculator to let my class show > what you can do with python. now i have a script that makes the more > speekable value of the resistance (res) > > #if len(str(res)) > 9: > # res2 = res / 10 > # print "de

Re: What are the kinds of software that are not advisable to be developed using Python?

2014-02-22 Thread Laurent Pointal
Chris Angelico wrote: > Heavy computation might be unideal in Python, but if you can grunge it > into NumPy operations, that won't be a problem. May take a look to Pythran too, which generate C++ code from (limited subset of) Python code, usable as a Python compiled module or as standalone C++.

RE: Controlling buffer alignment in file.read()

2014-03-22 Thread Laurent Pointal
Haralanov, Mitko wrote: >> For control at that level you'd be better off using >> direct system calls, i.e. os.open() and os.read(), >> then you can read exacty the number of bytes you want. >> > > The problem is not controlling the number of bytes read. That part seems > to be working. The issu

Re: Aide pour bien démarrer en Python

2013-09-29 Thread Laurent Pointal
tion qui > pourrait répondre à mes intérogations ? http://w2.syronex.com/jmr/python-paradox http://dirtsimple.org/2004/12/python-is-not-java.html Et deux textes dont on a l'impression qu'ils résultent d'un traducteur automatique: http://fr.softuses.com/231303 http://fr.softuses.com/1

Re: Py 3.3.2, MacBookPro, segmentation fault, GCC issue?

2013-11-10 Thread Laurent Pointal
piler tool. See discussions and links in http://stackoverflow.com/questions/9353444/how-to-use-install-gcc-on-mac-os-x-10-8-xcode-4-4 There may be other solutions, but you should prefer ask in a specific MacOS usenet group. A+ > > Thanks for any advice you may have. -- Laurent POIN

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-18 Thread Laurent Pointal
Aditya Raj Bhatt wrote: > I always do single line comments with # but just for the sake of it I > tried it with ''' ''' and it gives me a syntax error. > > In both the interpreter, and the source code text file, doing - > > a = 5 '''a comment''' > > results in a syntax error, with the very last

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-18 Thread Laurent Pointal
Laurent Pointal wrote: (oups) > Take care of indent: > > def f(x): > a = 5 > """an correctly indented expression to be > inside the function""" > return a * x Here only the first indent of """ at beginning of

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-18 Thread Laurent Pointal
Aditya Raj Bhatt wrote: > On Wednesday, March 18, 2015 at 1:04:39 PM UTC-5, Laurent Pointal wrote: >> > Can someone also provide a sort of a 'guide' to triple-quoted > comments >> > in general? >> >> A triple ' or " string is a Python st

Re: should "self" be changed?

2015-05-26 Thread Laurent Pointal
zipher wrote: > Would it be prudent to rid the long-standing "argument" (pun unintended) > about self and the ulterior spellings of it, by changing it into a symbol > rather than a name? > > Something like: > > class MyClass(object): > > def __init__(@): > @.dummy = None Just seein

Re: PYTHON QUESTION

2015-06-14 Thread Laurent Pointal
adebayo.abra...@gmail.com wrote his student exercise as raw text: > Help with this problem! > > Temperature converter > Description > > Write two functions that will convert temperatures back and forth from the > Celsius and Fahrenheit temperature scales. The formulas for making the > conversion

Re: HOPE: A Python just-in-time compiler for astrophysical computations

2015-06-23 Thread Laurent Pointal
Mark Lawrence wrote: > Another beasty I've just stumbled across which you may find interesting > http://www.sciencedirect.com/science/article/pii/S2213133714000687 Why use a JIT complation when you could use some C++ generation then compilation as Python module, like with Pythran ? https://git

Re: Bug in floating point multiplication

2015-07-02 Thread Laurent Pointal
Steven D'Aprano wrote: > Despite the title, this is not one of the usual "Why can't Python do > maths?" "bug" reports. > > Can anyone reproduce this behaviour? If so, please reply with the version > of Python and your operating system. Printing sys.version will probably > do. On Kubuntu 15.04,

Re: Trying to import numpy

2015-07-07 Thread Laurent Pointal
ryguy7272 wrote: > I'm trying to use numpy. I get this error: import numpy as np > > Traceback (most recent call last): > File "", line 1, in > import numpy as np > ImportError: No module named numpy > > > > I followed the instructions here. > https://pip.pypa.io/en/latest/install

Re: Why doesn't input code return 'plants' as in 'Getting Started with Beautiful Soup' text (on page 30) ?

2015-07-12 Thread Laurent Pointal
Simon Evans wrote: > - with open("C:\Beautiful Soup\ecologicalpyramid.html","r") as You seem to run Python under Windows. You have to take care of escape mechanism beyond \ char in string literals (see Python docs). By

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-08 Thread Laurent Pointal
Terry Reedy wrote: > There have been discussions, such as today on Idle-sig , about who uses > Idle and who we should design it for. If you use Idle in any way, or > know of or teach classes using Idle, please answer as many of the > questions below as you are willing, and as are appropriate I t

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-09 Thread Laurent Pointal
random...@fastmail.us wrote: > On Sat, Aug 8, 2015, at 13:59, Laurent Pointal wrote: >> > Level? >> >> Graduate (post-Bac in france) > > Yours or your students? My students. > >> > 1. Are you >> > grade school (1=12)? >> >> (so

Regular expression and substitution, unexpected duplication

2015-08-18 Thread Laurent Pointal
Hello, I want to make a replacement in a string, to ensure that ellipsis are surrounded by spaces (this is not a typographycal problem, but a preparation for late text chunking). I tried with regular expressions and the SRE_Pattern.sub() method, but I have an unexpected duplication of the repl

Re: Regular expression and substitution, unexpected duplication

2015-08-19 Thread Laurent Pointal
MRAB wrote: > On 2015-08-18 22:42, Laurent Pointal wrote: >> Hello, >> ellipfind_re = re.compile(r"((?=\.\.\.)|…)", re.IGNORECASE|re.VERBOSE) >> ellipfind_re.sub(' ... ', >> "C'est un essai... avec différents caractères… pour

Re: Check if dictionary empty with == {}

2015-08-20 Thread Laurent Pointal
Anton wrote: > Probably a silly question. > Let's say I have a dictionary mydict and I need to test if a dictionary is > empty. > > I would use > > if not mydict: > """do something""" > > But I just came across a line of code like: > > if mydict == {}: > """do something""" > > which s

[ANN] Python TreeTagger wrapper updated to 2.2.1

2015-08-25 Thread Laurent Pointal
also added a treetaggerpoll module for use in a multiprocessing context. For important (and incompatible) modifications, see http://treetaggerwrapper.readthedocs.org/en/latest/#important-modifications-notes A+ Laurent Pointal -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Python TreeTagger wrapper updated to 2.2.1

2015-08-25 Thread Laurent Pointal
Laurent Pointal wrote: > It is available on PyPI: … incomplete URL… Here: https://pypi.python.org/pypi/treetaggerwrapper/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Idiosyncratic python

2015-09-24 Thread Laurent Pointal
wxjmfa...@gmail.com wrote: > Le jeudi 24 septembre 2015 08:02:38 UTC+2, Steven D'Aprano a écrit : >> >> >> What are your favorite not-wrong-just-weird Python moments? >> >> > Showing how to make Python 3.5.0 crash by > just using an "é", U+00E9. Like this ? Python 3.5.0 (default, Sep 24 201

Re: [ANN] Python 3 Cheat Sheet v2.0

2015-10-31 Thread Laurent Pointal
Le Sat, 31 Oct 2015 12:16:08 +1100, Steven D'Aprano a écrit : > On Sat, 31 Oct 2015 06:56 am, Laurent Pointal wrote: >> https://perso.limsi.fr/pointal/python:memento > > > Very nice! Thank you! > > > Some small typos in the English version: Thanks for

Re: Python in financial services

2014-08-19 Thread Laurent Pointal
wxjmfa...@gmail.com wrote: > I recommend to toy intensively with the 'EURO SIGN' in > strings manipulations. > > Py3: It may luckily work, Python may crash or fails (it raises > unicode errors on valid string!). > > Py2: It is safer and solid. There is however a subtility. 3rd > party tools may

Re: Begginer in python trying to load a .dll

2014-08-19 Thread Laurent Pointal
c1234 py wrote: > This appear in the terminal: > > runfile('C://Python Scripts') > File "C:\\sitecustomize.py", line 585, in runfile > execfile(filename, namespace) > File "C://Sin título 38.py", line 19, in > hllApi = hllApiProto (("HLLAPI", hllDll), hllApiParams) > AttributeE

Re: dynamic values in yaml

2014-08-19 Thread Laurent Pointal
raphi...@gmail.com wrote: > Hi, > > I'm using pyyaml, and need some values in a yaml files to be dynamic, for > example somethin like: > > filename: /tmp/backup_{% time.strftime('%Y-%m-%d') }.tgz > > Is there a simple way to achieve this? (Eg with a templating system that > would first hand

Re: dynamic values in yaml

2014-08-20 Thread Laurent Pointal
raphi...@gmail.com wrote: > Note that in my example the content to be inserted is not the result of a > variable substitution, but the result of a call to a function. format > doesn't seem to work in this case. And jinja2 doesn't seem to provide a > straight forward solution either > > Thx Yoy

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-02 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : ... > Ideally, I'd like a whole series of projects where I'm walked through > how to go about writing real Python. The way I look at it, nobody > learnt to build a house just from reading about building materials! Take a look at "Dive Into Python" from Mark Pilgrim, goo

Re: how to stop python

2006-08-02 Thread Laurent Pointal
victor a écrit : > or if u want explicit exit of program then use: > > import sys > sys.exit(1) > > or > > raise SystemExit, 'message' There is also the (not recommanded - see docs, but it exists) os._exit(n) function. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode/utf-8 data in SQL Server

2006-08-09 Thread Laurent Pointal
John Machin a écrit : > The customer should be very happy if you do > text.decode('utf-8').encode('cp1252') -- not only should the file > import into Excel OK, he should be able to view it in > Word/Notepad/whatever. + text.decode('utf-8').encode('cp1252',errors='replace') As cp1252 may not cover

Re: Reference Variables In Python Like Those In PHP

2006-08-16 Thread Laurent Pointal
Chaos a écrit : > Is It possible to have reference variables like in PHP > > ex. > > > $x = 1; > $y =& $x; > > $y += 1; > > echo $x; > echo "\n" > echo $y; > > ?> > > This would show > > 2 > 2 > > Is this available in python? See other replies (ie. in Python all variables are names refer

Re: Subprocess confusion: how file-like must stdin be?

2006-08-18 Thread Laurent Pointal
Cameron Laird a écrit : > In article <[EMAIL PROTECTED]>, > Nick Craig-Wood <[EMAIL PROTECTED]> wrote: >> Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >>> On Thu, 17 Aug 2006 17:16:25 +, [EMAIL PROTECTED] (Cameron Laird) >>> declaimed the following in comp.lang.python: >>> Question: >>>

Re: What do you want in a new web framework?

2006-08-21 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > Hello Everyone, > > Now, I'm working on a new web framework. I tried many test on the other > programming languages. Then i decided to use python on my web framework > project. > > Now i want to listen all of you. What do you want in that web > framework(Easy use of

Re: Looking for assignement operator

2006-10-17 Thread Laurent Pointal
Alexander Eisenhuth a écrit : > Hello, > > is there a assignement operator, that i can overwrite? Adding to Simon Brunning reply (assignment is a statement). > class MyInt: > def __init__(self, val): > assert(isinstance(val, int)) > self._val = val > > a = MyInt(10) > > # H

Re: I would like write some data recovery software

2006-10-17 Thread Laurent Pointal
gel a écrit : > I would like to write some data recovery software as a learning thing. > The sort of thing that you would use to recover data from a currupt HDD > or floppy etc. I would like to be pointed in the right direction as > far as modules to use and suggested approaches. > Once you get

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Laurent Pointal
Thomas Heller a écrit : > Ben Finney schrieb: >> "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: >> >> [quoting problems fixed] >> >>> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: some days, I ask myself why I shouldn't just use GPL for everything I do, and ship it as source code only. >>

Re: PyFAQ: help wanted with thread article

2006-11-14 Thread Laurent Pointal
Fredrik Lundh a écrit : > this FAQ item talks about using sleep to make sure that threads run > properly: > > http://effbot.org/pyfaq/none-of-my-threads-seem-to-run-why.htm > > I suspect it was originally written for the "thread" module, but as > far as I know, the "threading" module takes care o

Re: graphical class diagram tool?

2006-11-14 Thread Laurent Pointal
nic a écrit : > Hi all > Some years ago I saw a graphical class diagram generated by > examining a python program. I *thought* that this was done with Boa > Constructor, but I may be wrong. I've download a recent version of BC > and can't find reference to this feature. Can anyone point me at o

Re: Python-2.5.exe?

2006-11-15 Thread Laurent Pointal
Andrew Burton wrote: > What Python is best for installing to a USB Drive? I've actually got > 2.5 on a drive, but I forget which installation package I used. Maybe this one ? http://www.voidspace.org.uk/python/movpy/ > It > seems to me that it was an EXE file, but I cannot seem to find one of

Re: os.lisdir, gets unicode, returns unicode... USUALLY?!?!?

2006-11-17 Thread Laurent Pointal
gabor a écrit : > hi, > > from the documentation (http://docs.python.org/lib/os-file-dir.html) for > os.listdir: > > "On Windows NT/2k/XP and Unix, if path is a Unicode object, the result > will be a list of Unicode objects." Maybe, for each filename, you can test if it is an unicode string, and

Re: Running Python scripts under a different user

2006-05-29 Thread Laurent Pointal
Bernard Lebel a écrit : > On 5/26/06, Laszlo Nagy <[EMAIL PROTECTED]> wrote: >> For Windows, you can use the 'runas.exe' program. But it requires a >> password too. >> >> From what you wrote, I think that you need to change architecture. You >> should write your own service rather than write trick

Re: How to format datetime values

2006-06-02 Thread Laurent Pointal
A.M a écrit : > "BartlebyScrivener" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Are you trying to get banned, or what? >> >> It's the equivalent of me asking you: >> >> Hey, does Ruby have anything like dictionaries and will you teach me >> about strings? Oh, and what's an ob

Re: Python for Visual Basic or C# programmers

2006-06-02 Thread Laurent Pointal
A.M a écrit : > Hi, > > > > I am trying to find the equivalent functions such as vb's str or asc in > Python. Is there any resource that help me to find these kinds of functions > in Python faster? I've written the PQRC for that purpose: http://www.limsi.fr/Individu/pointal/python/pqrc/

ANN: PQRC - Python Quick Reference Card - v 0.55

2006-06-03 Thread Laurent Pointal
[for those who dont read clp.announce] The Python Quick Reference Card (PQRC) aims to provide a printable quick reference documentation for the Python language and some of its main standard libraries (currently for Python 2.4). PQRC tries to group informations about same/similar subject to avoid

Re: ANN: PQRC - Python Quick Reference Card - v 0.55

2006-06-04 Thread Laurent Pointal
Kent Johnson wrote: > Laurent Pointal wrote: >> And I'll maintain a fixed URL at >> >> http://laurent.pointal.org/python/pqrc/ > > Broken at the moment. Its back. Its at my home ADSL, normally online, but my provider reset the connexion each 24h and its home

Re: Python is fun (useless social thread) ;-)

2006-06-16 Thread Laurent Pointal
John Salerno a écrit : ... > I do, however, think the docs are pretty good, although I sometimes find > myself just wishing that a function definition was simply laid out in an > easy to read format that included all of its parameters, so I would know > exactly what to pass to it (I guess help() is

Re: [OT] code is data

2006-06-19 Thread Laurent Pointal
bruno at modulix a écrit : > Anton Vredegoor wrote: >> bruno at modulix wrote: >> >>> I still don't get the point. >> >> Well, I've got to be careful here, lest I'd be associated with the >> terr.., eh, the childp..., eh the macro-enablers. >> >> The idea is to have a way to transform a Python (.py

Re: [OT] code is data

2006-06-20 Thread Laurent Pointal
Fredrik Lundh a écrit : > Laurent Pointal wrote: > >>>> The idea is to have a way to transform a Python (.py) module into XML >>>> and then do source code manipulations in XML-space using ElementTree. >>> >>> My my my... I'm not against the id

Re: How to truncate/round-off decimal numbers?

2006-06-20 Thread Laurent Pointal
Girish Sahani a écrit : > Hi, > > I want to truncate every number to 2 digits after the decimal point. I > tried the following but it doesnt work. > a = 2 b = 3 round(a*1.0 / b,2) > 0.67004 > > Inspite of specifying 2 in 2nd attribute of round, it outputs all the > dig

Re: Problem with sets and Unicode strings

2006-06-28 Thread Laurent Pointal
Dennis Benzinger a écrit : > No, byte strings contain characters which are at least 8-bit wide > . But I don't understand what > Python is trying to decode and why the exception says something about > the ASCII codec, because my file is encoded with UTF-8. [a

Re: best small database?

2006-09-11 Thread Laurent Pointal
David Isaac a écrit : > I have no experience with database applications. > This database will likely hold only a few hundred items, > including both textfiles and binary files. > > I would like a pure Python solution to the extent reasonable. > > Suggestions? May take a look at buzhug (very pyth

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: 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
Dennis Lee Bieber a écrit : > On Sun, 1 Oct 2006 22:28:10 +0200, "Oeyvind Brandtsegg" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> Also, I wonder what method I should be using to get a precise timing >> in my automation thread (acting as a sequencer). >> > Use a re

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
Roberto Bonvallet a écrit : > Chuck Rhode wrote: >> I couldn't find a routine to clean up, regularize, and reformat Python >> code, so I wrote one: >> >> http://www.lacusveris.com/PythonTidy/PythonTidy.python >> >> Now, I'm looking for beta-testers. Compensation is a bit on the low >> side. In f

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
antred a écrit : > I've noticed something odd in Python 2.5, namely that the 2 argument > version of 'assert' is broken. Or at least it seems that way to me. > > Run the following code in your Python interpreter: > > myString = None > > assert( myString, 'The string is either empty or set to the

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: which "GUI module" you suggest me to use?

2007-06-06 Thread Laurent Pointal
ZioMiP a écrit : ... > I think is like a "live browser"... not only render HTML because the > webpage got a bit of javascript inside... Does the rendering absolutely need to be in your own GUI ? Else you can use the *webbrowser* module and simply call user preffered browser to display data and

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

  1   2   3   >