Re: Representing ambiguity in datetime?

2005-05-17 Thread Andrew Dalke
Ron Adam wrote: > This is a very common problem in genealogy research as well as other > sciences that deal with history, such as geology, geography, and archeology. .. > So it seems using 0's for the missing day or month may be how to do it. Except of course humans like to make things more com

Re: SSL (HTTPS) with 2.4

2005-05-17 Thread Bloke
Thanks Martin. That means my code should work. I am trying to go through a proxy, which works fine for HTTP sites. However, when I try a HTTPS site, the program doesn't respond for quite a while, and returns the error: " File "C:\Python24\lib\urllib2.py", line 996, in do_open raise URLError

Re: "End Of Line" Confusion

2005-05-17 Thread Jordan Rastrick
Well, copying and pasting this text, and changing <<>> to Foo so that its a legal Python identifier (why did you not want to name your class, out of curiosity), I get no problems with this. class Foo: def digest(): ''' char[28] digest ( ) Return the digest of the strings passe

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: > Ron Adam: > >>Thats part of what I'm trying to resolve, the doc strings a lot of > > time > >>isn't enough by itself or is missing. So I'm trying to build up a >>complete enough record so if there is no doc string, at least some > > sense > >>of what it is can be fig

Re: SSL (HTTPS) with 2.4

2005-05-17 Thread "Martin v. Löwis"
Bloke wrote: > Some time ago (years) I had a script on Python 2.2 that would retieve a > HTTPS web site. I used python22-win32-ssl.zip to handle the SSL aspect > and it worked wonderfully. I am revisiting the project and need to > update it to Python 2.4.1. python22-win32-ssl.zip isn't compatabl

SSL (HTTPS) with 2.4

2005-05-17 Thread Bloke
Hi all. Some time ago (years) I had a script on Python 2.2 that would retieve a HTTPS web site. I used python22-win32-ssl.zip to handle the SSL aspect and it worked wonderfully. I am revisiting the project and need to update it to Python 2.4.1. python22-win32-ssl.zip isn't compatable (duh) and

Re: Representing ambiguity in datetime?

2005-05-17 Thread Peter Hansen
Terry Hancock wrote: > What do you do when a date or time is > incompletely specified? Doesn't the answer to this pretty much entirely depend on how you are going to make use of the information? What are your use cases? -- http://mail.python.org/mailman/listinfo/python-list

Re: python and os.system() failure

2005-05-17 Thread Anthony
Michael Hoffman wrote: > > Why aren't you using NamedTemporaryFile instead? Using mkstemp adds a > lot of complications that are usually unnecessary. I believe I originally used mktemp(), but forgot how I learned that I should use mkstemp() instead. I originally wrote the script over 1.5 years ag

Weekly Python Patch/Bug Summary

2005-05-17 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 339 open ( +7) / 2838 closed ( +4) / 3177 total (+11) Bugs: 938 open (+11) / 4962 closed ( +3) / 5900 total (+14) RFE : 187 open ( +1) / 157 closed ( +0) / 344 total ( +1) New / Reopened Patches __ Restore G

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
These days I use generators instead of StringIO, i.e. instead of print >> out, mystring I just write yield mystring and then I "".join the generator. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
Ron Adam: > Thats part of what I'm trying to resolve, the doc strings a lot of time > isn't enough by itself or is missing. So I'm trying to build up a > complete enough record so if there is no doc string, at least some sense > of what it is can be figured out without a lot browsing or looking at

Re: A Specific PyGame

2005-05-17 Thread Michael P. Nugent
Greg Krohn wrote: > Michael P. Nugent wrote: > >> I am looking for a specific "game" that is really a programming >> environment for young kids. >> >> I believe it implements PyGame, and presents two windows: one is a >> grid with some obstacles, and a character that must traverse the grid; >

Re: processing a Very Large file

2005-05-17 Thread Gregory Bond
DJTB wrote: > Hi, > > I'm trying to manually parse a dataset stored in a file. The data should be > converted into Python objects. In addition to what the others have mentioned, this sort of problem is pretty easy to do with a C coded extension type, if you have (or can buy/borrow) any C skills

Re: A Specific PyGame

2005-05-17 Thread Greg Krohn
Michael P. Nugent wrote: > I am looking for a specific "game" that is really a programming > environment for young kids. > > I believe it implements PyGame, and presents two windows: one is a grid > with some obstacles, and a character that must traverse the grid; > another is an interactive ed

A Specific PyGame

2005-05-17 Thread Michael P. Nugent
I am looking for a specific "game" that is really a programming environment for young kids. I believe it implements PyGame, and presents two windows: one is a grid with some obstacles, and a character that must traverse the grid; another is an interactive editor that encourages a learner to wri

Re: Representing ambiguity in datetime?

2005-05-17 Thread Ivan Van Laningham
Hi All-- Ron Adam wrote: > > John Machin wrote: > > > On Tue, 17 May 2005 17:38:30 -0500, Terry Hancock > > <[EMAIL PROTECTED]> wrote: > > > > > >>What do you do when a date or time is > >>incompletely specified? > > The reason the ranges for the month and day specifiers begin > with zero is t

Re: setting up scipy in windows

2005-05-17 Thread Robert Kern
hawkesed wrote: > Hi All, > has anyone out there recently set up scipy on Windows? Cause I am > trying to do so know and I am not having much luck. I have ActiveState > and Plone. When I try to import scipy in ActiveState it says > import scipy > > Traceback (most recent call last): > Fil

setting up scipy in windows

2005-05-17 Thread hawkesed
Hi All, has anyone out there recently set up scipy on Windows? Cause I am trying to do so know and I am not having much luck. I have ActiveState and Plone. When I try to import scipy in ActiveState it says >>> import scipy Traceback (most recent call last): File "", line 1, in ? ImportError: No

Re: Representing ambiguity in datetime?

2005-05-17 Thread Ron Adam
John Machin wrote: > On Tue, 17 May 2005 17:38:30 -0500, Terry Hancock > <[EMAIL PROTECTED]> wrote: > > >>What do you do when a date or time is >>incompletely specified? ISTM, that as it is, there is no >>formal way to store this --- you have to guess, and there's >>no way to indicate that the

Re: speeding up Python script

2005-05-17 Thread James Stroud
You may want to read through this case study by the BDFL. http://www.python.org/doc/essays/list2str.html On Tuesday 17 May 2005 05:32 pm, Luis P. Mendes wrote: > Hi, > > I have a 1000 line python script that takes many hours to finish. It is > running with six inside 'for' loops. > > I've search

Re: speeding up Python script

2005-05-17 Thread Rune Strand
Without seeing any code, it's hard to tell, but it's not a wild guess that 'six inside for loops' may be replaced by more efficient ways ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: speeding up Python

2005-05-17 Thread Dave Brueck
Luis P. Mendes wrote: > I have a 1000 line python script that takes many hours to finish. It is > running with six inside 'for' loops. Hi Luis, Before going too much into optimizing your current code, you might want to take a step back and see if another approach to your problem might work ins

speeding up Python script

2005-05-17 Thread Luis P. Mendes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have a 1000 line python script that takes many hours to finish. It is running with six inside 'for' loops. I've searched the net for ways to speed up the proccess. Psyco improves performance around 3% in this case which is not good enough. H

speeding up Python

2005-05-17 Thread Luis P. Mendes
Hi, I have a 1000 line python script that takes many hours to finish. It is running with six inside 'for' loops. I've searched the net for ways to speed up the proccess. Psyco improves performance around 3% in this case which is not good enough. How can I dramatically improve speed? I tried

Re: Representing ambiguity in datetime?

2005-05-17 Thread John Machin
On Tue, 17 May 2005 17:38:30 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >What do you do when a date or time is >incompletely specified? ISTM, that as it is, there is no >formal way to store this --- you have to guess, and there's >no way to indicate that the guess is different from solid >in

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: > >> ...What would be the advantage of using StringIO over list.append with >> ''.join()? > > The advantage is more in using a function that prints as it goes > rather than building up a large string to print. I would call the > print function at the

Re: Image.putpalette(Colors)?

2005-05-17 Thread Oliver Albrecht
I mean equal outlook. Or as other objective: give some Images (which has all same colors but other palettes) for an Animation the same/one palette and nothings is changed in their outlook -- http://mail.python.org/mailman/listinfo/python-list

IMPORTANT: your message to png-group

2005-05-17 Thread W3C List Manager
This is a response to a message apparently sent from your address to [EMAIL PROTECTED]: Subject: Trotz Stellenabbau From:python-list@python.org Date:Tue, 17 May 2005 23:26:14 UTC Your message has NOT been distributed to the list; before we distribute it, we need your permissio

Business & Spirituality

2005-05-17 Thread Gary
If you are interested in Business and Spirituality visit us at http://www.executivecoachingservices.ca -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing text into dates?

2005-05-17 Thread John Machin
On Tue, 17 May 2005 16:44:12 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote: >"Thomas W" <[EMAIL PROTECTED]> writes: > >> I'm developing a web-application where the user sometimes has to enter >> dates in plain text, allthough a format may be provided to give clues. >> On the server side this piece o

Re: question about the id()

2005-05-17 Thread Dan Sommers
On Tue, 17 May 2005 13:56:18 +0200, Peter Dembinski <[EMAIL PROTECTED]> wrote: > "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

"End Of Line" Confusion

2005-05-17 Thread ncf
I'm having an odd problem. I'm getting an error from IDLE saying "End Of Line detected while scanning single-quoted string." Odd thing is, it's not single-quoted, it's one of the doc-strings (if that's what you call them). In the following code (class name replaced with <<>>), the error is being h

Re: Quick Reference from module doc strings.

2005-05-17 Thread Scott David Daniels
Ron Adam wrote: > ...What would be the advantage of using StringIO over list.append with > ''.join()? The advantage is more in using a function that prints as it goes rather than building up a large string to print. I would call the print function at the bottom (with None as the print destinatio

Re: command to update a web page

2005-05-17 Thread ncf
Ugh. Correction. I can't begin to *act like* I know too much about this subject, ... -- http://mail.python.org/mailman/listinfo/python-list

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

2005-05-17 Thread Philippe C. Martin
I had no clue this was feasible! Python folks should get the Nobel price ! Larry Bates wrote: > Why not merge the lists together using zip() and then > sort. > > info=zip(l1, l2, l3) > info.sort() > info.reverse > > Larry Bates > > Philippe C. Martin wrote: >> l1 = ['a','b','c'] >> l2 = ['

Re: Representing ambiguity in datetime?

2005-05-17 Thread Steve Holden
Terry Hancock wrote: > What do you do when a date or time is > incompletely specified? ISTM, that as it is, there is no > formal way to store this --- you have to guess, and there's > no way to indicate that the guess is different from solid > information. As a result, I have sometimes had to aba

win32com interface implementation example

2005-05-17 Thread kenchanningphd
Can someone post or point me to a fairly simple example where a COM interface (other than the standard ones already exposed by the win32com library) is implemented in python. I fear I am doing it incorrectly. Here is my example: Suppose there is a COM interface "FOO" loaded in the windows registr

Representing ambiguity in datetime?

2005-05-17 Thread Terry Hancock
What do you do when a date or time is incompletely specified? ISTM, that as it is, there is no formal way to store this --- you have to guess, and there's no way to indicate that the guess is different from solid information. As a result, I have sometimes had to abandon datetime, even though it s

Re: command to update a web page

2005-05-17 Thread ncf
I can't begin to know too much about this subject, but Python has a builtin httplib module which might be interesting to you. There is also a ftplib if that is how you want to do it. Python's documentation seems to have adequate examples on how to use the two modules. -Wes -- http://mail.python.

how to get a function object from a frame object

2005-05-17 Thread Vijay Kumar
I have written a trace function and it recieves the current frame object from the interpreter. I want to know whether the event pertains to a class or method or function. I can only get a code object from this frame object but not a function object or class object. Please post if any body have

Re: command to update a web page

2005-05-17 Thread Larry Bates
You probably just want to use ftplib to upload the new page to the website. You will, of course, need to create the new page from the information provided by whatever condition triggered it prior to uploading to the server. Alternatively you could update some information in a MySQL database and h

Re: Python on a public library computer

2005-05-17 Thread Mike Meyer
"Anton Vredegoor" <[EMAIL PROTECTED]> writes: > 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. You

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

2005-05-17 Thread Larry Bates
Why not merge the lists together using zip() and then sort. info=zip(l1, l2, l3) info.sort() info.reverse Larry Bates Philippe C. Martin wrote: > l1 = ['a','b','c'] > l2 = ['toto','titi','tata'] # 'toto' refers to 'a', 'titi' to b' > l3 = ['foo','bar','doe'] # 'foo' refers to 'a' >

Re: EpyDoc problem

2005-05-17 Thread Laszlo Zsolt Nagy
> >At the end of the traceback: > >wx\_misc.py line 3665, in _eq_ >return _misc_.DateTime.__eq__(*args) >TypeError: Expected a pointer > >I have no clue what does it mean but I guess it is an EpyDoc bug. >Does anyone ran into the same problem? Any ideas? > > Looks like it is a problem with w

Re: Parsing text into dates?

2005-05-17 Thread Mike Meyer
"Thomas W" <[EMAIL PROTECTED]> writes: > I'm developing a web-application where the user sometimes has to enter > dates in plain text, allthough a format may be provided to give clues. > On the server side this piece of text has to be parsed into a datetime > python-object. Does anybody have any p

Re: trouble with copy/deepcopy

2005-05-17 Thread Mike Meyer
[EMAIL PROTECTED] (Alexander Zatvornitskiy) writes: > ðÒÉ×ÅÔ 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__

command to update a web page

2005-05-17 Thread atabhcy
Hello All, I have a python script which sends out email once a particular condition is met. Now I want to extend the functionality and make this script update a php web page with the same contents as those of the emails it sends out. What module /commands can help me acheive this? Thanks. -- http

EpyDoc problem

2005-05-17 Thread Laszlo Zsolt Nagy
Hello, I would like to create documentation for my lib using EpyDoc. I do not see how to report bugs on the EpyDoc home page. When I try to create documentation, I get this error: Internal error: Expected a pointer Unhandled exception in thread started by At the end of the traceback: wx\_mi

Re: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied.

2005-05-17 Thread Gerhard Häring
F. GEIGER wrote: > Arrgh, sorry for that post! > > self._dbc.execute(q, data) > > where data is None, works with MySQL. For SQLite I have to write > > if data is not None: > self._dbc.execute(q, data) > else: > self._dbc.execute(q) No, you have to write: sel

Re: Python on a public library computer

2005-05-17 Thread Lucas Raab
[EMAIL PROTECTED] wrote: > Here's my situation: > > 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. > > I want to run python scripts from this computer. At

Re: Python forum

2005-05-17 Thread John J Lee
On Tue, 17 May 2005, Skip Montanaro wrote: > > John> Web forums do reach a different audience. Maybe python.org should > John> have a 'web forum' link to gmane.org's web interface for c.l.py? > > Any idea if the gmane folks could be convinced to move > gmane.comp.python.general to gmane

Re: Python forum

2005-05-17 Thread John J. Lee
Jonas Melian <[EMAIL PROTECTED]> writes: > 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 [...] Web forums do reach a different audience. Maybe python.org should have

Re: Python forum

2005-05-17 Thread madsurfer2000
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 > What's wrong with this web forum ;-) http://groups-beta.google.com/group/comp.lang.pyth

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: > Ron Adam: > > >>Sound great! Adding a command line parser, I'm going to add a brief ^---^ That part should have been deleted, I meant your whole program sounded good, not just that part. :-) >>command line parser to it today

Re: Python forum

2005-05-17 Thread Skip Montanaro
John> Web forums do reach a different audience. Maybe python.org should John> have a 'web forum' link to gmane.org's web interface for c.l.py? Any idea if the gmane folks could be convinced to move gmane.comp.python.general to gmane.comp.lang.python so it's with the rest of the programmi

Re: newbie running IDLE with command line arguments

2005-05-17 Thread qwweeeit
Hi, also if you print only 'host', running the script, you have to pass all the 3 parameters, like: python socket_script.py myserver 567 'All is OK!' The parameter sys.argv[0] is of course the script 's name (in this example: socket_script.py) Bye. -- http://mail.python.org/mailman/listinfo/py

Re: Markov chain with extras?

2005-05-17 Thread tiissa
[EMAIL PROTECTED] wrote: > I think is more easy explained as two linked markov chains. So given > one list the other can be generated. 'Given one list sounds' like an observation (and this sound like an order 2 hmm). But I'm not sure what exactly you want to do with your markov chain. Do you wan

Re: Python on a public library computer

2005-05-17 Thread John J. Lee
"Anton Vredegoor" <[EMAIL PROTECTED]> writes: > 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, n

Re: processing a Very Large file

2005-05-17 Thread Steve M
I'm surprised you didn't recommend to use ZODB. Seems like an ideal way to manage this large amount of data as a collection of Python objects... -- http://mail.python.org/mailman/listinfo/python-list

RE: processing a Very Large file

2005-05-17 Thread Robert Brewer
DJTB wrote: > 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 8573

Re: Python on a public library computer

2005-05-17 Thread John J. Lee
"Anton Vredegoor" <[EMAIL PROTECTED]> writes: > 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: [...] ISTR (maybe incorrectly) there's a Jython shell you can run in IE. John -- h

Re: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied.

2005-05-17 Thread F. GEIGER
Arrgh, sorry for that post! self._dbc.execute(q, data) where data is None, works with MySQL. For SQLite I have to write if data is not None: self._dbc.execute(q, data) else: self._dbc.execute(q) Sorry again, Franz GEIGER "F. GEIGER" <[EMAIL PROTECTED]> sch

pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied.

2005-05-17 Thread F. GEIGER
Im on Python 2.3.4, using pysqlite 2.0.0 (final). When I try to execute self._dbc.execute(q, data) where q is 'select count(*) from Difflets ' and date is None I get the following exception: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0,

Re: reference counting and file objects

2005-05-17 Thread "Martin v. Löwis"
Paul Rubin wrote: >>Consider the function above. Do I need the fp.close(), or will the >>file be closed automatically when fp goes out of scope and its >>reference count drops to zero? > > In CPython, fp gets closed when it leaves scope. One issue is that when the function terminates through an

Re: reference counting and file objects

2005-05-17 Thread Paul Rubin
John Reese <[EMAIL PROTECTED]> writes: > Consider the function above. Do I need the fp.close(), or will the > file be closed automatically when fp goes out of scope and its > reference count drops to zero? In CPython, fp gets closed when it leaves scope. In other implementations you may need try

Re: query progress bar

2005-05-17 Thread Scott David Daniels
f wrote: > 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. > an activity widget, something moving (ie throbber in wxPython) > while waiting fo

reference counting and file objects

2005-05-17 Thread John Reese
def uselessHash(filename): fp= open(filename) hash= 0 for line in fp: hash ^= hash(line.strip()) fp.close() # do I need this or is fp closed by ref count? return hash Consider the function above. Do I need the fp.close(), or will the file be closed automatically when fp goes out

Re: Image.putpalette(Colors)?

2005-05-17 Thread Oliver Albrecht
Thanks, I've read this page.( out of date ?) http://www.pythonware.com/products/pil/articles/creating-palette-images.htm Very nicely to become answered from the major author and python genius highly personally himself :-D Which I want to do is; convert several "RGB" Images (or "P") with one spec

Re: os.popen vs os.system

2005-05-17 Thread rbt
Peter Hansen wrote: > I don't think there's any significant difference between the above > (assuming you add in the missing quotation marks) and > os.system('shutdown -r -f'), except that the os.system() approach is > shorter and more readable if you are simply discarding or printing the > outp

using adodbapi - problem returning Values from Stored Procedure

2005-05-17 Thread Golawala, Moiz M (GE Infrastructure)
Hi All, I am having problem returning values from a Stored Procedure that creates a dynamic table (table variable) inserts values during a procedure and then I select from that dynamic table to furnish values to python. This does not work MY PYTHON CODE IS: import adodbapi connStrSQLServer =

Re: os.popen vs os.system

2005-05-17 Thread rbt
Peter Hansen wrote: > You can't be doing exactly that, since there are no sockets involved... > do you mean the above call is executed -- on the receiving end -- after > some signal is received via a socket in another part of the code? That's > not going to have any effect on things... Here's t

Re: os.popen vs os.system

2005-05-17 Thread rbt
Peter Hansen wrote: > You can't be doing exactly that, since there are no sockets involved... > do you mean the above call is executed -- on the receiving end -- after > some signal is received via a socket in another part of the code? That's > not going to have any effect on things... > Here

Re: os.popen vs os.system

2005-05-17 Thread F. Petitjean
Le Tue, 17 May 2005 13:50:08 -0400, rbt a écrit : > Is it more appropriate to use os.popen or os.system on a windows XP > client? Nope. use the subprocess module :-) Microsoft had the great idea to embed white space inside a lot of directories (compare C:\Program Files\ to /usr/bin ) which mean

Re: os.popen vs os.system

2005-05-17 Thread Peter Hansen
rbt wrote: > 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() I don't think there's any significant difference between the a

Re: Windows distribution suggestions?

2005-05-17 Thread "Martin v. Löwis"
Paul Rubin wrote: > My app contains three different programs (say alice.py, bob.py, and > carol.py) that need to be independently launchable, and a dozen or so > other .py files that get imported into those first three. What I'd > really really like is to make a single installer called (say) > "ap

Re: OSx 10.4 lacks pythonIDE?

2005-05-17 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: > I'm told Xcode does a tolerable job with Python. I just took a look at Xcode and it's not obvious how to run a script. I suspect I need a project? Then run? The docs say nothing that I can find. Thanks. -- Lou Pecora

Re: OSx 10.4 lacks pythonIDE?

2005-05-17 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: > You could learn to use vim or emacs, both of which come with Tiger. They > also have somewhat more Aqua-friendly GUI versions lurking around. I'm > partial to vim, myself. > > PyOXIDE might be a good choice for you. > htt

Re: Python forum

2005-05-17 Thread Paul McNett
Rocco Moretti wrote: > Dave Brueck wrote: > >>Grant Edwards wrote: >> >>>[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. > > It may seem snobish, but my main gripe with most of the web-forums I've > see

Adding "proxy" functions to a type

2005-05-17 Thread Iker Arizmendi
Hello all. Is there a convenient scheme within a C extension to add methods to a type in such a way as to allow me to transparently add a "proxy" around them? For example: typedef PyObject* (*PyMethodCall)(PyObject*, PyObject*); PyObject* middleMan(PyObject* self, PyObject* args) {

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

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

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: 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

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: 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

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: 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: 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: 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

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 =

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

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

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: 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: 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: 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

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: 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

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: 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

  1   2   >