Re: dynamic drawing in web page

2006-05-23 Thread jmdeschamps
barbaros wrote: > Hello everybody, > > I need to put some dynamic drawings on my web page. More precisely, I > need to draw a number of geometric figures (circles, rectangles) which > evolve into a graphics windows according to some law (a little bit like > the solar system). I need also to have se

Re: how to change sys.path?

2006-05-23 Thread Jarek Zgoda
John Salerno napisał(a): >> yes, I mean I want change the sys.path value and save it for next >> using. >> I can change the value of sys.path, but I can't "save" it permanently. >> There is no python_path environment on my pc, what the relationship >> between it and the sys.path? > > In Windows,

Re: Accessing object parent properties

2006-05-23 Thread Ryan Forsythe
Cloudthunder wrote: > How can I set up method delegation so that I can do the following: > > A.run() > > and have this call refer to the run() method within the boo instance? Also, > what if I have tons of functions like run() within the boo instance and I > want all them to be directly accessib

Best way to handle exceptions with try/finally

2006-05-23 Thread Carl J. Van Arsdall
Hey python people, I'm interested in using the try/finally clause to ensure graceful cleanup regardless of how a block of code exits. However, I still am interested in capturing the exception. The scenario is that I have an object that accesses a global memory space accessible via multiple th

Re: What's with the @ sign

2006-05-23 Thread [EMAIL PROTECTED]
Thanks! I had no clue what that was (and searching for @ in the context of python was returning hundreds of thousands of hits XD) -- http://mail.python.org/mailman/listinfo/python-list

Re: Guide to using python for bash-style scripting

2006-05-23 Thread Szabolcs Nagy
python subprocess module docs: http://docs.python.org/dev/lib/node517.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Software Needs Philosophers

2006-05-23 Thread Emmanuel Florac
Le Tue, 23 May 2006 08:58:12 -0500, John D Salt a écrit : > > What exciting new ideas exist in software that are both important and > cannot be traced back to 1986 or earlier? Actually it looks like the latest breakthru was invention of LISP circa 1957. Well, Perhaps OO paradigm and Smalltalk,

UPDATE: Generating Cutter numbers

2006-05-23 Thread Gerard Flanagan
Gerard Flanagan wrote: > All > > would anyone happen to have code to generate Cutter Numbers: > > eg. http://www1.kfupm.edu.sa/library/cod-web/Cutter-numbers.htm > > or is anyone looking for something to do?-) (I'm under pressure!) > > def cutter(lname, fname, book_title): > > (maybe more to it

Re: Software Needs Philosophers

2006-05-23 Thread John D Salt
"John A. Bailo" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: [Snips] > What exciting new ideas exist in software that are both important and > cannot be traced back to Doug Engbart's 1968 presentation at Xerox > Parc? The only two I would think worth mentioning are Nygaard et al's idea

Re: Software Needs Philosophers

2006-05-23 Thread John D Salt
Eli Gottlieb <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: [Snips] > I correct: We live in a paradise where we finally have to processing > power to realize all those ideas that were too inefficient 20 years > ago. That sounds more reasonable. In my more jaundiced moments, I think that

Re: how to change sys.path?

2006-05-23 Thread John Salerno
Jarek Zgoda wrote: > John Salerno napisał(a): > >>> yes, I mean I want change the sys.path value and save it for next >>> using. >>> I can change the value of sys.path, but I can't "save" it permanently. >>> There is no python_path environment on my pc, what the relationship >>> between it and the

Re: real time info to web browser from apache side ?

2006-05-23 Thread Larry Bates
Joseph wrote: > I know about writing CGI application using Perl and Apache to refresh a > static webpage that displays on the browser. But now i have an > application requirement that I hope someone can help me. > > The server side sits in another room down the factory plant, its > monitoring som

Re: FAQ for XML with Python

2006-05-23 Thread Dave Kuhlman
Sybren Stuvel wrote: > Dave Kuhlman enlightened us with: >> For those who are beginners to using Python to process XML, I've >> recently updated my Python XML FAQ (PyXMLFaq). It has a number >> of code samples that may help you get started. > > You might want to include a list of things you assu

Re: documentation for win32com?

2006-05-23 Thread Ross Ridge
John Salerno wrote: > So does this mean that the code can be different each time, or is there > still a pre-determined way to refer to things, such as opening Excel, > reading a spreadsheet and working with it, etc.? For a given version of Excel, there's a "pre-determinied way" of doing those thin

Re: performance difference between OSx and Windows

2006-05-23 Thread [EMAIL PROTECTED]
Hi Brian, You may have already considered this, but since I didn't see it mentioned in your post, I'll reply anyway. I believe the Python binaries that Apple includes with OS X are always slightly behind the latest that you can get from the official sources. I'm not infront of my Mac right now, s

Re: GUI viewer for profiler output?

2006-05-23 Thread Benjamin Niemann
Kent Johnson wrote: > Can anyone point me to a GUI program that allows viewing and browsing > the output of the profiler? I know I have used one in the past but I > can't seem to find it... If you use KDE, then you can convert the output of the hotshot profiler to into a format that KCachegrind c

Re: real time info to web browser from apache side ?

2006-05-23 Thread Ben Finney
"Joseph" <[EMAIL PROTECTED]> writes: > So I am looking more for a push technology than a pull from teh > browser (user hit Ctrl-R to refresh is a pull). Not necessarily; just write the web page so that it instructs the browser to do the pull automatically, without refreshing the entire page. Thi

Re: how to change sys.path?

2006-05-23 Thread Bruno Desthuilliers
Ju Hui a écrit : > yes, I mean I want change the sys.path value and save it for next > using. > > I can change the value of sys.path, but I can't "save" it permanently. No. > There is no python_path environment on my pc, sorry, I meant PYTHONPATH (all caps, no underscore). Like all environnement

Re: dict literals vs dict(**kwds)

2006-05-23 Thread Bruno Desthuilliers
George Sakkis a écrit : > Although I consider dict(**kwds) as one of the few unfortunate design > choices in python since it prevents the future addition of useful > keyword arguments (e.g a default value or an orderby function), I've > been finding myself lately using it sometimes instead of dict

Re: NEWB: reverse traversal of xml file

2006-05-23 Thread manstey
But will this work if I don't know parts in advance. I only know parts by reading through the file, which has 450,000 lines. -- http://mail.python.org/mailman/listinfo/python-list

Re: Running script in __main__ shows no output in IDLE

2006-05-23 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Shouldn't Idle have shown an error when trying to > read the string constant if it's not interpretable as a normal string, > then? Yes. In my python shell, it raised an error. I don't know for sure why this did not appear in IDLE, but there are far better tools anyw

Re: how to change sys.path?

2006-05-23 Thread Ben Finney
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Ju Hui a écrit : > > what the relationship between it and the sys.path? > > Don't you guess ? He's following sound Python philosophy :-) -- \Hercules Grytpype-Thynne: "Well, Neddie, I'm going to be | `\ frank." Ned Seagoon:

Telnet linebreaks

2006-05-23 Thread Patrick M. Nielsen
Hey guys.I have begun playing with the Simple MUD server example from the Stackless website( http://www.stackless.com/Members/rmtew/code/mud.py ) and it's all good so far, however, I've come to notice something that I remember from backin the days (some old mud code), but I don't remember what I di

Re: Telnet linebreaks

2006-05-23 Thread Patrick M. Nielsen
Oh, and, apologies for the "inpythonic" nature of this issue.On 5/24/06, Patrick M. Nielsen <[EMAIL PROTECTED] > wrote:Hey guys.I have begun playing with the Simple MUD server example from the Stackless website ( http://www.stackless.com/Members/rmtew/code/mud.py ) and it's all good so far, however

Re: dict literals vs dict(**kwds)

2006-05-23 Thread George Sakkis
Bruno Desthuilliers wrote: > George Sakkis a écrit : > > Although I consider dict(**kwds) as one of the few unfortunate design > > choices in python since it prevents the future addition of useful > > keyword arguments (e.g a default value or an orderby function), I've > > been finding myself late

determining available space for Float32, for instance

2006-05-23 Thread David Socha
I am looking for a way to determine the maxium array size I can allocate for arrays of Float32 values (or Int32, or Int8, ...) at an arbitrary point in the program's execution. This is needed because Python cannot allocate enough memory for all of the data we need to process, so we need to "chunk"

Re: logging

2006-05-23 Thread Vinay Sajip
Baurzhan Ismagulov wrote: > Hello all, > > I want that each module has its own logger. I've defined the following > config file: > > [logger_root] > level=CRITICAL > handlers=console > > [logger_l01] > level=DEBUG > qualname=l01 > handlers=console > > I want logger_root to go to /dev/null, so I'v

Re: determining available space for Float32, for instance

2006-05-23 Thread Robert Kern
David Socha wrote: > I am looking for a way to determine the maxium array size I can allocate > for arrays of Float32 values (or Int32, or Int8, ...) at an arbitrary > point in the program's execution. This is needed because Python cannot > allocate enough memory for all of the data we need to pro

Problem with installing MySQL-python-1.2.1_p2

2006-05-23 Thread Olivier Langlois
Hi, I have tried to install MySQL-python-1.2.1_p2 under Windows XP with Python 2.4.3 and I get some problems. 1- I get this warning when I run setup.py build: C:\tools\Python\lib\distutils\extension.py:133: UserWarning: Unknown Extension options: 'mysql_root' warnings.warn(msg) 2- When I comp

Re: WeakrefValueDictionary of Callables?

2006-05-23 Thread Steve Holden
Lloyd Weehuizen wrote [top-posting, for which he should have his wrist smacked]: > Steve Holden wrote: > > Lloyd Weehuizen wrote: > >> Hey > >> > >> I'm trying to set up a WeakrefValueDictionary of callables however as > >> soon as my method that adds the callable to the dictionary exits the

Re: performance difference between OSx and Windows

2006-05-23 Thread Brian
[EMAIL PROTECTED] wrote: > Hi Brian, > > You may have already considered this, but since I didn't see it > mentioned in your post, I'll reply anyway. > > I believe the Python binaries that Apple includes with OS X are always > slightly behind the latest that you can get from the official sources.

Looking for help with Regular Expression

2006-05-23 Thread ProvoWallis
Hi, I'm looking for a little advice about regular expressions. I want to capture a string of text that falls between an opening squre bracket and a closing square bracket (e.g., "[" and "]") but I've run into a small problem. I've been using this: '''\[(.*?)\]''' as my pattern. I was expecting th

Re: Guide to using python for bash-style scripting

2006-05-23 Thread James Stroud
4zumanga wrote: > I have a bunch of really horrible hacked-up bash scripts which I would > really like to convert to python, so I can extend and neaten them. > However, I'm having some trouble mapping some constructs easily, and > was wondering if anyone know of a guide to mapping simple uses of >

Re: real time info to web browser from apache side ?

2006-05-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: >"Joseph" <[EMAIL PROTECTED]> writes: > >> So I am looking more for a push technology than a pull from teh >> browser (user hit Ctrl-R to refresh is a pull). > >Not necessarily; just write the web page so that it instructs the >

Re: Looking for help with Regular Expression

2006-05-23 Thread James Stroud
ProvoWallis wrote: > Hi, > > I'm looking for a little advice about regular expressions. I want to > capture a string of text that falls between an opening squre bracket > and a closing square bracket (e.g., "[" and "]") but I've run into a > small problem. > > I've been using this: '''\[(.*?)\]''

Re: how to change sys.path?

2006-05-23 Thread Ju Hui
yes, we can change PYTHONPATH to add some path to sys.path value, but how to remove item from sys.path? -- http://mail.python.org/mailman/listinfo/python-list

Re: graphs and charts

2006-05-23 Thread Tim Heaney
Grant Edwards <[EMAIL PROTECTED]> writes: > > On 2006-05-23, Yaron Butterfield <[EMAIL PROTECTED]> wrote: > >> What's the best way to on-the-fly graphs and charts using Python? Or is >> Python not really the best way to do this? > > I like Gnuplot-py, but I've been a Gnuplot for 15+ years, so > I

Re: continue out of a loop in pdb

2006-05-23 Thread R. Bernstein
Gary Wessle <[EMAIL PROTECTED]> writes: > Hi > > using the debugger, I happen to be on a line inside a loop, after > looping few times with "n" and wanting to get out of the loop to the > next line, I set a break point on a line after the loop structure and > hit c, that does not continue out of

Re: performance difference between OSx and Windows

2006-05-23 Thread Alex Martelli
Brian <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi Brian, > > > > You may have already considered this, but since I didn't see it > > mentioned in your post, I'll reply anyway. > > > > I believe the Python binaries that Apple includes with OS X are always > > slightly behind the la

Re: continue out of a loop in pdb

2006-05-23 Thread R. Bernstein
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > the code works with no problem, I am playing around with the pdb, i.e > > > > from pdb import * > > set_trace() for i in range(1,50): > > print i > > print "tired of this" > > print "I am out" > > > > [EMA

Re: dict literals vs dict(**kwds)

2006-05-23 Thread Alex Martelli
George Sakkis <[EMAIL PROTECTED]> wrote: > Bruno Desthuilliers wrote: > > > George Sakkis a écrit : > > > Although I consider dict(**kwds) as one of the few unfortunate design > > > choices in python since it prevents the future addition of useful > > > keyword arguments (e.g a default value or a

Re: global name not defined

2006-05-23 Thread NetKev
good point -- http://mail.python.org/mailman/listinfo/python-list

Re: continue out of a loop in pdb

2006-05-23 Thread R. Bernstein
Here's the revision I just made for pydb's documentation (in CVS). I welcome suggestions for improvement. set_trace([cmdfile=None]) Enter the debugger before the statement which follows (in execution) the set_trace() statement. This hard-codes a call to the debugger at a given point

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-23 Thread Tim Roberts
Edward Elliott <[EMAIL PROTECTED]> wrote: >bruno at modulix wrote: > >> Edward Elliott wrote: >>> You mean like this: >>> >>> s = "foo" + "bar" >>> s = 'foo' + 'bar' >>> s = 'foo' 'bar' >>> s = '%s%s' % ('foo', 'bar') >[snip] >> The real mantra is actually : >> "There should be one-- and preferab

Re: Web framework comparison video

2006-05-23 Thread AndyL
Iain King wrote: > http://compoundthinking.com/blog/index.php/2006/03/10/framework-comparison-video/ > > Thought this might be interesting to y'all. (I can't watch it 'cos I'm > at work, so any comments about it would be appreciated :) Indeed it was. The headache factor is 1, for some reason my

pickling multiple dictionaries

2006-05-23 Thread manstey
Hi, I am running a script that produces about 450,000 dictionaries. I tried putting them into a tuple and then pickling the tuple, but the tuple gets too big. Can I pickle dictionaries one after another into the same file and then read them out again? Cheers, Matthew -- http://mail.python.org/m

Re: documentation for win32com?

2006-05-23 Thread Roger Upole
The Excel docs are your best bet. The examples they give are all MS-specific languages like VB, but most translate fairly easily to Python. You can also run makepy on the Excel typelib, which will generate a file with all the methods, events etc available thru the Excel object model. Also, searc

Re: NEWB: reverse traversal of xml file

2006-05-23 Thread Serge Orlov
manstey wrote: > But will this work if I don't know parts in advance. Yes it will work as long as the highest part number in the whole file is not very high. The algorithm needs only store N records in memory, where N is the highest part number in the whole file. > I only know parts > by reading

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread vbgunz
>What are you building? I routinely do things like these by hand >www.greschke.com/unlinked/images/changeo.jpg >www.greschke.com/unlinked/images/pocus.jpg >www.greschke.com/unlinked/images/pis.jpg >www.greschke.com/unlinked/images/petm.jpg >and I can't imagine using a builder for anything 'simpl

Re: documentation for win32com?

2006-05-23 Thread M�ta-MCI
Hi! MS-Office-2007 beta2, can downloaded here : http://www.microsoft.com/office/preview/beta/getthebeta.mspx (with a passport account). Doc, for COM access, are include in the help-system. @-salutations MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't wish to give up on a Tkinter GUI Builder :(

2006-05-23 Thread vbgunz
> As for the code to actually make the application go, well, > if there is some automatic way to make that happen it hasn't dawned on > me yet. why not execute 'python -u /pathto/module.py' I could be wrong but hope I am not :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for help with Regular Expression

2006-05-23 Thread lao_mage
'''\[(.*?)\]''' ?-> when this char after(*, +, ?, {n}, {n,}, {n,m}), the match pattern is not greedy e.g.1 String: 512.16[3][b]] Pattern:'''\[(.*)\]''' This will match "[3][b]]" e.g.2 String: 512.16[3][b]] Pattern:'''\[(.*)?\]''' This will match "[3]" and "[b]" -- http://mail.python.org/mailman

Re: newbie: windows xp scripting

2006-05-23 Thread Tim Roberts
"oscartheduck" <[EMAIL PROTECTED]> wrote: > >It wasn't, but after seeing your success I discovered what was wrong. >My destination directory didn't exist, and for some reason windows >wasn't automatically creating it to dump the files in. Right. The "copy" command never creates directories. It w

Announcing WERD (1.0), the Phonetic Transliterator to Indic scripts

2006-05-23 Thread Atul
WERD is a phonetic transliterator that helps users write english text but read the same in the chosen Devanagari (Indic) font. WERD is expected to make it easy for Indians wanting to communicate over chat or email in their native language. Checkout http://werd.sourceforge.net/ WERD is written in

Re: Doubt with wx.CallAfter

2006-05-23 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >Hello together:: > >I have programmed this fuction: > >def OnNewMovie(self, event): >""" Local user receives a new movie event from a user""" > >#self.log.debug( "Got OnNewMovie, " + `event`) >if event.data[0] == self.pubId: >fDep.writ

Re: No math module??

2006-05-23 Thread Tim Roberts
WIdgeteye <[EMAIL PROTECTED]> wrote: > >On Tue, 23 May 2006 12:40:49 +1000, Ben Finney wrote: > >Ok this is weird. I checked: >/usr/local/lib/python2.3/lib-dynload/math.so > >Just as you have on your system and it's there. >So why in the heck isn't it loading with: >import math > >This is s

Re: how to change sys.path?

2006-05-23 Thread Ben Finney
[Please provide some context when you respond in an existing discussion, by quoting the original message and removing any parts irrelevant to your reply.] "Ju Hui" <[EMAIL PROTECTED]> writes: > yes, we can change PYTHONPATH to add some path to sys.path value, but > how to remove item from sys.pat

Re: graphs and charts

2006-05-23 Thread Terry Hancock
Yaron Butterfield wrote: > What's the best way to on-the-fly graphs and charts using Python? Or > is Python not really the best way to do this? I quite enjoyed using Biggles for this: http://biggles.sf.net There are many different choices, though. Cheers, Terry -- Terry Hancock ([EMAIL PROT

NEWB: how to convert a string to dict (dictionary)

2006-05-23 Thread manstey
Hi, How do I convert a string like: a="{'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}" into a dictionary: b={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'} Thanks, Matthew PS why in Python is it so often easy to convert one way but not the other? -- ht

Re: NEWB: how to convert a string to dict (dictionary)

2006-05-23 Thread Jorge Godoy
manstey wrote: > Hi, > > How do I convert a string like: > a="{'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}" > > into a dictionary: > b={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'} > > Thanks, Matthew > > PS why in Python is it so often easy to conv

Access C++, Java APIs from Python..

2006-05-23 Thread Manoj Kumar P
Hi, I'm new to python. I would like to know whether is it possible to access Java/C++ APIs from python. I have two applications written in Java and API, I wanted to call the APIs of these applications from Python. I'm developing web-based application using Zope. Thanks in advance. -Manoj- "SAS

python and QRcode ?

2006-05-23 Thread bussiere maillist
i'am looking for some module and programs in ptyhon for making qrcode (special kind of barcode)But i only found documentation and programs in japanese.Does it exist program and documentation for python in qrcode in english ? regardsBussiere -- http://mail.python.org/mailman/listinfo/python-list

Re: Access C++, Java APIs from Python..

2006-05-23 Thread Ravi Teja
> I'm new to python. > I would like to know whether is it possible to access Java/C++ APIs from > python. > I have two applications written in Java and API, I wanted to call the APIs > of these applications from Python. > I'm developing web-based application using Zope. CPython can access Java thr

Re: python vs perl lines of code

2006-05-23 Thread H J van Rooyen
on Friday, May 19, 2006 11:26 PM [EMAIL PROTECTED] wrote: | All I would ask is what objective evidence does either of actually | have? How can you know? What is a fair way to even count line | numbers? From there how do we begin to objectively measure software | quality? That's why this discu

Re: can't figure out error: module has no attribute...

2006-05-23 Thread Chris_147
Thanks for the reply. you are indeed right, they were included from different places. from C:\Python24\Lib and D:\mydir But the strange thing is: anywhere on C: the file from C:\Python24\Lib was included. in D:\mydir the one from that directory BUT: anywhere else on D: apparantly the one from D:\

Re: NEWB: how to convert a string to dict (dictionary)

2006-05-23 Thread Heiko Wundram
Am Mittwoch 24 Mai 2006 07:52 schrieb manstey: > Hi, > > How do I convert a string like: > a="{'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}" > > into a dictionary: > b={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'} b = eval(a) (if a contains a dict-repr)

Re: PEP-xxx: Unification of for statement and list-comp syntax

2006-05-23 Thread Heiko Wundram
Am Mittwoch 24 Mai 2006 06:12 schrieb Tim Roberts: > At one time, it was said that the "%" operator was the fastest way to > concatenate strings, because it was implemented in C, whereas the + > operator was interpreted. However, as I recall, the difference was hardly > measurable, and may not eve

<    1   2