Re: reflection as in Java: how to create an instance from a classname

2009-01-06 Thread guss
hi Thanks for the tip but I had to play with the __import__ func a bit. Indeed to load not only the top module with __import__ one needs to try to load an object from the module: Here is my forname: def forname(modname, classname): module = __import__(modname,globals(),locals(),['NoName'],-1)

Re: What would you like to see in a book about Matplotlib?

2009-01-06 Thread Marco Nawijn
On Jan 5, 10:57 am, Sandro Tosi wrote: > Hello and Happy 2009! > > I received the interesting proposal to author a book on Matplotlib, > the powerful 2D plotting library for Python. > > While preparing the arguments list, I'd like to hear even your > opinion, because different points-of-view will

Re: What would you like to see in a book about Matplotlib?

2009-01-06 Thread James Stroud
Sandro Tosi wrote: Hello and Happy 2009! I received the interesting proposal to author a book on Matplotlib, the powerful 2D plotting library for Python. While preparing the arguments list, I'd like to hear even your opinion, because different points-of-view will lead to a better product. Some

__builtin__ quote

2009-01-06 Thread Steven Woody
Hi, I am a new leaner and I get a question: abs() is a member of __builtin__ module, but why should I use abs() rather than __builtin__.abs() ? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: __builtin__ quote

2009-01-06 Thread James Stroud
Steven Woody wrote: Hi, I am a new leaner and I get a question: abs() is a member of __builtin__ module, but why should I use abs() rather than __builtin__.abs() ? Thanks. It saves typing. This might help your understanding: py> import __builtin__ py> __builtin__.abs is abs True James

Re: __builtin__ quote

2009-01-06 Thread Steven Woody
On Tue, Jan 6, 2009 at 4:42 PM, James Stroud wrote: > Steven Woody wrote: >> >> Hi, >> >> I am a new leaner and I get a question: abs() is a member of >> __builtin__ module, but why should I use abs() rather than >> __builtin__.abs() ? Thanks. > > It saves typing. > > This might help your underst

Re: Tkinter - problem closing window

2009-01-06 Thread Marc 'BlackJack' Rintsch
On Mon, 05 Jan 2009 12:25:53 -0200, Djames Suhanko wrote: > I has a litle program that open another window. When I close de root > window in quit button, I need clicking 2 times to close. is where the > problem? > > […] > > 17 def gera_seis(self): > 18a = {} > 19for i in range(6): >

Re: __builtin__ quote

2009-01-06 Thread Chris Rebert
On Tue, Jan 6, 2009 at 12:47 AM, Steven Woody wrote: > On Tue, Jan 6, 2009 at 4:42 PM, James Stroud wrote: >> Steven Woody wrote: >>> >>> Hi, >>> >>> I am a new leaner and I get a question: abs() is a member of >>> __builtin__ module, but why should I use abs() rather than >>> __builtin__.abs()

Re: Is there a best linux distro for a python hobbyist?

2009-01-06 Thread David Cournapeau
On Tue, Jan 6, 2009 at 10:16 AM, Lex Hider wrote: > Probably not a big difference in most cases between debian, ubuntu, > fedora. The latter two may be more likely to have more recent > versions. > > I'm pretty sure ubuntu is the only one which currently has python 3.0 > in it's archives [no, it's

Re: __builtin__ quote

2009-01-06 Thread Chris Rebert
On Tue, Jan 6, 2009 at 12:38 AM, Steven Woody wrote: > Hi, > > I am a new leaner and I get a question: abs() is a member of > __builtin__ module, but why should I use abs() rather than > __builtin__.abs() ? Thanks. To clarify, having __builtin__ is just the language's way of reifying the notion

Re: __builtin__ quote

2009-01-06 Thread James Stroud
Steven Woody wrote: On Tue, Jan 6, 2009 at 4:42 PM, James Stroud wrote: py> import __builtin__ py> __builtin__.abs is abs True Does that mean someone did 'import * from __builtin__' when python startup? In terms of the exact implementation of the cPython interpreter, I don't know. But

ftp seems to get a delayed reaction.

2009-01-06 Thread Antoon Pardon
I'm not sure if this is a python problem or something else. I'm trying with the use of ftplib to get a dump on a remote machine. The dump mirrors the directory structure but instead of the files a bziped tar file is made and transferred. While mirroring the directory structure I don't care to chec

Python subprocess question

2009-01-06 Thread Alexi Zuo
Hi everyone, Here I have a simple program which starts a thread and the thread use Popen to execute a shell cmd which needs a long time. I want to stop the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact this program enters a dead loop. Can anyone tell me what is wrong? Alex from s

Is there some methods like 'datareader' in MySQLdb for handling mass data

2009-01-06 Thread Jeremy.Chen
hi all: when I handled mass data table in mysql with python's MySQLdb lib, something frustrated me. I could't find any function like datareader, which yield one row by recording rows' anchor ,after each time I invoked 'read()' in a loop.fetchall or fetchmany just fetched all data in once, which t

Re: Is there a best linux distro for a python hobbyist?

2009-01-06 Thread Dave Crouse
My apologies to the list if this is a double post. My email client tried to send with the wrong email address. I use Arch Linux, it has Python 3.0 and 2.6 and 2.4. Below are some common packages and their version numbers. I wouldn't however recommend Arch to a new Linux user, it's not Ubuntu. How

Re: reflection as in Java: how to create an instance from a classname

2009-01-06 Thread Carl Banks
On Jan 6, 2:24 am, guss wrote: > hi Thanks for the tip but I had to play with the __import__ func a > bit. > Indeed to load not only the top module with __import__ one needs to > try to load an object from the module: > > Here is my forname: > > def forname(modname, classname): >     module = __im

patch

2009-01-06 Thread Pavel Kosina
sorry, pls forget ... -- geon Pavel Kosina -- http://mail.python.org/mailman/listinfo/python-list

folder extraction

2009-01-06 Thread ibpet11
how do i get along with this task of extracting multiples folder and generating their names individually in a their respective files as they were generated. -- http://mail.python.org/mailman/listinfo/python-list

SDC lite

2009-01-06 Thread ibpet11
Did anybody have idea on how and what SDC lite looks like and how it works for data conversion. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not Ruby?

2009-01-06 Thread J�rgen Exner
r wrote: [Why not Ruby?] Becasue it is off topic in CL.perl.M just as in any other NG he posted to. >Face it, the world needs people like Xah. Go check out his site, his Oh my good, the idiot discovered alter egos. >There is nothing wrong with a person expressing their opinion on any >subjec

Re: creating a datetime.datetime from an XML xs:dateTime

2009-01-06 Thread Jack.Chu
I think a simple regular expression is a relatively easy solution. -- http://mail.python.org/mailman/listinfo/python-list

Re: My last working day of 2007

2009-01-06 Thread Jack.Chu
Actually I want to put the funny statistic on web. It means create a simple website and show informations such as that picture. But the hard job is I don't know how to collect the log info from client. If I have to install something I don't think people would dare to install it - it is too dangero

similar words index?

2009-01-06 Thread robert
how can one index (text documents) for efficient similar word search? existing modules? what principles are used by search engines therefore? -- http://mail.python.org/mailman/listinfo/python-list

ctypes to customize MSN now playing status

2009-01-06 Thread est
Hi guys, I am trying to switch MSN/WLM now playing status using ctypes with python, here's my code import ctypes, win32con, win32api, win32gui FindWindow = ctypes.windll.User32.FindWindowA SendMessage = ctypes.windll.User32.SendMessageA hWnd = FindWindow('MsnMsgrUIManager', None) s = u"\\0Music

Re: How to debug embeding Python?

2009-01-06 Thread Hongtian
Thanks all of you, my friends. I think log system is a very good choice. Happy new year! -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not Ruby?

2009-01-06 Thread r
On Jan 2, 6:54 pm, Gerry Reno wrote: > There's been almost 50 responses to this rubbish post. Could you please > all stop! Donde es Xah Lee? -- http://mail.python.org/mailman/listinfo/python-list

Re: patch

2009-01-06 Thread geon
sorry, pls forget :-( -- http://mail.python.org/mailman/listinfo/python-list

Re: Noob question: Is all this typecasting normal?

2009-01-06 Thread vk
> Anyone have something to say about the userio stuff? (If you're going to post something about my coding style, I invite you to do something infinitely more useful: write crapToPep8.py {or is it crap_to_pep8?} to satisfy your sick fetish for consistency.) -- http://mail.python.org/mailman/listinf

Re: ResponseNotReady exception

2009-01-06 Thread vk
http://www.python.org/phpvuln.txt Error 404: File Not Found The URL you requested was not found on this server. -- http://mail.python.org/mailman/listinfo/python-list

Re: SQL, lite lite lite

2009-01-06 Thread Johannes Bauer
Aaron Brady schrieb: > This is basically an invitation for everyone to brainstorm. (No > hijackings, good humor & digression ok.) Lastly, ... Even if it took (as you mentioned) a semester of SQL studies - which it does not - why do you think your syntax is easier? The only person your proposed

Returning a string

2009-01-06 Thread Kless
How is possible that I can print a variable, but when I use *return var* it returns an empty string http://paste.pocoo.org/show/97588/ -- http://mail.python.org/mailman/listinfo/python-list

Re: python is great

2009-01-06 Thread M�ta-MCI (MVP)
python is great. No. Python is VERY GREAT !!! -- http://mail.python.org/mailman/listinfo/python-list

What would you like to see in a book about Matplotlib?

2009-01-06 Thread Sandro Tosi
Hello and Happy 2009! I received the interesting proposal to author a book on Matplotlib, the powerful 2D plotting library for Python. While preparing the arguments list, I'd like to hear even your opinion, because different points-of-view will lead to a better product. Some basic question I'd l

Re: tkInter constraining the width only

2009-01-06 Thread akineko
Hello Roger, Thank you for your prompt response to my posting. Yes, it worked. I never thought of putting 0! A special trick not mentioned in the documentation. Thanks! Aki- On Dec 29, 1:01 pm, Roger wrote: > You want to set the max height to 0. I know this is counter- > intuitive. -- http://

Re: f.seek() unwanted output

2009-01-06 Thread thomasvang...@gmail.com
Hi Tim, works! thanx a lot Thomas -- http://mail.python.org/mailman/listinfo/python-list

Chart libs for python

2009-01-06 Thread Mir Nazim
Hi guys, Please suggest me chart generation library for python comparable to google chart in features and ease of development. Google Chart has a limitation on amount on data you can send in a URL. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Take the first n items of an iterator

2009-01-06 Thread Steven D'Aprano
I thought there was an iterator in itertools for taking the first n items of an iterator, then halting, but I can't find it. Did I imagine such a tool, or am I missing something? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy-to-use Python GUI

2009-01-06 Thread Joel Koltner
Thanks to everyone who responded; I'll be checking out the various toolkits people have listed! ---Joel -- http://mail.python.org/mailman/listinfo/python-list

How to get involved

2009-01-06 Thread kajnilsson5
I'm new to the open source comunnity and I was wondering if there are any bugs that I can trouble shoot or just some beginner tasks I can be sent? Kaj Nilsson kajnilss...@hotmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: If your were going to program a game...

2009-01-06 Thread Kay Schluehr
On 1 Jan., 12:37, Tokyo Dan wrote: > If your were going to program a game in python what technologies would > you use? > > The game is a board game with some piece animations, but no movement > animation...think of a chess king exploding. The game runs in a > browser in a window of a social site b

Re: Why not Ruby?

2009-01-06 Thread r
Hey Lee, I really like your overview of the official Python tut, it's spot on, and your study of OOP was quite fascinating! I like people who are honest and not afraid to go up against the status quo, although i will admit you go a little further than i might at times :). But the world needs an ene

Re: Creating an application for Linux

2009-01-06 Thread excord80
You might find this recent blog post interesting: http://www.mechanicalcat.net/richard/log/Python/Sane_Python_application_packaging__initial_solution -- http://mail.python.org/mailman/listinfo/python-list

When does python 3.1, 3.2 version out?

2009-01-06 Thread 叮叮当当
Now, the 3.0 version is out for a time. I wonder when the python 3.1 is out, and what change is in python 3.1. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Why threading.Thread has no detach method

2009-01-06 Thread Fan Kai
Does this mean terminated threads will automatically release all resouce? -- http://mail.python.org/mailman/listinfo/python-list

win32gui

2009-01-06 Thread Gandalf
I'm searching the win32gui hooks for a function to get the windowClass position any idea? thanks! -- http://mail.python.org/mailman/listinfo/python-list

python is great

2009-01-06 Thread Nomen Nescio
python is great. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why not Ruby?

2009-01-06 Thread Peter Wyzl
"Randal L. Schwartz" wrote in message news:861vvnqqzl@blue.stonehenge.com... >> "r" == r writes: > > r> Xah, I been watching your posts for sometime and it looks like you > r> have been around for a while. Your profile shows one star & 410 > r> ratings. I have only been in usenet for 2

Re: HTML Correctness and Validators

2009-01-06 Thread Lew
Xah Lee wrote... >> recently [sic] i [sic] wrote a blog essay about html [sic] correctness and >> html [sic] >> validators, with relations [sic] to the programing [sic] lang [sic] >> communities. I hope >> programing [sic] lang [sic] fans will take more consideration on [sic] the >> correctness

If your were going to program a game...

2009-01-06 Thread Tokyo Dan
If your were going to program a game in python what technologies would you use? The game is a board game with some piece animations, but no movement animation...think of a chess king exploding. The game runs in a browser in a window of a social site built around the game. The social site has login

Re: __builtin__ quote

2009-01-06 Thread John Machin
On Jan 6, 7:38 pm, "Steven Woody" wrote: > Hi, > > I am a new leaner and I get a question:  abs() is a member of > __builtin__ module, but why should I use abs() rather than > __builtin__.abs() ? Thanks. Fewer keystrokes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending Python with C or C++

2009-01-06 Thread Stefan Behnel
Ryan wrote: > 3. Extending CPython by connecting it to Python-oblivious code written > in C with Ctypes (Ralf's suggestion is good for this) > 4. Extending CPython by connecting it to Python-aware (and specific) > code using the CPython C-API functions (http://docs.python.org/c-api/) For extending

Re: math module for Decimals

2009-01-06 Thread Mark Dickinson
On Mon, Jan 5, 2009 at 4:50 PM, alex goretoy wrote: > I get this when importing decimal: > > Python 2.7a0 (trunk:68339M, Jan 5 2009, 05:18:41) > [GCC 3.4.6] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import decimal > Traceback (most recent call last):

Re: Extending Python with C or C++

2009-01-06 Thread Nick Craig-Wood
Ralf Schoenian wrote: > Ryan wrote: > > I've been using Python for many years now. It's a wonderful language > > that I enjoy using everyday. I'm now interested in getting to know > > more about the guts (C/C++) and extending it. But, extending python > > still seems like a black art to me. Is th

Re: Is there some methods like 'datareader' in MySQLdb for handling mass data

2009-01-06 Thread Bruno Desthuilliers
Jeremy.Chen a écrit : hi all: when I handled mass data table in mysql with python's MySQLdb lib, something frustrated me. I could't find any function like datareader, which yield one row by recording rows' anchor ,after each time I invoked 'read()' in a loop. I think you want cursor.fetchone(

Re: ftp seems to get a delayed reaction.

2009-01-06 Thread Antoon Pardon
I have managed to prune the script, so I can post it here: == from ftplib import FTP bckrt = "/tmpstor/rcpc42" def process(): print "making directory" try: ftp.mkd('ftp-tst') print "mkdir succeeded" except Exception, ErrMsg:

Re: reflection as in Java: how to create an instance from a classname

2009-01-06 Thread guss
Hi Carl thanks for your improved forname method. Regarding the high level reflection API, it is true that we don't need an API as complex as in Java considering the dynamic aspect of Python but you have a forname function I needed one so it could be nice to have it (and other services related to

Re: math module for Decimals

2009-01-06 Thread alex goretoy
Yes I ran strace python and imported math time(NULL) = 1231244692 futex(0x80575d8, FUTEX_WAKE, 1) = 0 stat64("math", 0xbfabef50) = -1 ENOENT (No such file or directory) open("math.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

Re: python is great

2009-01-06 Thread James Matthews
I agree but please enlighten us what caused you to say that python is great? On Sat, Jan 3, 2009 at 3:30 PM, Nomen Nescio wrote: > python is great. > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://www.astorandblack.com -- http://mail.python.org/mailman/listinfo/python

Re: Rich Comparisons Gotcha

2009-01-06 Thread Mark Wooding
Steven D'Aprano wrote: > Such assumptions only hold under particular domains though. You can't > assume equality is an equivalence relation once you start thinking > about arbitrary domains. >From a formal mathematical point of view, equality /is/ an equivalence relation. If you have a relation

Re: Python subprocess question

2009-01-06 Thread Duncan Booth
"Alexi Zuo" wrote: > Hi everyone, > > Here I have a simple program which starts a thread and the thread use > Popen to execute a shell cmd which needs a long time. I want to stop > the thread once I type "ctrl+C" (KeyboardInterrupt). But in fact this > program enters a dead loop. Can anyone tel

Re: How to get involved

2009-01-06 Thread skip
Kaj> I'm new to the open source comunnity and I was wondering if there Kaj> are any bugs that I can trouble shoot or just some beginner tasks I Kaj> can be sent? Python bugs and patches are tracked at http://bugs.python.org/ You can always write patches for bugs or review other

Compile as static library

2009-01-06 Thread googler . 1 . webmaster
Hi! I have a big problem with compiling Python on MacOSX. I compile it - everything works ./configure make so I get a libpython2.5.a file which I include into a Xcode Project. I want to static link it with my project (works in Debug mode but not in Release) 1. Is there a static library flag whi

Re: Is there some methods like 'datareader' in MySQLdb for handling mass data

2009-01-06 Thread Jeremy.Chen
On Jan 6, 7:29 pm, Bruno Desthuilliers wrote: > Jeremy.Chen a écrit : > > > hi all: > >   when I handled mass data table in mysql with python's MySQLdb lib, > > something frustrated me. I could't find any function like datareader, > > which yield one row by recording rows' anchor ,after each time

Re: ftp seems to get a delayed reaction.

2009-01-06 Thread Jeremy.Chen
On Jan 6, 7:56 pm, Antoon Pardon wrote: > I have managed to prune the script, so I can post it here: > > == > > from ftplib import FTP > > bckrt = "/tmpstor/rcpc42" > > def process(): >   print "making directory" >   try: >     ftp.mkd('ftp-t

Re: why cannot assign to function call

2009-01-06 Thread Mark Wooding
Steven D'Aprano wrote: > By all means, if Derek doesn't like the assignment model used by Python > (and Java, Ruby, C#, Perl, RealBasic, VisualBasic, Lua, and many other > languages going back to at least CLU in the mid 1970s) It goes back to Lisp in the late 1950s. [snip stuff I agree with.

Re: Can´t Surf Python Pages in Windoze

2009-01-06 Thread Victor Subervi
On Fri, Jan 2, 2009 at 4:24 PM, Victor Subervi wrote: > On Fri, Dec 26, 2008 at 8:00 PM, Gabriel Genellina > wrote: > >> En Fri, 26 Dec 2008 15:11:44 -0200, Victor Subervi < >> victorsube...@gmail.com> escribió: >> >>> On 12/26/08, Tino Wildenhain wrote: >>> >> >> print "Content-Type: text/html

Re: creating a datetime.datetime from an XML xs:dateTime

2009-01-06 Thread M.-A. Lemburg
On 2008-12-29 05:26, Jack.Chu wrote: > I think a simple regular expression is a relatively easy solution. Or use mxDateTime and let the parser do all the heavy lifting for you: >>> from mx.DateTime import Parser >>> t = Parser.DateTimeFromString('2000-01-12T12:13:14Z') >>> t >>> t = Parser.DateT

Python 3.0 nonlocal statement

2009-01-06 Thread Casey
In PEP 3104 the nonlocal statement was proposed and accepted for implementation in Python 3.0 for access to names in outer scopes. The proposed syntax included an optional assignment or augmented assignment to the outer name, such as: nonlocal x += 1 This syntax doesn't appear to be supported in

Traceback in Logging

2009-01-06 Thread Kottiyath
Hi all, Is it possible to print traceback for all logging? I have created something like this: def trace(): import traceback return ''.join(traceback.format_stack(limit=4)[1:]) And during every logging, append it - self.logger.info('Data: %s, kwargs: %s Traceback: %s' %(data

Re: Regex Generator From Multiple Files

2009-01-06 Thread Jeremy.Chen
On Jan 6, 8:48 am, MRAB wrote: > James Pruitt wrote: > > I am looking for a way given a number of files, say 3, that represent > > technical support tickets in the same format to generate regular > > expressions for the different fields automatically. > > > An example from of one line from each fi

Re: Returning a string

2009-01-06 Thread Simon Brunning
2009/1/3 Kless : > How is possible that I can print a variable, but when I use *return > var* it returns an empty string What makes you think it's returning an empty string? You aren't doing anything with the return value in line 26 of your example. -- Cheers, Simon B. -- http://mail.python.org/

Re: why cannot assign to function call

2009-01-06 Thread Mark Wooding
Steven D'Aprano wrote: > (3) Those who come from an entirely different programming model, say, > Forth or Haskell. For them, Python's assignment model is going to be the > least of their worries. Actually, Haskell's assignment model (you have to grubbing about for IORefs or STRefs to find it b

Re: why cannot assign to function call

2009-01-06 Thread Mark Wooding
Steven D'Aprano wrote: > I don't think so. Variables in algebra are quite different from variables > in programming languages. Contrast the statement: > > x = x+1 > > as a programming expression and an algebraic equation. As a programming > expression, it means "increment x by one". But as an

image recogniton?

2009-01-06 Thread Li Han
Hi! I know little about the computer image processing, and now I have a fancy problem which is how to read the time from the picture of a clock by programming ? Is there anyone who can give me some suggestions? Thank! Li Han -- http://mail.python.org/mailman/listinfo/python-list

Re: python is great

2009-01-06 Thread Dotan Cohen
2009/1/3 Nomen Nescio : > python is great. > No, those are anacondas. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш

Re: why cannot assign to function call

2009-01-06 Thread Mark Wooding
Derek Martin wrote: > I think I have though, not that it matters, since that was never > really my point. Python's assignment model requires more explanation > than the traditional one, simply to state what it does. That alone is > evidence (but not proof). Hmm. Actually, it's not the assignm

Re: image recogniton?

2009-01-06 Thread Furkan Kuru
start with Python Image Library: http://www.pythonware.com/products/pil/ On Tue, Jan 6, 2009 at 4:28 PM, Li Han wrote: > Hi! I know little about the computer image processing, and now I have > a fancy problem which is how to read the time from the picture of a > clock by programming ? Is there

Python-URL! - weekly Python news and links (Jan 6)

2009-01-06 Thread Gabriel Genellina
QOTW: "If you have good, experienced people who are able to withstand the pressure to deliver no matter what and are familiar with the problem domain, then any project is on the way to succeess no matter what technology was chosen in my experience. The choice of type system is way down on the list

Code Review request for the trash-cli project

2009-01-06 Thread Andrea Francia
The trash-cli project is a opensource implementation of the FreeDesktop.org Trash Specification that provides a command line interface to manage the trashcan. It's provide the following commands: * trash-put trashes files and directories. * trash-empty empty the trashcan(s)

Re: math module for Decimals

2009-01-06 Thread Fredrik Johansson
On Dec 28 2008, 4:55 pm, jerry.carl...@gmail.com wrote: > > - are you usingDecimalfor the base-10-ness or the > >   extra precisionDecimalprovides?  Or significant zeros? > >   Or compatibility with existingDecimalcode, or what? > > Oh boy, now I will finally prove myself illiterate... well, so be

Re: image recogniton?

2009-01-06 Thread Tino Wildenhain
Hi, Furkan Kuru wrote: start with Python Image Library: http://www.pythonware.com/products/pil/ I think this is more a job for OpenCV and its python bindings. http://opencv.willowgarage.com/wiki/PythonInterface On Tue, Jan 6, 2009 at 4:28 PM, Li Han > wrote:

Re: Code Review request for the trash-cli project

2009-01-06 Thread Dotan Cohen
2009/1/6 Andrea Francia : > The trash-cli project is a opensource implementation of the FreeDesktop.org > Trash Specification that provides a command line interface to manage the > trashcan. > > It's provide the following commands: > * trash-put trashes files and directories. > * trash-e

looking for tips on how to implement "ruby-style" Domain Specific Language in Python

2009-01-06 Thread mark
I want to implement a internal DSL in Python. I would like the syntax as human readable as possible. This means no disturbing '.;()\' characters. I like to have the power of the hosting language as well. Thats why I want to build it as an internal DSL and NOT as a external DSL. I want the DSL as h

Re: image recogniton?

2009-01-06 Thread Hendrik van Rooyen
"Li Han" wrote: > Hi! I know little about the computer image processing, and now I have > a fancy problem which is how to read the time from the picture of a > clock by programming ? Is there anyone who can give me some > suggestions? When the big hand is on the twelve, and the little hand is on

Re: image recogniton?

2009-01-06 Thread Dotan Cohen
2009/1/6 Hendrik van Rooyen : > "Li Han" wrote: > >> Hi! I know little about the computer image processing, and now I have >> a fancy problem which is how to read the time from the picture of a >> clock by programming ? Is there anyone who can give me some >> suggestions? > > When the big hand is

Re: image recogniton?

2009-01-06 Thread skip
Furkan> start with Python Image Library: Furkan> http://www.pythonware.com/products/pil/ Well, there's the little problem of optical character recognition. You might want to check out open source OCR tools like gocr: http://jocr.sourceforge.net/ Just use PIL to convert input images

Re: figuring week of the day....

2009-01-06 Thread r
On Jan 6, 9:56 am, tekion wrote: > Is there a module where you could figure week of the day, like where > it starts and end. I need to do this for a whole year. Thanks. import datetime help(datetime) import time help(time) -- http://mail.python.org/mailman/listinfo/python-list

Re: Traceback in Logging

2009-01-06 Thread Vinay Sajip
On Jan 6, 1:33 pm, Kottiyath wrote: > This seems somewhat kludgy. Is it possible in logging mechanism itself > to provide traceback as default? > No, because it's not a common use case to print tracebacks for every logging call. There's support for adding traceback information in exception handli

Re: Extending Python with C or C++

2009-01-06 Thread sturlamolden
On Jan 5, 9:06 pm, Ryan wrote: > I've been using Python for many years now. It's a wonderful language > that I enjoy using everyday. I'm now interested in getting to know > more about the guts (C/C++) and extending it. But, extending python > still seems like a black art to me. There are severa

Re: why cannot assign to function call

2009-01-06 Thread Joe Strout
Mark Wooding wrote: Derek Martin wrote: I think I have though, not that it matters, since that was never really my point. Python's assignment model requires more explanation than the traditional one, simply to state what it does. That alone is evidence (but not proof). Hmm. Actually, it'

Re: Python 3.0 nonlocal statement

2009-01-06 Thread Matimus
On Jan 6, 5:31 am, Casey wrote: > In PEP 3104 the nonlocal statement was proposed and accepted for > implementation in Python 3.0 for access to names in outer scopes.  The > proposed syntax included an optional assignment or augmented > assignment to the outer name, such as: > > nonlocal x += 1 >

Re: looking for tips on how to implement "ruby-style" Domain Specific Language in Python

2009-01-06 Thread sturlamolden
On Jan 6, 4:32 pm, mark wrote: > Is it possible to > switch between the custom DSL and the standard Python interpreter? As far as I can tell, there are three different options: - Embed a Python and DSL interpreter in the same executable. - Write the DSL interpreter in Python. - Expose the DSL

Re: Traceback in Logging

2009-01-06 Thread Kottiyath
I dont want the whole traceback. I just wanted to know where the log was generated from i.e. which procedure and which line. I have 3/4 points in many procedures where I encounter a small error (not an exception) and want to log it. So having individual names for each looks to be somewhat verbose -

Re: looking for tips on how to implement "ruby-style" Domain Specific Language in Python

2009-01-06 Thread sturlamolden
On Jan 6, 4:32 pm, mark wrote: > I want to implement a internal DSL in Python. I would like the syntax > as human readable as possible. Also beware that Python is not Lisp. You cannot define new syntax (yes I've seen the goto joke). -- http://mail.python.org/mailman/listinfo/python-list

Re: Traceback in Logging

2009-01-06 Thread skip
Kottiyath> I dont want the whole traceback. I just wanted to know where Kottiyath> the log was generated from i.e. which procedure and which Kottiyath> line. The asyncore standard module has an undocumented compact_traceback() function: #!/usr/bin/env python import asyncore

Re: Python 3.0 nonlocal statement

2009-01-06 Thread Rob Williscroft
Matimus wrote in news:2a3d6700-85f0-4861-84c9-9f269791f044 @f40g2000pri.googlegroups.com in comp.lang.python: > On Jan 6, 5:31 am, Casey wrote: >> In PEP 3104 the nonlocal statement was proposed and accepted for >> implementation in Python 3.0 for access to names in outer scopes.  The >> proposed

Re: Python 3.0 nonlocal statement

2009-01-06 Thread Casey
On Jan 6, 11:10 am, Matimus wrote: > `nonlocal` should behave just like `global` does. It doesn't support > that syntax either. So, yes it was intentional. No, there probably is > no plan to support it in a later release. > > Matt >From my perspective, that's an unfortunate decision and I questi

Re: Python 3.0 nonlocal statement

2009-01-06 Thread Casey
On Jan 6, 11:46 am, Rob Williscroft wrote: > Matimus wrote in news:2a3d6700-85f0-4861-84c9-9f269791f044 > Searching (AKA googling) for: nonlocal site:bugs.python.org > leads to:http://bugs.python.org/issue4199 > > Rob. > --http://www.victim-prime.dsl.pipex.com/ Doh. I looked at the PEP and the 3

Re: why cannot assign to function call

2009-01-06 Thread sturlamolden
On Jan 2, 5:43 pm, Steve Holden wrote: > Derek Martin wrote: > > On Tue, Dec 30, 2008 at 02:21:29PM +, John O'Hagan wrote: > [...] > > What the Python community often overlooks, when this discussion again > > rears its ugly head (as it seems to every other hour or so), is that > > its assignme

Re: python is great

2009-01-06 Thread Joe Strout
I've actually been rather frustrated by Python lately. It's great at some things, but rather poor at others. In the latter category is building a neatly packaged executable that can be shipped to users and run reliably on their machine. On the Mac in particular, if you want your app to run o

  1   2   >