Re: threading support in python

2006-09-06 Thread [EMAIL PROTECTED]
Paul Rubin wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > (1) I think is here to stay, if you're going to tell programmers that > > their destructors can't make program-visible changes (e.g. closing the > > database connection when a dbconn is destroyed), that's a _huge_ change > > fr

Re: threading support in python

2006-09-06 Thread Bryan Olson
I wrote: > Ah, O.K. Like Paul, I was unaware how Unix file worked with > mmap. Insert "locking" after "file". -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Secure Postgres access

2006-09-06 Thread Larry Bates
Reid Priedhorsky wrote: > Hi folks, > > I would like to access a remote Postgres server from a Python program in a > secure way. Postgres doesn't currently listen to the Internet for > connections, and I'd prefer to keep it that way. > > I know how to forward ports using SSH, but I don't like doi

Re: How to insert an email-link into wxPython's HtmlWindow

2006-09-06 Thread Gerold Penz
[EMAIL PROTECTED] schrieb: > Now, you have reduced your problem to: how do I call the standard Email > client? I have no idea... Hi! With Windows, you can use ``os.startfile()``: import os os.startfile("mailto:[EMAIL PROTECTED]&body=World") regards, Gerold :-) -- _

Re: a Pywin Outlook adress Book Question

2006-09-06 Thread Kai Mayfarth
> > Although now I Google a little more, it looks like AddressEntryFilter > might well do what you want. Worth a look, anyway :) > > TJG Big Thx for your answer. I found some infos about the AddressEntryFilter. Its that what i was searching for, BUT its very limited it cant search for the las

Re: threading support in python

2006-09-06 Thread lcaamano
Here's a relevant post http://mail.python.org/pipermail/python-3000/2006-April/001051.html or http://tinyurl.com/fod9u [EMAIL PROTECTED] wrote: > Andre> This seems to be an important issue and fit for discussion in the > Andre> context of Py3k. What is Guido's opinion? > > Dunno. I've nev

Re: Script Bug?

2006-09-06 Thread John Purser
On Wed, 2006-09-06 at 10:51 -0700, Omar wrote: > okay,I'm going through this python tutorial, and according to the > tutorial, I can type this: > > [code] > myList = [1,2,3,4] > for index in range(len(myList)): > myList[index] += 1 > print myList > [/code] > > however, in my IDLE python shell

Re: Script Bug?

2006-09-06 Thread Omar
no, i put those there. i have restarted IDLE and it now works. a friend told me it was a bug in IDLE. I'd like to try activepython, but i can't dl it from work (that site is blocked for some reason). anybody got the install for it, or a mirror location for it? -- http://mail.python.org/mailma

Re: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread tjreedy
"Claudio Grondi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I also erroneously assumed, that the first problem was detected during > parsing ... so, by the way: how can I distinguish an error raised while > parsing the code and an error raised when actually running the code? P

Re: Refactor a buffered class...

2006-09-06 Thread lh84777
Here is another version, class ChunkeredBuffer: def __init__(self): self.buffer = [] self.sentries = [] def append(self, item): self.buffer.append(item) def chunk(self, chunkSize, keepFirst = False): self.sentries.append(len(self.buffer)) forget

Re: Script Bug?

2006-09-06 Thread Tal Einat
Omar wrote: > no, i put those there. > > i have restarted IDLE and it now works. a friend told me it was a bug > in IDLE. > > I'd like to try activepython, but i can't dl it from work (that site is > blocked for some reason). anybody got the install for it, or a mirror > location for it? You ca

Re: New 2.5 release date: September 19

2006-09-06 Thread John Salerno
Méta-MCI wrote: > September 19?Okay ! Which year? At this point, I'm not sure. :) -- http://mail.python.org/mailman/listinfo/python-list

Scientific computing and data visualization.

2006-09-06 Thread Fie Pye
Hallo I would like to have a high class open source tools for scientific computing and powerful 2D and 3D data visualisation. Therefore I chose python, numpy and scipy as a base. Now I am in search for a visualisation tool. I tried matplotlib and py_opendx with

Re: Refactor a buffered class...

2006-09-06 Thread lh84777
oops > to have: > > this . > this . is a . > this . is a . test to . > is a . test to . check if it . > test to . check if it . works . > check if it . works . well . > works . well . it looks like . well . it looks like . it looks like . -- http://mail.python.org/mailman/listinfo/python-list

Re: a new object definition

2006-09-06 Thread Steven Bethard
Sylvain Ferriol wrote: > with the 'make' syntax, it will be really easy to translate a program or > a data structure defined in XML format into python syntax. Only if there are no ordering constraints and no need for multiple elements with the same name. The make statement was built to mirror t

Re: Scientific computing and data visualization.

2006-09-06 Thread skip
Fie>I would like to have a high class open source tools for Fie>scientific computing and powerful 2D and 3D data Fie>visualisation. Therefore I chose python, numpy and scipy as Fie>a base. Now I am in search for a visualisation tool. I tried

Data sticking around too long

2006-09-06 Thread CedricCicada
Greetings! Here's my script: start of script class ScannerCommand: taskName = '' scanList = [] def __init__(self): print "Creating a ScannerCommand object; list has " + \ str(len(self.scanList)) + " objects." class Scanner: def Read(self, data):

string search and modification

2006-09-06 Thread Jim Britain
I know absolutely nothing about Python. My background is shell scripts assembly language and C programming. Currently I work network support. This is a portion of a Python script written by aaronsinclair. the full script can be found at: http://forums.ev1servers.net/printthread.php?t=50435&pa

Re: Data sticking around too long

2006-09-06 Thread skip
Cedric> Why is the ScannerCommand object being created with a scanList Cedric> that contains the data that was in the previously created Cedric> ScannerCommand object? Your scanList attribute is defined at the class level and is thus shared by all ScannerCommand instances. Skip -- h

Re: string search and modification

2006-09-06 Thread Paul Rubin
Jim Britain <[EMAIL PROTECTED]> writes: > I would like to match [123.123.123.123] (including the qualifying > brackets), but be able to simply return the contents, without the > brackets. >>> p=r'\[((\d{1,3}\.){3}\d{1,3})\]' >>> m = 'dsl-kk-dynamic-013.38.22.125.touchtelindia.net [125.22.38.13]

Re: Scientific computing and data visualization.

2006-09-06 Thread Matteo
Fie Pye wrote: > Hallo > > I would like to have a high class open source tools for scientific > computing and powerful 2D and 3D data visualisation. Therefore I chose > python, numpy and scipy as a base. Now I am in search for a visualisation > tool. I tried matplotlib and py_opendx with

Re: Data sticking around too long

2006-09-06 Thread Matimus
taskName and scanList are defined at the class level making them class attributes. Each instance of the ScannerCommand class will share its class attributes. What you want are instance attributes which can be initialized whithin the constructor like so: >>> class ScannerCommand: ... def __init

Re: threading support in python

2006-09-06 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > We had that debate already (PEP 343). Yes, there is some sloppy > > current practice by CPython users that relies on the GC to close the > > db conn. > > This point is unrelated to with or ref-counting. Even the standard > library will close fi

Re: threading support in python

2006-09-06 Thread Jean-Paul Calderone
On 06 Sep 2006 13:29:33 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: >"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: >> > We had that debate already (PEP 343). Yes, there is some sloppy >> > current practice by CPython users that relies on the GC to close the >> > db conn. >> >> Thi

Re: Data sticking around too long

2006-09-06 Thread CedricCicada
Skip and Matimus, Thank you for your replies. Putting initialization in the constructor gets me what I want. But I'd like to understand this a bit more. Here's another script: class ScannerCommand: taskName = '' scanList = [] def __init__(self, data): self.scanList = []

Re: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Claudio Grondi
tjreedy wrote: > "Claudio Grondi" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>I also erroneously assumed, that the first problem was detected during >>parsing ... so, by the way: how can I distinguish an error raised while >>parsing the code and an error raised when actually

Re: Data sticking around too long

2006-09-06 Thread skip
Cedric> But I'd like to understand this a bit more. Always a good idea. ;-) Cedric> Here's another script: Cedric> class ScannerCommand: Cedric> taskName = '' Cedric> scanList = [] Cedric> def __init__(self, data): Cedric> self.scanList = [] C

Re: Data sticking around too long

2006-09-06 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Skip and Matimus, > > Thank you for your replies. Putting initialization in the constructor > gets me what I want. But I'd like to understand this a bit more. > Here's another script: > > class ScannerCommand: > taskName = '' > scanList = [] > > def __ini

Re: Data sticking around too long

2006-09-06 Thread CedricCicada
Greetings again! There's something more to determining whether a class member is a class variable or an instance variable. Here's a slightly expanded version of my last script: class ScannerCommand: taskName = '' scanList = [] number = 0 def __init__(self, data): pass #

Re: threading support in python

2006-09-06 Thread [EMAIL PROTECTED]
Paul Rubin wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > > We had that debate already (PEP 343). Yes, there is some sloppy > > > current practice by CPython users that relies on the GC to close the > > > db conn. > > > > This point is unrelated to with or ref-counting. Even the sta

Re: Scientific computing and data visualization.

2006-09-06 Thread Fernando Perez
Matteo wrote: > One hurdle to overcome is transferring array data from Numeric/Numpy > into VTK. I have a sort of ad-hoc method to do that (mainly for volume > data). If anyone knows of any elegant solution, or a module to ease the > pain, I'd like to hear about it. https://svn.enthought.com/enth

Cross-platform application restart?

2006-09-06 Thread Heikki Toivonen
Is there any way to restart a Python (GUI) application that would work on Windows, Mac OS X and Linux? I'd like to provide a "restart" button to a dialog that would restart the application to pick new changes or start with different options. -- Heikki Toivonen -- http://mail.python.org/mailman

Re: threading support in python

2006-09-06 Thread Paul Rubin
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > If they don't get GC'd, then "when they are GC'd" is never. The point > is that the standard library _does_ close files and take other > program-visible actions in __del__ methods; I'm unclear on if you think > that doing so is actually sloppy prac

Re: Refactor a buffered class...

2006-09-06 Thread Michael Spencer
[EMAIL PROTECTED] wrote: > actually for the example i have used only one sentry condition by they > are more numerous and complex, also i need to work on a huge amount on > data (each word are a line with many features readed from a file) An open (text) file is a line-based iterator that can be fed

Re: python vs java

2006-09-06 Thread Jason
Bruno Desthuilliers wrote: > With a GUI ? If so, you probably want to check out wxPython or PyGTK > (wxPython will also buy you MacOS X IIRC, and wil perhaps be easier to > install on Windows). Just a warning: wxPython does operate slightly differently between Mac OS X, Linux, and Windows. The di

RE: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Dino Viehland
Warnings is one of the features that didn't quite make it for v1.0. In general w.r.t. non-ASCII characters you'll find IronPython to be more like Jython in that all strings are Unicode strings. But other than that we do support PEP-263 for the purpose of defining alternate file encodings. We'

Where are the source files for the Python FAQs?

2006-09-06 Thread Dave Kuhlman
I've recently implemented an output writer for Docutils that produces .odt/ODF files for oowriter from reST (restructured text). I'd like to feed the Python FAQs through my odtwriter, to find out how well it does at formatting. But, I can't find the source. Can someone tell me the location of th

Re: Scientific computing and data visualization.

2006-09-06 Thread Robert Kern
Matteo wrote: > If you are working with NetCDF files, you may wish to add > ScientificPython (distinct from SciPy) to your toolset. It has a very > nice NetCDF interface. Unfortunately, it is ancient, and you would have > to install Numeric Python (ancestor to NumPy). However, it is easy to > conve

trackin down hard to find bugs

2006-09-06 Thread Carl J. Van Arsdall
Hey all, I have several scripts currently in a production environment. Every two to three weeks or so our systems end up crashing. Unfortunately the traceback's aren't enough for me to debug the problem, so I'm having an issue trying to determine what to do next. The other issue is that the

Re: Data sticking around too long

2006-09-06 Thread Matimus
Someone correct me if I'm wrong (sometimes I get the terms mixed up) but I believe that what you are seeing is due to 'number' being an immutable type. This means that its value cannot be changed and thus each assignment is effectively creating a new instance if int. I believe lists are considered

Re: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Super Spinner
Claudio Grondi wrote: > tjreedy wrote: > > "Claudio Grondi" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>I also erroneously assumed, that the first problem was detected during > >>parsing ... so, by the way: how can I distinguish an error raised while > >>parsing the cod

No ValueError for large exponents?

2006-09-06 Thread enigmadude
As many have heard, IronPython 1.0 was released. When I was looking through the listed differences between CPython and IronPython, the document mentioned that using large exponents such as 10 ** 735293857239475 will cause CPython to hang, whereas IronPython will raise a ValueError. Trying this on m

RE: IronPython 1.0 - Bugs or Features?

2006-09-06 Thread Dino Viehland
Yes, IronPython generates IL which the JIT will then compile when the method is invoked - so our parse/compile time is slower due to this. We've experimented w/ a fully interpreted mode (which can be enabled with -X:FastEval) where we walk the generated AST instead of compiling it, but that mod

Re: No ValueError for large exponents?

2006-09-06 Thread Robin Becker
enigmadude wrote: > As many have heard, IronPython 1.0 was released. When I was looking > through the listed differences between CPython and IronPython, the > document mentioned that using large exponents such as 10 ** > 735293857239475 will cause CPython to hang, whereas IronPython will > raise a

Re: Path?

2006-09-06 Thread Steve Holden
Dr. Pastor wrote: > I installed Python 2.5 on Windows XP. > I got the following system that works well. > --- > Python 2.5b3 (r25b3:51041, Aug 3 2006, 09:35:06) [MSC v.1310 32 bit > (Intel)] on > win32 Type "copyright", "credits" or "license()" for more information. > > IDLE 1.2b3 > >>> import

Re: Cross-platform application restart?

2006-09-06 Thread faulkner
asynchronously start a process which waits for the parent to close, then starts your script. cmd = "python -c 'import time,os;time.sleep(2);os.system(YOUR_SCRIPT)'" if os.name == 'nt': cmd = 'start ' + cmd else: cmd += ' &' subprocess.Popen(cmd, shell=True) sys.exit() Heikki Toivonen wrot

python extension modules within packages not loading

2006-09-06 Thread tyler
I've written a small python extension but I'm having difficulty loading it at runtime. The source for my extension is a module which is a member of a package is organized as follows. test/setup.py test/myutils/__init__.py test/myutils/netmodule.c my setup.py file for building / installing looks

tkinter text event

2006-09-06 Thread Jay
I'm having trouble with using the event with the Text object. When I use them together (which is a logical combination), I use this code: textbox = Text(root, wrap="word", height=15, width=50) textbox.bind("", resolveGlyphs) def resolveGlyphs(event): textBuf = textbox.get

Re: Path?

2006-09-06 Thread Dr. Pastor
Many thanks, Sir. == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups = East and West-Coast Server Farms - Total Privacy via Encryption = -- http://mail.python.org/mailman/l

Re: tkinter text event

2006-09-06 Thread John McMonagle
On Wed, 2006-09-06 at 17:54 -0700, Jay wrote: > I'm having trouble with using the event with the Text object. > When I use them together (which is a logical combination), I use this > code: > > textbox = Text(root, wrap="word", height=15, width=50) > textbox.bind("", resolveGlyphs) >

Re: 22, invalid agument error

2006-09-06 Thread Justin Ezequiel
> sockobj.bind(('',40007)) tried on my N6600 with same error try using your phone's IP instead of the empty string '' tried sockobj.bind(('127.0.0.1',40007)) and did not get an error -- http://mail.python.org/mailman/listinfo/python-list

Re: change property after inheritance

2006-09-06 Thread David Isaac
Le mercredi 06 septembre 2006 16:33, Alan Isaac a écrit : >> Suppose a class has properties and I want to change the >> setter in a derived class. If the base class is mine, I can do this: >> http://www.kylev.com/2004/10/13/fun-with-python-properties/ >> Should I? (I.e., is that a good solution?)

Re: are there any lib for receive hotmail ?

2006-09-06 Thread 叮叮当当
thanks. Tim Chase 写道: > > And receiving hotmail (or any outher webmail) using scraping > > techniques is a daunting task, to say the least - you should > > forget about that IMHO. > > There's a perl project called "gotmail" that will do the scraping > to dump in a local mailbox file (I don't re

iso creation for python backup script

2006-09-06 Thread Ryan Krauss
I would like to write a python script to backup my wife's important stuff to a CD or DVD. She is running windows. Is there an easy way to create as iso image file using python or some other way to use python to create (and burn?) a cd? I am open to other free cd backup tools that work in windows

Re: iso creation for python backup script

2006-09-06 Thread Steve Holden
Ryan Krauss wrote: > I would like to write a python script to backup my wife's important > stuff to a CD or DVD. She is running windows. Is there an easy way > to create as iso image file using python or some other way to use > python to create (and burn?) a cd? I am open to other free cd backup

Re: Refactor a buffered class...

2006-09-06 Thread George Sakkis
Michael Spencer wrote: > Here's a small update to the generator that allows optional handling of the > head > and the tail: > > def chunker(s, chunk_size=3, sentry=".", keep_first = False, keep_last = > False): > buffer=[] > sentry_count = 0 > > for item in s: > buffer.ap

newbe who is also senior having a senior moment

2006-09-06 Thread stan
I am a complete newbe to python and only got here because I am trying to set up iTunes in game Second Life. Have followed all instructions but keep getting an error reading from my XP Pro OS as follows File "C:\Python24\2L file for iTunes", line 4, in -toplevel- import win32com.client Impor

Re: newbe who is also senior having a senior moment

2006-09-06 Thread Rama
On 07/09/06, stan <[EMAIL PROTECTED]> wrote: File "C:\Python24\2L file for iTunes", line 4, in -toplevel-import win32com.clientImportError: No module named win32com.clientcan someone pls point me in the right direction here as I am trying to urgently fix the file for someones birthday in game (

Re: newbe who is also senior having a senior moment

2006-09-06 Thread placid
stan wrote: > I am a complete newbe to python and only got here because I am trying to set > up iTunes in game Second Life. Have followed all instructions but keep > getting an error reading from my XP Pro OS as follows > > File "C:\Python24\2L file for iTunes", line 4, in -toplevel- > import

Re: iso creation for python backup script

2006-09-06 Thread Ryan Krauss
Something like burn4free could work if there was a way to write an input script for it. I am trying to avoid manually adding different folders to the backup each time. I want a script that does it all for me. On 9/6/06, Steve Holden <[EMAIL PROTECTED]> wrote: > Ryan Krauss wrote: > > I would lik

Re: iso creation for python backup script

2006-09-06 Thread John Purser
Windows itself (2000+) comes with it's own backup solution that might even support burning to disk. I haven't used MS in a year or so but it might be worth looking at. John Purser On Wed, 2006-09-06 at 22:55 -0500, Ryan Krauss wrote: > Something like burn4free could work if there was a way to wr

Re: Where are the source files for the Python FAQs?

2006-09-06 Thread Eriol
Dave Kuhlman wrote: > Can someone tell me the location of the reST source files for the > Python FAQs.  I have not been able to find them. https://svn.python.org/www/trunk/pydotorg/doc/faq/ -- Eriol - *p = NULL; - EIBTI GPG Key ID 297BE0CA -- http://mail.python.org/mailman/listinfo/python-

Re: Refactor a buffered class...

2006-09-06 Thread Michael Spencer
George Sakkis wrote: > Michael Spencer wrote: > >> Here's a small update to the generator that allows optional handling of the >> head >> and the tail: >> >> def chunker(s, chunk_size=3, sentry=".", keep_first = False, keep_last = >> False): >> buffer=[] ... > > And here's a (probably) mor

Re: 22, invalid agument error

2006-09-06 Thread kondal
> > sockobj.bind(('',40007)) > > tried on my N6600 with same error > > try using your phone's IP instead of the empty string '' > > tried sockobj.bind(('127.0.0.1',40007)) and did not get an error In general sockets layer bind with null host makes it pick the address from arp resolution and null

Re: Is it just me, or is Sqlite3 goofy?

2006-09-06 Thread Tim Roberts
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >[EMAIL PROTECTED] wrote: >(snip) >> But shouldn't a significant feature like that be explained >> in the Python manuals? > >Why should it ? It's a SQLite feature, not a Python one. You have missed the key point that, as of Python 2.5, SQLite 3 is

Re: Refactor a buffered class...

2006-09-06 Thread Paul Rubin
[EMAIL PROTECTED] writes: > for: s = "this . is a . test to . check if it . works . well . it looks > . like ." > the output should be (if grouping by 3) like: > > => this . > => this . is a . I don't understand, you mean you have all the items in advance? Can't you do something like this? I got

Re: newbie pipe question

2006-09-06 Thread linuxnooby
Thanks David -- http://mail.python.org/mailman/listinfo/python-list

sending emails using python

2006-09-06 Thread sridhar
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = '[EMAIL PROTECTED]' toAddress = '[EMAIL PROTECTED]' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib server = smtplib

Setting windows/win32 timezone from python

2006-09-06 Thread jrhastings
I know there are many threads on this topic but I haven't yet found an answer to this question. I'd like to map from a utc to a local time in an arbitrary timezone (not necessary the default local timezone). To do this on UNIX is relatively straightforward by setting the TZ environment variable (

Re: 22, invalid agument error

2006-09-06 Thread Infinite Corridor
Justin Ezequiel wrote: > > sockobj.bind(('',40007)) > > tried on my N6600 with same error > > try using your phone's IP instead of the empty string '' > > tried sockobj.bind(('127.0.0.1',40007)) and did not get an error I didn't get an error either, but the whole thing hangs up, and I am forced

Re: 22, invalid agument error

2006-09-06 Thread Infinite Corridor
kondal wrote: > > > sockobj.bind(('',40007)) > > > > tried on my N6600 with same error > > > > try using your phone's IP instead of the empty string '' > > > > tried sockobj.bind(('127.0.0.1',40007)) and did not get an error > > In general sockets layer bind with null host makes it pick the addr

<    1   2