Embed Python

2005-05-17 Thread Tommy Ryding
Hi, Background: Im currently working on my own Python port for VxWorks this is part of my master thesis. What I want to do is to only to embed the interpreter and not the compiler. Both to save memory on the target device and to be get some security in the device. It is a mission critical device i

Re: tree functions daily exercise

2005-05-17 Thread Joachim Durchholz
[EMAIL PROTECTED] wrote: > K! > http://en.wikipedia.org/wiki/K_programming_language > > Interesting. > Looking at your program, they are so short. I don't know if they are > full implementation or what... That's no surprise: list and tree processing are often built right into more expressiv

Re: Windows distribution suggestions?

2005-05-17 Thread Timothy Smith
Paul Rubin wrote: >As what must be penance for something or other, I'm needing to release >a Python app for use under Windows XP. Please be gentle with me since >I'm a Un*x weenie and the only thing I've had much practice with under >Windows is rebooting it. > >My app contains three different pro

Re: Anyway to designating the encoding of the "source" for compile?

2005-05-17 Thread Serge . Orlov
[EMAIL PROTECTED] wrote: > Thank you but there is still a problem. > > |>>> s='euckr="\xc7\xd1";uni=u"\xc7\xd1"' > |>>> su=s.decode('euc-kr') > |>>> su > |u'euckr="\ud55c";uni=u"\ud55c"' su[7] is a non-ascii character inside the byte string euckr > |>>> c=compile(su,'','single') > |>>> exec c > |

[no subject]

2005-05-17 Thread Shariar Dehmand
To whom it may concern, I am looking to start a python organization in Iran from scrtch, Please help me with it, or give me the mailing address of a reson which is advanced/experienced in what I try to achieve. best regards Mesean Dehmand __ Do You

Re: Like Christ PBBUH Prayed

2005-05-17 Thread Ville Vainio
> "George" == George Sakkis <[EMAIL PROTECTED]> writes: George> "flamesrock" wrote: >> I don't understand.. why is everyone talking about christ on >> comp.lang.python? Isn't this not the place? >> George> Maybe they know something we don't. The information is generally

Re: python 2.3.4, cx_Oracle 4.1 and utf-8 - trouble

2005-05-17 Thread Serge . Orlov
Maxim Kuleshov wrote: > Hello! > > Trying to fetch long varchar2 column and get the following error: > > cx_Oracle.DatabaseError: column at array pos 0 fetched with error: 1406 > > i.e. string buffer is not much enough to fetch the string. > > # fragment of code... > myCon = cx_Oracle.connect(user,

Re: Windows distribution suggestions?

2005-05-17 Thread Bernhard Holzmayer
Paul Rubin wrote: > As what must be penance for something or other, I'm needing to release > a Python app for use under Windows XP. Please be gentle with me since > I'm a Un*x weenie and the only thing I've had much practice with under > Windows is rebooting it. I can feel your unhappiness, and

Re: Windows distribution suggestions?

2005-05-17 Thread Paul Rubin
Bernhard Holzmayer <[EMAIL PROTECTED]> writes: > I can feel your unhappiness, and I share it. Hi Paul! > Here are some hints... Thanks! ;-) > Since your installer needs to run before Python is installed, you need > something else. Go to http://www.wisesolutions.com > You'll find a Windows instal

printing arrays in shell, and .py association with idle

2005-05-17 Thread Paris Miles-Brenden
I have been using python for the last 3 years and feel it to be an excellent programming language.  However, I have run into a few snags or annoyances.  I am currently creating a computational physics simulation which requires large arrays and am using numeric, although this is not a list fo

RE: Problem listing services with wmi

2005-05-17 Thread Tim Golden
[Jean-Sébastien Guay] | | I installed Tim Golden's wmi module | (http://tgolden.sc.sabren.com/python/wmi.html), in the hopes it would | help me list and work with services on my Win32 machine. Now, | everything seems fine except for one thing : Listing services! | | import wmi | | c = wmi.WMI

trouble with copy/deepcopy

2005-05-17 Thread Alexander Zatvornitskiy
Привет Marc! 16 мая 2005 в 22:18, Marc 'BlackJack' Rintsch в своем письме к All писал: MR> That clears only one dictionary at class level. Which is visible on MR> both instances. MR> class Distribution: MR> def __init__(self): MR> self.__gr_on_transp = dict() MR> self.

RE: Problem listing services with wmi

2005-05-17 Thread Tim Golden
[Jean-Sébastien Guay] [... snip Larry Bates' suggestion of removing whitespace ...] | Out of curiosity, is there any reason why whitespace between | the method | name and parameter list parentheses isn't good? Because the code I | posted before was copy-pasted from Tim Golden's site | (http:/

Re: Importing and namespace visibility

2005-05-17 Thread bruno modulix
jean-marc wrote: > Merci Bruno, ( and also to Fredrik ) > > So I think I understand correctly, if I say that: > each modulkes requires its own set of reference to whatever objects it > needs to speak. The interpreter wil see not to create extra copies of > the compiled code if many modules import

Re: Windows distribution suggestions?

2005-05-17 Thread Timothy Smith
Paul Rubin wrote: >Bernhard Holzmayer <[EMAIL PROTECTED]> writes: > > >>I can feel your unhappiness, and I share it. Hi Paul! >>Here are some hints... >> >> > >Thanks! ;-) > > > >>Since your installer needs to run before Python is installed, you need >>something else. Go to http://www.wis

Re: printing arrays in shell, and .py association with idle

2005-05-17 Thread Robert Kern
Paris Miles-Brenden wrote: > I have been using python for the last 3 years and feel it to be an > excellent programming language. However, I have run into a few snags or > annoyances. I am currently creating a computational physics simulation > which requires large arrays and am using numeric,

Lex Python

2005-05-17 Thread s
I am using bumblebee software PARSER GENERATOR to make a C file from LEX regular definitions. I want to compile that C file with VS .NET but I have problems. I am working this for Python regular definitions. Does somebody know how to configure a project to work? Or maybe somone havde done all thi

Python forum

2005-05-17 Thread Jonas Melian
Hi, I'm going to say a suggestion, why don't you create a forum like the one of Ruby (http://www.rubyforums.com/)? for the novices this is a great help, better than a mail list It's also worth noting that rubyforums.com has nearly no posts (six total) because it takes very just a short time worki

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
> Do you have any feature suggestions, additional information that could > go in, something that would extend the content in some way and make it > more useful? I have written something similar which I use all the time. It generates ReST output which I can browse with "less" from the command line,

Re: trouble with copy/deepcopy

2005-05-17 Thread Peter Otten
Alexander Zatvornitskiy wrote: > Hmm. I don't find definition of "class variable" in manual. I try to test > it on such a simple test and find that such variable is NOT shared between > copies: > > class C: > q=int() > > c1=C() > c2=C() > c1.q=5 > c2.q=10 > print c1.q > #5 > print c2.q > #10 >

Re: Newbie : checking semantics

2005-05-17 Thread Stefan Nobis
[EMAIL PROTECTED] (Bengt Richter) writes: [block end statements] > Training wheels do no belong as a permanent part of a bicycle, Yes, but they would be useful for example in web programming (embedding Python into HTML), too. So they are not only training wheels. But that's not so important. Wha

Function parameter passing problem

2005-05-17 Thread Eduardo Biano
Hi, I am new to python and tried to pass parameters between one function to another. I tried two approaches in doing this but failed. The first is, I tried to assign a variable in foo1() inside an HTML tag so that I can retreive it in foo2() using (get_form_var()). But failed using my limited p

Re: Python forum

2005-05-17 Thread Robert Kern
Jonas Melian wrote: > Hi, > > I'm going to say a suggestion, why don't you create a forum like the one > of Ruby (http://www.rubyforums.com/)? for the novices this is a great > help, better than a mail list > > It's also worth noting that rubyforums.com has nearly no posts (six > total) because i

Re: Windows distribution suggestions?

2005-05-17 Thread Bernhard Holzmayer
Paul Rubin wrote: >> Since your installer needs to run before Python is installed, you need >> something else. Go to http://www.wisesolutions.com >> You'll find a Windows installer program, with a demo-version (30days >> license). Try this, it would be my best recommendation. > > Hmm, ok, it look

Re: Windows distribution suggestions?

2005-05-17 Thread Toby Dickenson
On Tuesday 17 May 2005 09:35, Timothy Smith wrote: > mate dont bugger around with all that. py2exe will make you a windows > native exe to run. and for updates you just need to update it's > library.zip. py2exe is working great for me too. >> My app contains three different programs (say alice

Re: Windows distribution suggestions?

2005-05-17 Thread Timothy Smith
Toby Dickenson wrote: >On Tuesday 17 May 2005 09:35, Timothy Smith wrote: > > >>mate dont bugger around with all that. py2exe will make you a windows >>native exe to run. and for updates you just need to update it's >>library.zip. >> >> > >py2exe is working great for me too. > > > >>>My

Help wanted

2005-05-17 Thread Jacob van Iwaarden
Hello NG, I'm a 59 year old Networker who was pushed to go to school for 2 years. I think I did it fine 'till now. But now I have to make a small project in Python with Y-Pages and Snakeletts. My Problem is that Python is like Arabian to me, and I have Time till Sunday. My Question: is here anyo

Re: query progress bar

2005-05-17 Thread f
Timothy Smith wrote: > is it possible to mke a progress bar for queries? say i have a query > that will take 20 seconds, i'd like to give some feed back to users on > how long this will take. it is strictly impossible to predict that cause of network load, server load, query complexity i

\r functionality

2005-05-17 Thread Jake
in c and c++ there is a useful way to refresh an output line in printf and cout using \r meta command. So for example in the wget application the progress of the download is updated on the same output line of the screen. From an intital investigation python seems to lack this. Is this correct? --

Re: Newbie : checking semantics

2005-05-17 Thread Antoon Pardon
Op 2005-05-16, Bengt Richter schreef <[EMAIL PROTECTED]>: > On Mon, 16 May 2005 18:40:43 +0200, Stefan Nobis <[EMAIL PROTECTED]> wrote: > >>rbt <[EMAIL PROTECTED]> writes: >> >>> True beginners (no programming experience whatsoever) don't have >>> to deal with unlearning stuff such as the bracket p

Re: \r functionality

2005-05-17 Thread Markus Weihs
Hi! > in c and c++ there is a useful way to refresh an output line in printf > and cout using \r meta command. So for example in the wget application > the progress of the download is updated on the same output line of the > screen. From an intital investigation python seems to lack this. Is > thi

Re: Python forum

2005-05-17 Thread Markus Weihs
Hi! > I'm going to say a suggestion, why don't you create a forum like the one > of Ruby (http://www.rubyforums.com/)? for the novices this is a great > help, better than a mail list > > It's also worth noting that rubyforums.com has nearly no posts (six > total) because it takes very just a shor

Re: \r functionality

2005-05-17 Thread Daniel Schüle
Jake wrote: > in c and c++ there is a useful way to refresh an output line in printf > and cout using \r meta command. So for example in the wget application > the progress of the download is updated on the same output line of the > screen. From an intital investigation python seems to lack this. I

Re: Windows distribution suggestions?

2005-05-17 Thread Paul Rubin
Bernhard Holzmayer <[EMAIL PROTECTED]> writes: > > Hmm, ok, it looks like the paid version is around 500 USD > > I'll see what the > > customer says but I think they might resist. > > 1) Maybe you can start with the 30days demo license to find out. Yes, I'd certainly do that first. > 2) The

Re: Windows distribution suggestions?

2005-05-17 Thread Paul Rubin
Toby Dickenson <[EMAIL PROTECTED]> writes: > py2exe is working great for me too. I should give it a try. > One tip: make sure your three top-level scripts are as empty as > possible: just import some other module and call a function. All > your active code is then in some library.zip shared betw

Re: Windows distribution suggestions?

2005-05-17 Thread Ivan Voras
Paul Rubin wrote: >>your active code is then in some library.zip shared between the >>three, and you need never change alice.exe, bob.exe, and carol.exe > > I think I understand what you're saying and it sounds like a very > good idea. Thanks. One thing about updating files - sorry if I'm stati

Re: Like Christ PBBUH Prayed

2005-05-17 Thread I Know
oh, just shut the fuck up -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows distribution suggestions?

2005-05-17 Thread Timothy Smith
Ivan Voras wrote: >Paul Rubin wrote: > > > >>>your active code is then in some library.zip shared between the >>>three, and you need never change alice.exe, bob.exe, and carol.exe >>> >>> >>I think I understand what you're saying and it sounds like a very >>good idea. Thanks. >> >> >

Re: query progress bar

2005-05-17 Thread Bernhard Holzmayer
Timothy Smith wrote: > i'm using pypgsql Assuming you work with PostgreSQL, then: You know the EXPLAIN command? EXPLAIN will give you a very accurate estimation for the expense for the query. (You'll have to find out what cost means in terms of your progress.) I did never try this using pypgsq

Re: Python Documentation (should be better?)

2005-05-17 Thread Davo
Overall organization is definitely an issue, at least for newer users. As an occasional python user I remain constantly in a mode of having to look up basic terminology for examples and exact spelling of terms in order to knock out a quick script. I feel very much like Mr. Bottaro that the docs, w

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
John J. Lee wrote: > Why not Jython? There's no command prompt! The file menu from IE is also gone. There is a sun Java console but it looks like this: Java(TM) Plug-in: Version 1.4.2_06 Using JRE version 1.4.2_06 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\x

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
John J. Lee wrote: > Why not Jython? There's no command prompt! The file menu from IE is also gone. There is a sun Java console but it looks like this: Java(TM) Plug-in: Version 1.4.2_06 Using JRE version 1.4.2_06 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\x

Image.putpalette(Colors)?

2005-05-17 Thread Oliver Albrecht
Has somebody a example-script how i can put a other palette to a image? (after this the image should have similar outlook) -- http://mail.python.org/mailman/listinfo/python-list

Re: query progress bar

2005-05-17 Thread Timothy Smith
Bernhard Holzmayer wrote: >Timothy Smith wrote: > > > >>i'm using pypgsql >> >> > >Assuming you work with PostgreSQL, then: >You know the EXPLAIN command? > >EXPLAIN will give you a very accurate estimation for the expense for the >query. >(You'll have to find out what cost means in terms o

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
Timothy Smith wrote: > how locked down is the computer? there's a few (brave) public access > unix shell providers out there. if you could run telnet you could use them Sorry, no telnet. Every executable that is not listed is blocked. For example I can download: http://prdownloads.sourceforge.ne

Re: \r functionality

2005-05-17 Thread Duncan Booth
Jake wrote: > in c and c++ there is a useful way to refresh an output line in printf > and cout using \r meta command. So for example in the wget application > the progress of the download is updated on the same output line of the > screen. From an intital investigation python seems to lack this.

Re: Interaction between TclTk editor with Python code

2005-05-17 Thread Jeff Epler
One way to get a handle on some Tcl variables from Python is to create Tkinter.Variable instances with the names of the existing Tcl variables (normally, the variable names are chosen arbitrarily). Once you've done this, you can do things like add variable traces (the trace_variable method) on the

Bug in Elementtree/Expat

2005-05-17 Thread alainpoint
Hello, I use Elementtree to parse an elementary SVG file (in fact, it is one of the examples in the "SVG essentials" book). More precisely, it is the fig0201.svg file in the second chapter. The contents of the file are as follows (i hope it will be rendered correctly): http://www.w3.org/TR/2001/RE

Re: question about the id()

2005-05-17 Thread Peter Dembinski
"Giovanni Bajo" <[EMAIL PROTECTED]> writes: > Peter Dembinski wrote: > >>> BTW, a typical performance optimization (not done automatically by >>> python) is to hoist unchanging-value expressions out of loops, and >>> obj.method is often such an expression, so you will this strategy >>> when people

Re: Python on a public library computer

2005-05-17 Thread Robert Kern
Anton Vredegoor wrote: > Timothy Smith wrote: > > >>how locked down is the computer? there's a few (brave) public access >>unix shell providers out there. if you could run telnet you could use > > them > > Sorry, no telnet. Every executable that is not listed is blocked. For > example I can dow

best way to do this ...

2005-05-17 Thread Tonino
Hi ALL, I am having a issue with a particular storage of data problem and wanted to know if I am going about it the wrong way. I have a list of reference numbers associated with a product and I have a socket that listens on a port. Now what happens is the client app connects to the server - send

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
Robert Kern wrote: > There is a Java SSH client that runs in the browser. > > http://www.oit.duke.edu/sa/security/ssh.html Great! I have a terminal. I can't figure out how to start jython from there though. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: Markov chain with extras?

2005-05-17 Thread temp
Hi, I think is more easy explained as two linked markov chains. So given one list the other can be generated. Thanks, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: optparse global

2005-05-17 Thread Skip Montanaro
Dennis> So far as I understand, the Dennis> global Dennis> is not needed for your example. I think the original context was that optparse was being used in the context of a function. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python forum

2005-05-17 Thread Brett g Porter
Jonas Melian wrote: > Hi, > > I'm going to say a suggestion, why don't you create a forum like the one > of Ruby (http://www.rubyforums.com/)? for the novices this is a great > help, better than a mail list > > It's also worth noting that rubyforums.com has nearly no posts (six > total) because i

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
Chris Lambacher topposted: > usb key and moveable python. > http://www.voidspace.org.uk/python/movpy/ I have a usb card reader and I can use it. That saves me from having to have remote storage at least. However I can only save files, not open them, except if I use word, excel or powerpoint. The

Re: logging problems

2005-05-17 Thread [EMAIL PROTECTED]
I tried moving the import traceback to the start of the file (logging/__init__.py) but that did not seem to have any effect? I suppose the fix was in version 1.26 in cvs? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python forum

2005-05-17 Thread Skip Montanaro
Brett> Don't forget that there's also the Tutor list (see Brett> http://www.python.org/mailman/listinfo/tutor ), targeted to Brett> people looking to learn the language... I wonder if there's a way to gateway the tutor list to the python-forum.org forum, probably to the beginner's for

Design Question. Data Acquisition/Display related.

2005-05-17 Thread StepH
Hi, I'm building a little application, which the goal is to: 1./ Collect data via Serial line and or via a file (for playback). 2./ Display these data as graph, oscilloscope, ... How manage this ? 1./ Is each "display" must responsible to acquire/read the data ? 2./ Or an engine collect the dat

a little trouble passing values to Oracle using bind variables

2005-05-17 Thread Michael . Coll-Barth
All, As the subject line says, I am having some trouble passing bind variables to Oracle. When I pass a printable string value, such as 'NM', I get data. When I try to pass a non-printable character, such as 'return' - chr(13), I get no data back. I can't simply make NactionCode = chr(13), as py

PyXML/expat and the empty elements

2005-05-17 Thread Armin Steinhoff
Hi all, is it possible to get the name of an empty element specified by ... the expat parser seems only to recognize the form Regards Armin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyXML/expat and the empty elements

2005-05-17 Thread Armin Steinhoff
Armin Steinhoff wrote: > > > Hi all, > > is it possible to get the name of an empty element specified > by ... the expat parser seems only to recognize > the form > > Regards > > Armin Ok ... found the root of the problem. The expat parser is OK :) Regards Armin -- http://mail.py

Re: Python on a public library computer

2005-05-17 Thread TZOTZIOY
On 14 May 2005 04:21:04 -0700, rumours say that "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> might have written: >I'm typing this in a public library on a computer with OS windows 2000 >server. I can run Internet explorer, word, excel and powerpoint, that's >it. Maybe java, but it seems to be flaky. >

Re: Design Question. Data Acquisition/Display related.

2005-05-17 Thread Alex Verstraeten
StepH wrote: >1./ Is each "display" must responsible to acquire/read the data ? >2./ Or an engine collect the data then send them to each "display" ? > > > I'd keep it simple: - DataCollector class asociated with one or more display instances (implemented as a list of display subscribers) it c

Re: best way to do this ...

2005-05-17 Thread Thomas Guettler
Am Tue, 17 May 2005 05:26:15 -0700 schrieb Tonino: > Hi ALL, > > I am having a issue with a particular storage of data problem and > wanted to know if I am going about it the wrong way. > > I have a list of reference numbers associated with a product and I have > a socket that listens on a port.

Re: best way to do this ...

2005-05-17 Thread Tonino
hmm - but I want to store the data in memory eather than a filesystem ... it is not an issue if the program terminates - it is almost needed while running and does not need to remember where it is .. the dirctionary is detail = {} will try the list() function - thanks Tonino -- http://mail.pyt

Re: Windows distribution suggestions?

2005-05-17 Thread dave . brueck
>> One tip: make sure your three top-level scripts are as empty as >> possible: just import some other module and call a function. All >> your active code is then in some library.zip shared between the >> three, and you need never change alice.exe, bob.exe, and carol.exe > > I think I understand wh

Re: Design Question. Data Acquisition/Display related.

2005-05-17 Thread StepH
Alex Verstraeten a écrit : > StepH wrote: > >> 1./ Is each "display" must responsible to acquire/read the data ? >> 2./ Or an engine collect the data then send them to each "display" ? >> >> >> > I'd keep it simple: > > - DataCollector class > asociated with one or more display instances (implem

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
Christos TZOTZIOY Georgiou wrote: > I am not sure I will help you (uncertainty based on the part I snipped), > but the part so far can be easilly solved if you install Python for > single user inside the "Documents and settings\" folder (or > whatever it is called). I did in a similar case. .msi

Sorting x lists based on one list

2005-05-17 Thread Philippe C. Martin
Hi, I'm looking for an easy algorithm - maybe Python can help: I start with X lists which intial sort is based on list #1. I want to reverse sort list #1 and have all other lists sorted accordingly. Any idea is welcome. Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-lis

Re: Image.putpalette(Colors)?

2005-05-17 Thread Fredrik Lundh
Oliver Albrecht wrote: > Has somebody a example-script how i can put a other palette to a image? here's one of the first google hits for "PIL putpalette": http://effbot.org/zone/pil-pseudocolor.htm > (after this the image should have similar outlook) similar to what? -- http://mail.

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
l1 = ['a','b','c'] l2 = ['toto','titi','tata'] # 'toto' refers to 'a', 'titi' to b' l3 = ['foo','bar','doe'] # 'foo' refers to 'a' I want to reverse sort l1 and have l2 and l3 follow accordingly. Regards, Philippe Philippe C. Martin wrote: > Hi, > > I'm looking for an easy

Re: \r functionality

2005-05-17 Thread Fredrik Lundh
"Jake" <[EMAIL PROTECTED]> wrote: > in c and c++ there is a useful way to refresh an output line in printf > and cout using \r meta command. that's a control character that's printed to the terminal by printf/cout, not a "C or C++ meta command" to print the same character in Python, use the same

Re: Python RPM and CentOS

2005-05-17 Thread Ken Godee
The reasonable thing would be to use "yum". > Not really a Python question, but I thought some on this list may be > able to answer so here goes: > > I have several machines on which I must install CentOS. There are many > updates to CentOS and it's very time consuming to do the updates ov

Re: Bug in Elementtree/Expat

2005-05-17 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I use Elementtree to parse an elementary SVG file (in fact, it is one > of the examples in the "SVG essentials" book). More precisely, it is > the fig0201.svg file in the second chapter. > The contents of the file are as follows (i hope it will be rendered > correctly):

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Peter Otten
> Philippe C. Martin wrote: > >> I'm looking for an easy algorithm - maybe Python can help: >> I start with X lists which intial sort is based on list #1. >> I want to reverse sort list #1 and have all other lists sorted >> accordingly. One way, using a helper list with indices: >>> l1 = ['a','b

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
> Another way would be to merge the three lists into one of 3-tuples, sort, > and unmerge, similarly to the DSU pattern -- which raises the question: > why are you using three lists in the first place? :-) Thanks, the lists will evolve and are also stored in 'csv' format in external files at one p

Re: Windows distribution suggestions?

2005-05-17 Thread Serge Orlov
Timothy Smith wrote: > Ivan Voras wrote: > > >Paul Rubin wrote: > > > > > > > >>>your active code is then in some library.zip shared between the > >>>three, and you need never change alice.exe, bob.exe, and carol.exe > >>> > >>> > >>I think I understand what you're saying and it sounds like a very

Re: Windows distribution suggestions?

2005-05-17 Thread rbt
Bernhard Holzmayer wrote: > Paul Rubin wrote: > > >>As what must be penance for something or other, I'm needing to release >>a Python app for use under Windows XP. Please be gentle with me since >>I'm a Un*x weenie and the only thing I've had much practice with under >>Windows is rebooting it. >

Re: Windows distribution suggestions?

2005-05-17 Thread Grant Edwards
On 2005-05-17, Paul Rubin wrote: > As what must be penance for something or other, I'm needing to release > a Python app for use under Windows XP. I'm a Unix guy who occasionally ships a Python app for Win32, and I always recommend py2exe and inno setup: py2exe http://starship.python.n

Re: Design Question. Data Acquisition/Display related.

2005-05-17 Thread Alex Verstraeten
StepH wrote: >>a simple loop could do it >> - handle user events >> - collect data >> - update displays >> - sleep >> >> >Here i've a prob. (due to the fact that I start both with Python & >TkInter). In TkInter, you run your app by launching a mainloop() >routine, right ? So, how, in my fo

Re: Bug in Elementtree/Expat

2005-05-17 Thread alainpoint
Fredrik Lundh wrote: > > adding > > xmlns:xlink="http://www.w3.org/1999/xlink"; > > to the "svg" element should make the problem go away. Thanks for the tip. It indeed solves the problem. Most examples in the book do not include such a declaration and yet are properly rendered by Internet Ex

Reading image dimensions with PIL

2005-05-17 Thread Will McGugan
Hi, I'm writing an app that downloads images. It rejects images that are under a certain size - whithout downloading them completely. I've implemented this using PIL, by downloading the first K and trying to create a PIL image with it. PIL raises an exception because the file is incomplete, bu

Re: Python forum

2005-05-17 Thread Grant Edwards
On 2005-05-17, Jonas Melian <[EMAIL PROTECTED]> wrote: > I'm going to say a suggestion, why don't you create a forum > like the one of Ruby (http://www.rubyforums.com/)? for the > novices this is a great help, better than a mail list Says you. I prever a newsgroup. Mailing lists are in second p

Re: Problem listing services with wmi

2005-05-17 Thread Jean-Sébastien Guay
Hello Tim, thanks for replying, >For your >information, what the code is doing behind the scenes is the following: > > > >import win32com.client > >c = win32com.client.GetObject ( > > "winmgmts:{impersonationLevel=Impersonate,authenticationLevel=Default}/root/cimv2" >) >for service in c.ExecQuer

Re: Sorting x lists based on one list ... maybe an example would make sense:

2005-05-17 Thread Philippe C. Martin
I will look at that merge/unmerge thing Peter Otten wrote: >> Philippe C. Martin wrote: >> >>> I'm looking for an easy algorithm - maybe Python can help: >>> I start with X lists which intial sort is based on list #1. >>> I want to reverse sort list #1 and have all other lists sorted >>> accord

Re: Reading image dimensions with PIL

2005-05-17 Thread Dave Brueck
Will McGugan wrote: > I'm writing an app that downloads images. It rejects images that are > under a certain size - whithout downloading them completely. I've > implemented this using PIL, by downloading the first K and trying to > create a PIL image with it. PIL raises an exception because the

Re: Python forum

2005-05-17 Thread Dave Brueck
Grant Edwards wrote: > On 2005-05-17, Jonas Melian <[EMAIL PROTECTED]> wrote: >>I'm going to say a suggestion, why don't you create a forum >>like the one of Ruby (http://www.rubyforums.com/)? for the >>novices this is a great help, better than a mail list [snip] >>But I think that a forum is great

processing a Very Large file

2005-05-17 Thread DJTB
Hi, I'm trying to manually parse a dataset stored in a file. The data should be converted into Python objects. Here is an example of a single line of a (small) dataset: 3 13 17 19 -626177023 -1688330994 -834622062 -409108332 297174549 955187488 589884464 -1547848504 857311165 585616830 -74991020

Type question

2005-05-17 Thread nitrogenycs
Hello, is this call assumed to be True in any case? result = type(SomeClass) is SomeClass I've written a proxy class which shadows a real object. If you call type(proxyobj) it returns the type of the proxyobject and not the type of the shadowed object. Example: p = proxy(shadowobj()) result1 =

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: >>Do you have any feature suggestions, additional information that > > could > >>go in, something that would extend the content in some way and make > > it > >>more useful? > > > I have written something similar which I use all the time. It generates > ReST > output w

RE: Problem listing services with wmi

2005-05-17 Thread Tim Golden
[... snip results ...] | So it would seem that the 3 methods give the same result. As to which | service it has gotten to when it gets to position 88 in the list, | obviously I can't find out with a script, and it seems that the list | isn't in any order I can see, so I couldn't even venture a

Re: Unique Elements in a List

2005-05-17 Thread Nyet Ya Koshka
> One reasonable solution might be as follows: > > def unique_elts(seq): > elts = {} > for pos, elt in enumerate(seq): > elts.setdefault(elt, []).append(pos) > > return [ (x, p[0]) for (x, p) in elts.iteritems() > if len(p) == 1 ] > Minor tweak to conserve space:

Re: processing a Very Large file

2005-05-17 Thread Tim Peters
[DJTB] > I'm trying to manually parse a dataset stored in a file. The data should be > converted into Python objects. > > Here is an example of a single line of a (small) dataset: > > 3 13 17 19 -626177023 -1688330994 -834622062 -409108332 297174549 955187488 > 589884464 -1547848504 857311165 585

Re: Type question

2005-05-17 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Hello, > > is this call assumed to be True in any case? > > result = type(SomeClass) is SomeClass > > I've written a proxy class which shadows a real object. If you call > type(proxyobj) it returns the type of the proxyobject and not the type > of the shadowed object. Exa

newbie running IDLE with command line arguments

2005-05-17 Thread crypto
Hi, I am trying to use IDLE in order to test my program. My program is the following: import sys, socket size = 1024 host, port, message = sys.argv[1], int(sys.argv[2]), sys.argv[3] print host How do I run this program on IDLE? I trying Run->Run Module but it gives me: Traceback (most recent ca

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
Ron Adam: > Sound great! Adding a command line parser, I'm going to add a brief > command line parser to it today, but nothing as elaborate as you have > already. Could you post a part of the output as an example? How is the > index built? For the command line parser, see http://aspn.activesta

Re: Problem listing services with wmi

2005-05-17 Thread Jean-Sébastien Guay
Hi again Tim, >Well I honestly don't know if this will go any further, >but the following code uses the win32service module from >pywin32 to collect the service information, on the off-chance >that it *won't* fail where WMI does. I can't easily test it >since the script doesn't raise an error on m

Re: Python forum

2005-05-17 Thread Rocco Moretti
Dave Brueck wrote: > Grant Edwards wrote: > >> >> Except for the torture of using a web forum's UI. >> >> [In case you can't tell, I hate web forums. I've never seen a >> single one with a suable UI.] > > > Amen! Generally they are an abomination. > > To make matters worse, many forums that be

os.popen vs os.system

2005-05-17 Thread rbt
Is it more appropriate to use os.popen or os.system on a windows XP client? I'm calling the operting system's shutdown function like this: restart = os.popen(shutdown -r -f) print restart.read() restart.close() If it matters, I'm doing this remotely over sockets. -- http://mail.python.org/mailm

  1   2   >