Dr. Dobb's Python-URL! - weekly Python news and links (Sep 19)

2005-09-20 Thread Diez B. Roggisch
QOTW: Python makes data-driven programming easy :-) -- Kent Python rewards abstraction. -- Alex Martelli As unicode becomes more and more prevalent, the issue of regular expressions matching unicode character sets occurs more often. A current thread has advice:

ANNOUNCE: KirbyBase 1.9

2005-09-20 Thread Jamey Cribbs
KirbyBase is a simple, plain-text, database management system written in Python. It can be used either embedded in a python script or in a client/server, multi-user mode. You use python code to express your queries instead of having to use another language such as SQL. KirbyBase is

Free seminar on domain-specific modeling

2005-09-20 Thread Martijn Iseger
Domain-specific modeling makes software development 5-10 times faster than approaches based on UML or MDA. It accelerates development and reduces complexity by automatically generating full code from higher-abstraction design models. Learn from speakers Juha-Pekka Tolvanen, Jack Greenfield,

Re: C#3.0 and lambdas

2005-09-20 Thread Bryan
Diez B. Roggisch wrote: meanwhile, over in python-dev land: Is anyone truly attached to nested tuple function parameters; 'def fxn((a,b)): print a,b'? /.../ Would anyone really throw a huge fit if they went away? I am willing to write a PEP for their removal in 2.6 with a

Re: Can someone explain what I've done wrong...

2005-09-20 Thread Tim Roberts
Jason [EMAIL PROTECTED] wrote: Have to say, I was confused with the post (I received via email, Want to have even more fun? Rename the variable Sophie to Mophie, and your script will work just as you expect. can't see it on the newsgroup yet) from Astan Chee saying he couldn't understand how

RE: Can someone explain what I've done wrong...

2005-09-20 Thread Delaney, Timothy (Tim)
Tim Roberts wrote: Everything works OK while your script runs. When the script exits, your main module goes to clean things up. Apparently, it does so alphabetically. Nope - it would do it in the iteration order of the module's __dict__. Not something that can be relied on. Tim Delaney --

Re: functional or object-oriented?

2005-09-20 Thread beza1e1
This nails it down, yes. :) I probably was too deep into OOP thinking-mode to work pythonic. So i am now rediscovering the python way. Have you read Paul Grahams On Lisp (or was it one of his essays)? He is strongly in favor of functional programming. Mainly because Lisp favors it. He does say

Re: Python game coding

2005-09-20 Thread simonwittber
This article describes a system very similar to my own. shameless plug The LGT library (http://developer.berlios.de/projects/lgt) provides a simple, highly tuned 'microthread' implementation using generators. It is called NanoThreads. It allows a microthread to be paused, resumed, and killed,

Re: undefined symbol: PyUnicodeUCS4*

2005-09-20 Thread Analabha Roy
Fredrik Lundh wrote: Analabha Roy wrote: I'm running Fedora Core 3, and recently I've encountered serious problems with apps that need python to run. running any such app gives errors like: ImportError: /usr/lib/python2.3/site-packages/rhpl/iconv.so: undefined symbol:

Re: Python Doc Problem Example: os.path.split

2005-09-20 Thread Antoon Pardon
Op 2005-09-19, Diez B. Roggisch schreef [EMAIL PROTECTED]: split(path) returns a pair (dirname,filename), where dirname is the part of path up to the last slash, and filename is the rest of the string after the last slash. Bullshit. Slash isn't always the path component delimiter. Get

py2exe 0.6.2 version resources

2005-09-20 Thread klaus . roedel
Hi @all, I've implementet a simple setup script for my application with py2exe. The setup.py works fine, but now I want to add version resources to my *.exe-file. But how can I do it? I've tested it with the setup.cfg, but that doesn't work. I alwayse became the errormessage: error: error in

Re: C#3.0 and lambdas

2005-09-20 Thread Kay Schluehr
Fredrik Lundh wrote: [EMAIL PROTECTED] wrote: On Slashdot there is a discussion about the future C#3.0: http://developers.slashdot.org/developers/05/09/18/0545217.shtml?tid=109tid=8 http://msdn.microsoft.com/vcsharp/future/ The extensions enable construction of compositional APIs

Re: undefined symbol: PyUnicodeUCS4*

2005-09-20 Thread Fredrik Lundh
Analabha Roy wrote: I did not build python from source at all, but installed it from rpm (python-2.3.4-13.1) downloaded from fc3 repositories. the problem isn't with the python interpreter, it's that you're using add-on libraries that don't match your interpreter installation. where did you

services on linux

2005-09-20 Thread pt python
hi to all, im moving from the windows world to the linux world and i need to make a python script to see if a service is instaled (ex: apache), if it is running or stoped and to start/stop a service like apache or mysql. Theres an API on windows to manage services and i need to know how to do

Re: C#3.0 and lambdas

2005-09-20 Thread Fredrik Lundh
Kay Schluehr wrote: Maybe it's an irony of the Python development process that it tries to refuse functional programming facilities in just a moment where mainstream languages start to embrace them. hey, at least one other person got my point ;-) (fwiw, today's python-dev discussion is about

plateform info.

2005-09-20 Thread Monu Agrawal
Hi I want to know whether the program is being run on windows or on Xnix. Is there any variable or method which tells me that it's windows? -- http://mail.python.org/mailman/listinfo/python-list

Re: functional or object-oriented?

2005-09-20 Thread bruno modulix
beza1e1 wrote: This nails it down, yes. :) I probably was too deep into OOP thinking-mode to work pythonic. So i am now rediscovering the python way. Have you read Paul Grahams On Lisp (or was it one of his essays)? He is strongly in favor of functional programming. Yes, but this does

Re: plateform info.

2005-09-20 Thread Juho Schultz
Monu Agrawal wrote: Hi I want to know whether the program is being run on windows or on Xnix. Is there any variable or method which tells me that it's windows? os.name - the value is posix for Linux/Unix, nt or ce for Windows, and so on... --

Re: Organising a python project

2005-09-20 Thread bruno modulix
[EMAIL PROTECTED] wrote: Dear all, Can anyone point me to a resource that describes the best way of organising a python project? My project (gausssum.sf.net) is based around a class, and has a GUI that allows 'easy-access' to the methods of the class. Err... Unless it's a *very* simple

Re: plateform info.

2005-09-20 Thread Mikael Olofsson
Monu Agrawal wrote: Hi I want to know whether the program is being run on windows or on Xnix. Is there any variable or method which tells me that it's windows? Will this help? import sys sys.platform 'win32' There is also the platform module, that can give you a lot more information

Re: undefined symbol: PyUnicodeUCS4*

2005-09-20 Thread Analabha Roy
Fredrik Lundh wrote: Analabha Roy wrote: I did not build python from source at all, but installed it from rpm (python-2.3.4-13.1) downloaded from fc3 repositories. the problem isn't with the python interpreter, it's that you're using add-on libraries that don't match your interpreter

Re: Python and Unix Commands

2005-09-20 Thread Adriaan Renting
Adriaan Renting [EMAIL PROTECTED] 09/19/05 11:20 am | |P.S. you don't need to post your question to this list every 5 minutes. | Hmmm, somehow my reply also got posted more than once... At least that's what it looks like in my mail viewer, I only see one post in Google. Maybe it's just

Re: services on linux

2005-09-20 Thread Christoph Haas
On Tue, Sep 20, 2005 at 02:57:26AM -0500, pt python wrote: im moving from the windows world to the linux world and i need to make a python script to see if a service is instaled (ex: apache), if it is running or stoped and to start/stop a service like apache or mysql. Theres an API on windows

Re: Windows paths, Java, and command-line arguments, oh my!

2005-09-20 Thread Daniel Dittmar
Steve M wrote: About your main problem: I'm still convinced that it's the order of -jar and -D that is important, see my other post. I have tried (not entirely systematically but pretty exhaustively) every combination of backslashes in the cmd string, e.g.:

strange import phenomenon

2005-09-20 Thread Christoph Zwerschke
Just hitting a strange problem with Python import behavior. It is the same on all Python 2.x versions and it is probably correct, but I currently don't understand why this happens. I have created a directory dir with the following three module, __init__, hello, and test2; and another module

Re: How to write this iterator?

2005-09-20 Thread severa
Sorry, my description was not very good, I meant something behaving as: example=Liter(abc,12345,XY) for x in example: print x, a 1 X b 2 Y c 3 4 5 or for that append() method, example=Liter(abc, 12345) for i in range(3): print example.next(), a 1 b example.append(XY) for x in

ready-made file format for file pibes?

2005-09-20 Thread Frithiof Andreas Jensen
I am writing an application that does a lot of filtering of much data through a sequence of filters. After some thinking and wasting a lot of time with an object oriented design with GUI and all, I decided that the Real Way to do this is to create the filters as independent programs that take

Re: py2exe 0.6.2 version resources

2005-09-20 Thread Thomas Heller
[EMAIL PROTECTED] writes: Hi @all, I've implementet a simple setup script for my application with py2exe. The setup.py works fine, but now I want to add version resources to my *.exe-file. But how can I do it? I've tested it with the setup.cfg, but that doesn't work. I alwayse became the

Re: Do thread die?

2005-09-20 Thread Frithiof Andreas Jensen
Maurice LING [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I do have another dumb question which is OT here. Say aFunc method instantiates a SOAP server that serves forever, will it prevent bFunc from running as a separate thread? If the SOAP server thread never sleeps or block,

Re: very high-level IO functions?

2005-09-20 Thread Tom Anderson
On Mon, 19 Sep 2005, Bruno Desthuilliers wrote: York a écrit : (snip) I love python. However, as a biologist, I like some high-levels functions in R. I don't want to spend my time on parse a data file. http://www.python.org/doc/current/lib/module-csv.html Then in my python script, I call R

Re: How am I doing?

2005-09-20 Thread Tom Anderson
On Mon, 19 Sep 2005, Brett Hoerner wrote: Wouldn't the standard idiom be to actually put the code under the if-name, and not make a whole new main() function? Yes. The nice thing about the main() function, though, is that you can do the most basic argument parsing in the if-block. Like so:

Re: services on linux

2005-09-20 Thread Timothy Smith
Martin Franklin wrote: Christoph Haas wrote: On Tue, Sep 20, 2005 at 02:57:26AM -0500, pt python wrote: im moving from the windows world to the linux world and i need to make a python script to see if a service is instaled (ex: apache), if it is running or stoped and to start/stop a

Question about smtplib, and mail servers in general.

2005-09-20 Thread Chris Dewin
Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the toaddresses variable can be a variable of type list. Suppose the list contains well over 100 emails. Would that

zlib written in python

2005-09-20 Thread Andreas Lobinger
Aloha, is a pure _python_ implementation of the zlib available? I have broken zlib streams and need to patch the deocder to get them back. Wishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Tim Williams (gmail)
On 20/09/05, Chris Dewin [EMAIL PROTECTED] wrote: s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the toaddresses variable can be a variable of type list. Suppose the list contains well over 100 emails. Would that create some sort of

print there!

2005-09-20 Thread Godwin Burby
Dear Pythoneer, I am writing a python script which inserts or updates a database from a csv file. i've done the functionality. But i would to like to show the user the current row being inserted or updated in the screen. This can be done as follows: print 'c:\godwin\bl.csv', for i,row in

Exception raised in wrong thread?

2005-09-20 Thread Krzysztof Nowak
Hello all python experts. I have problem and I ask you for help. Probably there is some quite easy solution, but I can't see it. I'm trying to perform some action that have to be timeout safe. So here is the structure of my program: \\\ def TimeoutHandler():

Re: print there!

2005-09-20 Thread Fredrik Lundh
Godwin Burby wrote: print 'c:\godwin\bl.csv', for i,row in enumerate(reader): # inserts or updates the database print i, This displays on the screen as : c:\godwin\bl.csv 1 2 3 4 5 6 7 8 ^ But i want it to show the above numbers on the same spot denoted by the carat

Re: How to write this iterator?

2005-09-20 Thread Jordan Rastrick
I've written this kind of iterator before, using collections.deque, which personally I find a little more elegant than the list based approach: from collections import deque def interleave(*iterables): iters = deque(iter(iterable) for iterable in iterables) while iters: it =

Re: Help! Python either hangs or core dumps when calling C malloc

2005-09-20 Thread Frithiof Andreas Jensen
Lil [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I already double checked my C code. It runs perfectly fine in C without any errors. Errr - It runs perfectly fine without *announcing* any errors (while gleefully urinating all over its memory space). The programming model for C is

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Daniel Dittmar
Chris Dewin wrote: Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the toaddresses variable can be a variable of type list. Suppose the list contains

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Tim Williams (gmail)
On 20/09/05, Daniel Dittmar [EMAIL PROTECTED] wrote: Chris Dewin wrote: Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) Not really an answer to your question, but it's probably

Release of Shed Skin 0.0.2: Easy Windows/OSX Installation

2005-09-20 Thread Mark Dufour
Hi! Shed Skin 0.0.2 is up on SourceForge. It should install easily under Windows 2000/XP and OSX. Please give it a try and let me know if there are still some problems. If you would like to help me improve Shed Skin, please send me small code snippets, preferrably extracted from real-life use

Re: How am I doing?

2005-09-20 Thread Jason
Tom Anderson wrote: On Mon, 19 Sep 2005, Brett Hoerner wrote: Wouldn't the standard idiom be to actually put the code under the if-name, and not make a whole new main() function? Yes. The nice thing about the main() function, though, is that you can do the most basic argument parsing

Release of Shed Skin 0.0.2: Easy Windows/OSX Installation

2005-09-20 Thread Mark Dufour
Hi! Shed Skin is an experimental Python-to-C++ compiler. Along with GNU/Linux, version 0.0.2 should now also install easily under Windows 2000/XP and OSX. Please give it a try and let me know if there are still some problems. If you would like to help me improve Shed Skin, please send me small

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Peter Hansen
Daniel Dittmar wrote: Chris Dewin wrote: Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the toaddresses variable can be a variable of type list. Suppose

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Peter Hansen
Chris Dewin wrote: Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the toaddresses variable can be a variable of type list. Suppose the list contains

Re: multithread exception handling

2005-09-20 Thread Piet van Oostrum
[EMAIL PROTECTED] (p) wrote: [Timer example snipped] p My question is, why exception is not raised correctly? Could be the p reason that (probably) timer is another thread and there is no p exception in the main thread? yes, the doc of Timer says it is a subclass of Thread, and therefore runs

Re: Exception raised in wrong thread?

2005-09-20 Thread Piet van Oostrum
Please don't post the same question twice with different subjects. -- Piet van Oostrum [EMAIL PROTECTED] URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Doc Problem Example: os.path.split

2005-09-20 Thread Diez B. Roggisch
I think this is unfair. The use of slash is a failing of the current documentation. If his use is an indication of a nano-tube-narrow mindset then so would be the use by the actual documentation writers. You're right - I missed that somehow, as the original docs talk about components - which

QCheckListItem signal question

2005-09-20 Thread Artur M. Piwko
Is there a way to distinguish if QCheckListItem was checked/unchecked or clicked? -- [ Artur M. Piwko : Pipen : AMP29-RIPE : RLU:100918 : From == Trap! : SIG:213B ] [ 15:36:46 user up 10740 days, 3:31, 1 user, load average: 0.06, 0.06, 0.06 ] Grain grows best in

Replacing an XML element?

2005-09-20 Thread Nick Vargish
I've been trying to figure out how to do something that seems relatively simple, but it's just not coming together for me. I'm hoping someone will deign to give me a little insight here. The problem: We have XML documents that use a custom table format that was designed primarily for typesetting

Re: Python Doc Problem Example: os.path.split

2005-09-20 Thread Peter Hansen
Diez B. Roggisch wrote: I think this is unfair. The use of slash is a failing of the current documentation. If his use is an indication of a nano-tube-narrow mindset then so would be the use by the actual documentation writers. You're right - I missed that somehow, as the original docs talk

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Steve Holden
Peter Hansen wrote: Chris Dewin wrote: Hi. I've been thinking about using smtplib to run a mailing list from my website. s = smtplib.SMTP(server) s.sendmail(fromaddress, toaddresess, msg) I know that in this instance, the toaddresses variable can be a variable of type list. Suppose the list

Re: Replacing an XML element?

2005-09-20 Thread Max Erickson
Nick Vargish [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: I've been trying to figure out how to do something that seems relatively simple, but it's just not coming together for me. I'm hoping someone will deign to give me a little insight here. The problem: We have XML documents that

Re: Organising a python project

2005-09-20 Thread Scott David Daniels
bruno modulix wrote: [EMAIL PROTECTED] wrote: What is the best or typical directory structure that allows the easy creation of binary packages somedir: test/ test_product.py# Really do include tests product.py setup.py Look at distutils documentation. Also read up

Re: zlib written in python

2005-09-20 Thread Scott David Daniels
Andreas Lobinger wrote: Aloha, is a pure _python_ implementation of the zlib available? I have broken zlib streams and need to patch the deocder to get them back. Wishing a happy day LOBI Check your zlib version: import zlib; print zlib.ZLIB_VERSION There were some fixes you

win32 service and time.sleep()

2005-09-20 Thread rbt
I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it breaks. Should it be unable to send, it sleeps for 10

Re: are variables local only to try/except blocks?

2005-09-20 Thread Dan
try: try: doSomething1 excp = 0 except: excp = 1 #endTry Note that you can use else after except for precisely this purpose: try: foo() except: print 'Exception raised' else: print 'No exception raised' -- Optimism is the faith that leads to

win32 service and time.sleep()

2005-09-20 Thread rbt
I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it breaks. Should it be unable to send, it sleeps for 10

Re: python script under windows

2005-09-20 Thread cg
I ran into a similar issue a couple of months back, the solution on Windows is to run it as a service. It is very simple, you need Mark Hammond's Win32 extensions. For path you have to use absolute filepath for all local files and for network drive use the UNC path i.e.

Re: Question about smtplib, and mail servers in general.

2005-09-20 Thread Piet van Oostrum
Steve Holden [EMAIL PROTECTED] (SH) wrote: SH To add one final note, if the fromaddress belongs to a domain that's SH properly handled by the SMTP server then you aren't relaying (since you are SH a legitimate domain user) so the mails should go through. And most smtp servers that I know also

Re: QCheckListItem signal question

2005-09-20 Thread David Boddie
You could connect the currentChanged() or clicked() signals in your QListView to a slot in some other object (perhaps the parent of the QListView). When the signal is emitted, you can examine the state of the item passed to the slot. Hope this helps, David --

Re: Replacing an XML element?

2005-09-20 Thread Nick Vargish
Max Erickson [EMAIL PROTECTED] writes: table.parentNode.replaceChild(newtable, table) I knew it had to be something simple (but not as simple as I am, apparently :^). Thanks much, Max, you've saved the rest of my day. Nick -- #includestdio.h/* sigmask (sig.c) 20041028 PUBLIC DOMAIN */

vendor-packages directory

2005-09-20 Thread Rich Burridge
Hi, I work in the Accessibility Program Office at Sun Microsystems. I'm part of a team that is using Python to create a screen reader called Orca, that'll help blind people (and people with low vision) have access to the GNOME desktop for Solaris and Linux. See:

Re: win32 service and time.sleep()

2005-09-20 Thread Oracle
On Tue, 20 Sep 2005 10:49:13 -0400, rbt wrote: I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it

Re: Python Doc Problem Example: os.path.split

2005-09-20 Thread Steve Holden
Peter Hansen wrote: Diez B. Roggisch wrote: [...] But I stand by the nano-tube-narrow mind-set of Xah Lee. Besides his tourette syndrome he also is simply unwilling to read documentation if it is not what _he_ expects it to be. It's interesting to note that c.l.p still manages to give

Re: Two questions on PyDev for Eclipse

2005-09-20 Thread Fabio Zadrozny
Hi, for 2: as far as I know, eclipse must have 'local', or at least 'emulated' local access, so, if you have samba access, it should do what you want. for 1... I use it a LOT without any problems for some really big projects ( with about 2.000 python modules -- not counting the python

Alternatives to Stackless Python?

2005-09-20 Thread [EMAIL PROTECTED]
After recently getting excited about the possibilities that stackless python has to offer (http://harkal.sylphis3d.com/2005/08/10/multithreaded-game-scripting-with-stackless-python/) and then discovering that the most recent version of stackless available on stackless.com was for python 2.2 I am

Dr. Dobb's Python-URL! - weekly Python news and links (Sep 19)

2005-09-20 Thread Diez B. Roggisch
QOTW: Python makes data-driven programming easy :-) -- Kent Python rewards abstraction. -- Alex Martelli As unicode becomes more and more prevalent, the issue of regular expressions matching unicode character sets occurs more often. A current thread has advice:

Re: win32 service and time.sleep()

2005-09-20 Thread Laszlo Zsolt Nagy
rbt wrote: I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it breaks. Should it be unable to send, it

Re: are variables local only to try/except blocks?

2005-09-20 Thread Steve Holden
BarrySearle wrote: # Is this valid (or is excp local to try/except)? try: try: doSomething1 excp = 0 This block is problematic because excp won;t be set if doSomething1 raises an exception. except: excp = 1 #endTry if (_excp_): doSomething1 # is

Where is my exception

2005-09-20 Thread Laszlo Zsolt Nagy
I have this code in a wxWidgets program: class HtmlHintWindow(wx.Frame): def __init__(self,pos,hint,config): global _current_hint_window # Determine the size of the screen self.screensize = wx.ClientDisplayRect()[2:] # Calculate the size of the hint ;-)

Re: win32 service and time.sleep()

2005-09-20 Thread Steve Holden
rbt wrote: I have a win32 service written in Python. It works well. It sends a report of the status of the machine via email periodically. The one problem I have is this... while trying to send an email, the script loops until a send happens and then it breaks. Should it be unable to send, it

Re: QCheckListItem signal question

2005-09-20 Thread Artur M. Piwko
In the darkest hour on 20 Sep 2005 08:07:47 -0700, David Boddie [EMAIL PROTECTED] screamed: You could connect the currentChanged() or clicked() signals in your QListView to a slot in some other object (perhaps the parent of the QListView). When the signal is emitted, you can examine the state

testing a website from python

2005-09-20 Thread M.N.A.Smadi
hi; I just want to test that a given website is up or not from a python script. I thought of using wget as an os command. Any better ideas? thanks moe smadi -- http://mail.python.org/mailman/listinfo/python-list

Re: testing a website from python

2005-09-20 Thread Laszlo Zsolt Nagy
M.N.A.Smadi wrote: hi; I just want to test that a given website is up or not from a python script. I thought of using wget as an os command. Any better ideas? urllib http://www.python.org/doc/current/lib/module-urllib.html If you only want to test if the HTTP port is open or not:

Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-20 Thread Michael Sparks
Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at using this library and to familiarise myself writing small tests with each of the ciphers. When I hit

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-20 Thread Jp Calderone
On Tue, 20 Sep 2005 16:08:19 +0100, Michael Sparks [EMAIL PROTECTED] wrote: Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at using this library and to

Re: Where is my exception

2005-09-20 Thread Laszlo Zsolt Nagy
The program prints out point 1 but it does not print point 2. What am I missing? Sorry from all. I should have been looked at the processor before I posted. There is no exception. It was an infinite loop inside the try block, but it was called from an event handler. I did not notice that

Re: How to write this iterator?

2005-09-20 Thread George Sakkis
Jordan Rastrick [EMAIL PROTECTED] wrote: I've written this kind of iterator before, using collections.deque, which personally I find a little more elegant than the list based approach: Nice, that's *much* more elegant and simple ! Here's the class-based version with append; note that

Getting tired with py2exe

2005-09-20 Thread Thomas Heller
I'm slowly getting tired maintaining py2exe. It is far from perfect, although it has interesting features (I would say). The problem, apart from the work, is that it is good enough for me - I can do everything that I need with it. But I assume I use far less libaries than other Python

Re: vendor-packages directory

2005-09-20 Thread Michael Ekstrand
On Tuesday 20 September 2005 10:22, Rich Burridge wrote: [lots of well-written and logical information about a proposed vendor-packages directory snipped] Is this something that would be considered for a future Python release? +1 to that from me... it looks like good idea - have you

Re: Alternatives to Stackless Python?

2005-09-20 Thread Stephan Diehl
On Tue, 20 Sep 2005 08:50:44 -0700, [EMAIL PROTECTED] wrote: After recently getting excited about the possibilities that stackless python has to offer (http://harkal.sylphis3d.com/2005/08/10/multithreaded-game-scripting-with-stackless-python/) and then discovering that the most recent version

Using PyGILState_Ensure

2005-09-20 Thread Ralf Riemer
Hi, I have some questions concerning the global interpreter lock: I am working with Windows XP Professional Version 5.1, Python version 2.4.1 and Microsoft Visual C++.Net Version 7.1. From Python I call a function from a C++ dll using calldll.call_foreign_function. This C++ function does a

Re: vendor-packages directory

2005-09-20 Thread Steve Holden
Rich: You made it to the States, then? How ironic, I've just been working in VA for nine years, but recently returned to Scotland and ended up living in Linlithgow, known to most Sun long-timers. Hope mp is still providing good service. Rich Burridge wrote: Hi, I work in the Accessibility

How to Handle exceptions using OpenerDirector

2005-09-20 Thread swarna pulavarty
Hi all, I am trying to figure out a way to handle exceptions for error code 4xx , and 5xx 's . I came to know that these can be handled using OpenerDirector class and urllib2 module in Python. I could'ntfind the right syntax or examples ofhow to usethese Handlers. Any help is greatly

mailing from with python

2005-09-20 Thread M.N.A.Smadi
hi; if i want to send a mail message using the mail client on a machine that has smtp protocol is there an easy way (i.e. like bash where you would just type mail -s SUBJECT message RECIPIENT) to do it from a python script? thanks moe smadi --

Re: Two questions on PyDev for Eclipse

2005-09-20 Thread Fabio Zadrozny
Fabio Zadrozny wrote: Hi, for 2: as far as I know, eclipse must have 'local', or at least 'emulated' local access, so, if you have samba access, it should do what you want. for 1... I use it a LOT without any problems for some really big projects ( with about 2.000 python modules -- not

Re: Crypto.Cipher.ARC4, bust or me doing something wrong?

2005-09-20 Thread Michael Sparks
Jp Calderone wrote: On Tue, 20 Sep 2005 16:08:19 +0100, Michael Sparks [EMAIL PROTECTED] wrote: Hi, I suspect this is a bug with AMK's Crypto package from http://www.amk.ca/python/code/crypto , but want to check to see if I'm being dumb before posting a bug report. I'm looking at using this

Re: mailing from with python

2005-09-20 Thread Tim Williams (gmail)
On 20/09/05, M.N.A.Smadi [EMAIL PROTECTED] wrote: hi; if i want to send a mail message using the mail client on a machine that has smtp protocol is there an easy way (i.e. like bash where you would just type mail -s SUBJECT message RECIPIENT) to do it from a python script? Any mail client

Monitoring a directory for changes

2005-09-20 Thread Florian Lindner
Hello, is there a python lib (preferably in the std lib) to monitor a directory for changes (adding / deleting files) for Linux 2.6? Thanks, Florian -- http://mail.python.org/mailman/listinfo/python-list

Re: vendor-packages directory

2005-09-20 Thread Terry Reedy
Rich Burridge [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I work in the Accessibility Program Office at Sun Microsystems. I'm part of a team that is using Python to create a screen reader called Orca, that'll help blind people (and people with low vision) have access to the

Re: Organising a python project

2005-09-20 Thread Ron Adam
[EMAIL PROTECTED] wrote: Dear all, Can anyone point me to a resource that describes the best way of organising a python project? My project (gausssum.sf.net) is based around a class, and has a GUI that allows 'easy-access' to the methods of the class. What is the best or typical directory

Re: Monitoring a directory for changes

2005-09-20 Thread Reinhold Birkenfeld
Florian Lindner wrote: Hello, is there a python lib (preferably in the std lib) to monitor a directory for changes (adding / deleting files) for Linux 2.6? There isn't, but if you don't want to use dnotify/inotify, it is trivial to implement: use a timer and check the listdir() return value.

Re: Would you pls tell me a tool to step debug python program?

2005-09-20 Thread SPE - Stani's Python Editor
SPE ships with a debugger as well: http://pythonide.stani.be It's free open source. Johnny Lee wrote: Hi, I've met a problem to understand the code at hand. And I wonder whether there is any useful tools to provide me a way of step debug? Just like the F10 in VC... Thanks for your

Re: Getting tired with py2exe

2005-09-20 Thread Steve M
What about PyInstaller that was announced the other day? The feature list looks great, and it appears the developers intend to maintain and enhance the program indefinitely.

Re: Getting tired with py2exe

2005-09-20 Thread James Stroud
On Tuesday 20 September 2005 11:43, Steve M wrote: What about PyInstaller that was announced the other day? The feature list looks great, and it appears the developers intend to maintain and enhance the program indefinitely. ... http://pyinstaller.hpcf.upr.edu/pyinstaller That's one short

Re: Release of Shed Skin 0.0.2: Easy Windows/OSX Installation

2005-09-20 Thread Michael Sparks
Mark Dufour wrote: Shed Skin is an experimental Python-to-C++ compiler. Along with GNU/Linux, version 0.0.2 should now also install easily under Windows 2000/XP and OSX. Please give it a try and let me know if there are still some problems. ss.py writes a make file, but unfortunately doesn't

Re: Object default value

2005-09-20 Thread James Stroud
See this recent clpy thread: http://www.thescripts.com/forum/thread19253.html On Tuesday 20 September 2005 13:05, ago wrote: The print statement was only for illustrative purposes, when calling varx=myobj I need to receive obj.x as opposed to the instance of obj, but I also need to call

  1   2   >