Sept 14 Fredericksburg, VA ZPUG: Packaging with zpkg, review of Python Cookbook 2nd ed

2005-09-12 Thread Gary Poster
Please join us September 14, 7:30-9:00 PM, for the fourth meeting of the Fredericksburg, VA Zope and Python User Group (ZPUG). This meeting has three features of note. - Fred Drake, Zope Corp Senior Software Engineer, Python core developer, and Python documentation maintainer and editor will

Appending paths relative to the current file to sys.path

2005-09-12 Thread Greg McIntyre
Out of interest, are there any standard Python modules that do this: def appendRelativeIncludePath(*relpath): dir = os.path.abspath(os.path.join(os.path.dirname(__file__), *relpath)) if not dir in sys.path: sys.path.append(dir) I ask because I often find myself doing this: #

Re: Why do Pythoneers reinvent the wheel?

2005-09-12 Thread Gregory Bond
François Pinard wrote: In computer science, I often saw old concepts resurrecting with new names, and then mistaken for recent inventions. New ideas are not so frequent... There are very few problems in Computer Science that cannot be solved with an additional level of indirection. --

Download Mail Via Python

2005-09-12 Thread Albert Leibbrandt
I am busy writing a little prog to download mail and put the contents of the emails into a database. The problem that I am currently facing is that I can view the message body only if it was sent with a mail client other than MS outlook or outlook express. What am I missing, any reading

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

2005-09-12 Thread Johnny Lee
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 help. Regards, Johnny -- http://mail.python.org/mailman/listinfo/python-list

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

2005-09-12 Thread Adriaan Renting
try Eric3 F6-F10 will probably do exactly what you want. www.die-offenbachs.de/detlev/eric3.html Johnny Lee [EMAIL PROTECTED] 09/12/05 9:12 am 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

Re: PEP-able? Expressional conditions

2005-09-12 Thread Antoon Pardon
Op 2005-09-09, Terry Hancock schreef [EMAIL PROTECTED]: On Thursday 08 September 2005 04:30 am, Paul Rubin wrote: Terry Hancock [EMAIL PROTECTED] writes: Not the same at all. It evaluates both the true and false results, which may have side effects. If you are depending on that kind

read stdout/stderr without blocking

2005-09-12 Thread Jacek Popławski
Popen from subprocess module gives me access to stdout, so I can read it. Problem is, that I don't know how much data is available... How can I read it without blocking my program? example: import subprocess import time

Re: read stdout/stderr without blocking

2005-09-12 Thread Adriaan Renting
Check out the select module, for an example on how to use it: pexpect.sourceforge.net Jacek Pop*awski [EMAIL PROTECTED] 09/12/05 10:07 am Popen from subprocess module gives me access to stdout, so I can read it. Problem is, that I don't know how much data is available... How can I read

Re: Download Mail Via Python

2005-09-12 Thread Adriaan Renting
You could maybe give some more information about what you're doing, like if you use POP or IMAP, the kind of mail server used, etc. I know the at least Outpook used some odd MS specific formatting when sending stuff trough Exchange (non-HTML/RTF/plain text) for the body. This is the Rich text

Re: packaging python for install.

2005-09-12 Thread Daniel Dittmar
J wrote: I have created an App that embedds the python interpreter and I am now in the process of creating an installer. I am currently linking python24.lib, but it is only 184k and I suspect that it imports other dlls... I am also using numarray. Does anyone have any experiences in packaging

Enter as Tab in wxPython

2005-09-12 Thread lux
Hi, how to modify the Enter key behavior in order to be equal to the Tab Key. I need navigate between the ctrl only with the Enter Key. Tanks, Luca PS: sorry for my English -- http://mail.python.org/mailman/listinfo/python-list

Re: Redundant code in multiple methods

2005-09-12 Thread bruno modulix
Rob Conner wrote: No you don't need to know Zope to help me. The whole reason I'd even want to do this is because of Zope though. I made a Zope product, and now want to perfect it. some simple example code... code class User: def View(self): # play with data here

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

2005-09-12 Thread Franz Steinhaeusler
On 12 Sep 2005 00:12:29 -0700, Johnny Lee [EMAIL PROTECTED] 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 help. What about the new winpdb debugger. It

exceptions from logging on Windows

2005-09-12 Thread Oliver Eichler
Hi, I experience several exceptions from python's logging system when using the rollover feature on Windows. Traceback (most recent call last): File c:\Python24\lib\logging\handlers.py, line 62, in emit if self.shouldRollover(record): File c:\Python24\lib\logging\handlers.py, line 132,

Re: exceptions from logging on Windows

2005-09-12 Thread Simon Dahlbacka
I ended up monkey-patching doRollover to do a number of retries before giving up. (In our case the failures is due to our log browser happening to read the latest changes when logging wants to rollover) (Actually, I implemented a simple QueueHandler and do all file operations from a different

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

2005-09-12 Thread Varghjärta
I myself used/use Komodo for all my developing, it's the best and easiest to use graphical IDE for python i've found thus far. On 12/09/05, Franz Steinhaeusler [EMAIL PROTECTED] wrote: On 12 Sep 2005 00:12:29 -0700, Johnny Lee [EMAIL PROTECTED] wrote: Hi, I've met a problem to

read from label

2005-09-12 Thread [EMAIL PROTECTED]
HI, It may be a very elementry question, but I need to know that how can I get text of a label. -- http://mail.python.org/mailman/listinfo/python-list

which is more 'pythonic' / 'better' ?

2005-09-12 Thread gabor
hi, there are 2 versions of a simple code. which is preferred? === if len(line) = (n+1): text = line[n] else: text = 'nothing' === === try: text = line[n] except IndexError: text = 'nothing' === which is the one you would use? thanks, gabor --

Re: read stdout/stderr without blocking

2005-09-12 Thread Jacek Popławski
Adriaan Renting wrote: Check out the select module, for an example on how to use it: pexpect.sourceforge.net Two problems: - it won't work on Windows (Cygwin) - how much data should I read after select? 1 character? Can it block if I read 2 characters? --

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Steven D'Aprano
On Mon, 12 Sep 2005 12:52:52 +0200, gabor wrote: hi, there are 2 versions of a simple code. which is preferred? === if len(line) = (n+1): text = line[n] else: text = 'nothing' === === try: text = line[n] except IndexError: text = 'nothing' ===

OCR librarys

2005-09-12 Thread Timothy Smith
i'm looking for ocr librarys with reasonably free licensing and the ablity to use python with them. c library's that i can call from python are acceptable. so far all i have run into is voodoo and wild claims. i've tried gocr, and it wasn't very impressive. i'm like to be able to ocr

Re: read from label

2005-09-12 Thread Steven D'Aprano
On Mon, 12 Sep 2005 03:43:04 -0700, [EMAIL PROTECTED] wrote: HI, It may be a very elementry question, but I need to know that how can I get text of a label. Rotate the bottle or jar towards you until the label is facing you, then read it. :-) Seriously though, perhaps you would like to

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Will McGugan
gabor wrote: hi, there are 2 versions of a simple code. which is preferred? === if len(line) = (n+1): text = line[n] else: text = 'nothing' === === try: text = line[n] except IndexError: text = 'nothing' === which is the one you would use? I would

Re: Expected Value

2005-09-12 Thread Steven D'Aprano
On Sat, 10 Sep 2005 17:50:06 -0700, George wrote: How would I get the expected value out of this information. I have tried many times to understand this but am unable to. Do you have a specific Python problem here, or do you need help with the maths? If Python, please tell us what your problem

[Fwd: Sept 14 Fredericksburg, VA ZPUG: Packaging with zpkg, review of Python Cookbook 2nd ed]

2005-09-12 Thread Benji York
Please join us September 14, 7:30-9:00 PM, for the fourth meeting of the Fredericksburg, VA Zope and Python User Group (ZPUG). This meeting has three features of note. - Fred Drake, Zope Corp Senior Software Engineer, Python core developer, and Python documentation maintainer and editor will

Re: Premature wakeup of time.sleep()

2005-09-12 Thread jepler
Is your system running something like ntpd? I'm not sure how use of ntp, which will slowly adjust the system's time to match the network time, will interact with calls to sleep(). This is almost certainly an OS question, though, not a Python question. Python's time.sleep() is a bit complicated,

Re: packaging python for install.

2005-09-12 Thread Miki
Hello J, I have created an App that embedds the python interpreter and I am now in the process of creating an installer. I am currently linking python24.lib, but it is only 184k and I suspect that it imports other dlls... I am also using numarray. Does anyone have any experiences in packaging

First release of Shed Skin, a Python-to-C++ compiler.

2005-09-12 Thread Mark Dufour
Obviously, neither the 0 nor the message following should have been displayed. It's a pity that this assumption was made, but given the short time the project's been going I can understand it, hopefully Mark will continue towards greater python compliance :) The latter is certainly my goal. I

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Pierre Barbier de Reuille
Will McGugan a écrit : gabor wrote: hi, there are 2 versions of a simple code. which is preferred? === if len(line) = (n+1): text = line[n] else: text = 'nothing' === === try: text = line[n] except IndexError: text = 'nothing' === which is the one you

Re: encryption with python

2005-09-12 Thread Steven D'Aprano
Thank you to Mike Meyer, Kirk Sluder, and anyone who made constructive comments and/or corrections to my earlier post about generating student IDs as random numbers. Especially thanks to Marc Rintsch who corrected a stupid coding mistake I made. Serves me right for not testing the code. Kirk

How to protect Python source from modification

2005-09-12 Thread Frank Millman
Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the database via TCP/IP. The client program contains all the

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Will McGugan
Pierre Barbier de Reuille wrote: I would actualy use the following for this particular case.. text = line[n:n+1] or 'nothing' ... and you would get either a list of one element or a string ... I think you wanted to write : text = (line[n:n+1] or ['nothing'])[0] I was assuming that

Re: dual processor

2005-09-12 Thread Robin Becker
Robin Becker wrote: Robin Becker wrote: Paul Rubin wrote: This module might be of interest: http://poshmodule.sf.net It seems it might be a bit out of date. I've emailed the author via sf, but no reply. Does anyone know if poshmodule works with latest stuff? from the horse's mouth

Re: Launching Python programs from Linux shell script

2005-09-12 Thread Ernesto
Thanks! How do you add Python in Linux to the path? Similar to setting environment variables in Windows. I want to be able to type python when I'm in any directory to launch the interpreter. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to protect Python source from modification

2005-09-12 Thread Gerhard Häring
Frank Millman wrote: Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the database via TCP/IP. The

Re: How to protect Python source from modification

2005-09-12 Thread Peter Hansen
Frank Millman wrote: I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the database via TCP/IP. The client

Re: Printer List from CUPS

2005-09-12 Thread Mike Tammerman
Thanks, a lot, this helped me so much. It was so easy, to compile, install and use the cupsext module. -Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: read stdout/stderr without blocking

2005-09-12 Thread Grant Edwards
On 2005-09-12, Jacek Pop?awski [EMAIL PROTECTED] wrote: ready = select.select(tocheck, [], [], 0.25) ##continues after 0.25s for file in ready[0]: try: text = os.read(file, 1024) How do you know here, that you should read 1024 characters? What

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-12 Thread Fuzzyman
Mark Dufour wrote: Obviously, neither the 0 nor the message following should have been displayed. It's a pity that this assumption was made, but given the short time the project's been going I can understand it, hopefully Mark will continue towards greater python compliance :) The latter is

ANNOUNCEMENT: The ring of the friendly serpent in business suite: Python, Zope, Plone

2005-09-12 Thread jegenye2001
Hi everybody, Since I couldn't find a (working) webring with such a profile, I started my own one: The ring of the friendly serpent in business suite: Python, Zope, Plone http://www.jegenye.com/ Anyone (companies or individual programmers/consultants) are welcome to join if they offer services

ZPT and incompatible version None error :(

2005-09-12 Thread Jaroslaw Zabiello
I got strange errors in Zope 2.7. METALError macro 'context/base' has incompatible version None, at line 1, column 1 One ZPT file (named 'base') defines some simply slots: html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-US lang=en-US i18n:domain=plone

Re: python callbacks and windows

2005-09-12 Thread davidstummer
cheers for the replies. so far using ctypes, i have managed to load a dll, and have the dll call a function in my python code using function pointers. what i now need to do is load an .exe that contains a windows procedure (window is hidden). how can i load an .exe using python like i loaded

Re: ANNOUNCEMENT: The ring of the friendly serpent in business suite: Python, Zope, Plone

2005-09-12 Thread Richie Hindle
[Miklos] The ring of the friendly serpent in business suite: Python, Zope, Plone http://www.jegenye.com/ Did you mean business suit? -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

pcapy listen on multiple devices

2005-09-12 Thread billiejoex
Hi all. I noticed that with the original pcap sniffing library it is possible to listen on multiple devices by using select() or poll() function. These function aren't present in pcapy module. Do you got any suggestion to avoid this problem? --

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-12 Thread Brian Quinlan
Mark Dufour wrote: The latter is certainly my goal. I just haven't looked into supporting exceptions yet, because I personally never use them. I feel they should only occur in very bad situations, or they become goto-like constructs that intuitively feel very ugly. In the 5500 lines of the

Re: make sure entire string was parsed

2005-09-12 Thread Steven Bethard
Paul McGuire wrote: I have to differentiate between: (NP -x-y) and: (NP-x -y) I'm doing this now using Combine. Does that seem right? If your word char set is just alphanums+-, then this will work without doing anything unnatural with leaveWhitespace: from pyparsing import * thing =

Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Claudio Grondi
It is maybe not a pure Python question, but I think it is the right newsgroup to ask for help, anyway. After connecting a drive to the system (via USB or IDE) I would like to be able to see within seconds if there were changes in the file system of that drive since last check (250 GB drive with

Socket options

2005-09-12 Thread Tor Erik Sønvisen
Hi For an online game I'm developing I need some advice concerning tcp-sockets, and especially which socket options to set and not. What I want is a connection where nothing is buffered (but are sent immediatly), and I also want to keep the connections persistent until explicitly closed. The

Re: Grouping lists

2005-09-12 Thread PyPK
hmm thanks for that..but kind of not sure how this groupby works.. also if I want to group elements with one value apart how would this change.Should this change in groupby part or in the loop? something like... lst = [1,1,2,1,3,5,1,1,1,1,2,7,7] returns (0,3),4,5,(6,10),(11,12) so its something

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Steven Bethard
Steven D'Aprano wrote: try...except... blocks are quick to set up, but slow to catch the exception. If you expect that most of your attempts will succeed, then the try block will usually be faster than testing the length of the list each time. But if you expect that the attempts to write

Re: ANNOUNCEMENT: The ring of the friendly serpent in business suite: Python, Zope, Plone

2005-09-12 Thread jegenye2001
Oops, suit indeed. Though it might be considered as a pun if you really want to. :-) Anyway, thanks, I will correct it. Cheers, Miklos -- http://mail.python.org/mailman/listinfo/python-list

Python Database Scripts

2005-09-12 Thread Chuck
Hello, Can anyone provide any kind of python database (mysql) code or point me to a link that has this? Just simple things as maybe using a driver, opening up a db, an insert and select. Any help would be greatly appreciated! Thanks, --Chuck --

fully-qualified namespaces?

2005-09-12 Thread Lenny G.
Suppose I have a python module named Hippo. In the Hippo module is a class named Crypto. The Crypto class wants to 'from Crypto.Hash import SHA' which refers to the module/classes in python-crypto. Other classes in the Hippo module want to 'import Crypto' referring to Hippo.Crypto. How do I do

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Steve Holden
Will McGugan wrote: Pierre Barbier de Reuille wrote: I would actualy use the following for this particular case.. text = line[n:n+1] or 'nothing' ... and you would get either a list of one element or a string ... I think you wanted to write : text = (line[n:n+1] or ['nothing'])[0] I

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
Gerhard Häring wrote: Frank Millman wrote: Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Michael Hoffman
Steven Bethard wrote: Exceptions are for exceptional conditions, that is, things that you expect to happen infrequently[1]. So if I think the code is going to fail frequently, I test the condition, but if I think it won't, I use exceptions. I think there exceptions (no pun intended) to

Re: Launching Python programs from Linux shell script

2005-09-12 Thread Steve Holden
Ernesto wrote: Thanks! How do you add Python in Linux to the path? Similar to setting environment variables in Windows. I want to be able to type python when I'm in any directory to launch the interpreter. Thanks! You will (or should) have a shell intialisation file variously called

Re: fully-qualified namespaces?

2005-09-12 Thread George Sakkis
Lenny G. [EMAIL PROTECTED] wrote: Suppose I have a python module named Hippo. In the Hippo module is a class named Crypto. The Crypto class wants to 'from Crypto.Hash import SHA' which refers to the module/classes in python-crypto. Other classes in the Hippo module want to 'import Crypto'

Re: which is more 'pythonic' / 'better' ?

2005-09-12 Thread Will McGugan
Steve Holden wrote: I'd say it's much more likely that line is a list of lines, since it seems improbable that absence of a character should cause a value of nothing to be required. You may be right. I always use plural nouns for collections. To me 'line' would suggest there was just one

Re: Python Database Scripts

2005-09-12 Thread Peter Decker
On 12 Sep 2005 08:28:39 -0700, Chuck Can anyone provide any kind of python database (mysql) code or point me to a link that has this? Just simple things as maybe using a driver, opening up a db, an insert and select. Any help would be greatly appreciated! It might be more than you're

Re: Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Tom Anderson
On Mon, 12 Sep 2005, Claudio Grondi wrote: It is maybe not a pure Python question, but I think it is the right newsgroup to ask for help, anyway. You might try comp.arch.storage or comp.sys.ibm.pc.hardware.storage, or a newsgroup specific to the operating system you're working on. After

Re: Python Database Scripts

2005-09-12 Thread jegenye2001
import MySQLdb # Create a connection object and create a cursor conn = MySQLdb.Connect(host=localhost, port=3306, user=mysql, passwd=pwd123, db=mytest) c = conn.cursor() # execute some SQL c.execute(SELECT * FROM mystuff) # Fetch all results from the cursor into a sequence results =

Re: make sure entire string was parsed

2005-09-12 Thread Steven Bethard
Steven Bethard wrote: Paul McGuire wrote: I have to differentiate between: (NP -x-y) and: (NP-x -y) I'm doing this now using Combine. Does that seem right? If your word char set is just alphanums+-, then this will work without doing anything unnatural with leaveWhitespace: from

Ctypes Install in Linux

2005-09-12 Thread Ernesto
I'm trying to install ctypes for Python in Linux. Linux won't let me create /usr/local/lib/python2.4/site-packages/ctypes ... Permission denied ... Anyone know how I could get it to work? It's probably something I need to chmod or change permissions on... Thanks! --

Re: ZPT and incompatible version None error :(

2005-09-12 Thread bruno modulix
Jaroslaw Zabiello wrote: I got strange errors in Zope 2.7. 2.7.? METALError macro 'context/base' has incompatible version None, at line 1, column 1 (snip) When I try to open it, I get the error mentioned above. Any idea? yes : try posting on a Zope/Plone related mailing-list.

Re: Ctypes Install in Linux

2005-09-12 Thread jegenye2001
Most likely you're trying to do this as a non-root user and /usr/local/lib/python2.4/site-packages must be writable only with root privileges. If you cannot go root on that machine then you could just install the package in some directory you can write to and add the directory name to your

Re: How to protect Python source from modification

2005-09-12 Thread bruno modulix
Frank Millman wrote: Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the database via TCP/IP. The

Re: Socket options

2005-09-12 Thread billiejoex
If you are intrested in speed my personal advice is to use UDP insted of TCP. The great majority of network games use it. Here's a simple UDP implementation: http://www.evolt.org/article/Socket_Programming_in_Python/17/60276/ For an online game I'm developing I need some advice concerning

Re: Ctypes Install in Linux

2005-09-12 Thread Ernesto
Thanks for the help. I'm kind of new to Linux, but I am the only user of this machine (just installed Red Hat). How do I make myself a root-user? For the second method you mentioned, how do I add access the PYTHONPATH environment variable? Thanks again! --

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
Peter Hansen wrote: Frank Millman wrote: I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the database via

Re: Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Alessandro Bottoni
Claudio Grondi wrote: After connecting a drive to the system (via USB or IDE) I would like to be able to see within seconds if there were changes in the file system of that drive since last check (250 GB drive with about four million files on it). How to accomplish this? (best if providing

Re: Why do Pythoneers reinvent the wheel?

2005-09-12 Thread Claudio Grondi
Here some of my thougts on this subject: I think that this question adresses only a tiny aspect of a much more general problem the entire human race has in any area. Reinventing the wheel begins when the grandpa starts to teach his grandchild remembering well that he has done it already many

Re: fully-qualified namespaces?

2005-09-12 Thread Lenny G.
Thanks George. But I have to apologize -- I think I used the wrong term in my question. Hippo is actually a package, not a module. So I have: Hippo/ __init__.py Crypto.py Potamus.py And inside Crypto.py, I need to access python-crypto's Crypto.Hash package. Inside Potamus.py, I need to

Re: How to protect Python source from modification

2005-09-12 Thread Frank Millman
bruno modulix wrote: Frank Millman wrote: Hi all I am writing a multi-user accounting/business system. Data is stored in a database (PostgreSQL on Linux, SQL Server on Windows). I have written a Python program to run on the client, which uses wxPython as a gui, and connects to the

Re: Ctypes Install in Linux

2005-09-12 Thread jegenye2001
Uh, I suppose you need a bit of reading up on Linux. ;) http://www.northernjourney.com/opensource/newbies/ http://www.linuxhelp.net/ etc. How do I make myself a root-user? To become root, use the su command. Obviously you'll need the root password which you do know, don't you? how do I add

Re: Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Claudio Grondi
Alessandro Bottoni [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Claudio Grondi wrote: After connecting a drive to the system (via USB or IDE) I would like to be able to see within seconds if there were changes in the file system of that drive since last check (250 GB

Re: How to protect Python source from modification

2005-09-12 Thread Bugs
As a side question Frank, how was your experiences using wxPython for your GUI? Any regrets choosing wxPyton over another toolkit? Was it very buggy? How was it to work with in general? Any other real-world wxPython feedback you have is appreciated. Frank Millman wrote: I am writing a

Re: fully-qualified namespaces?

2005-09-12 Thread Michael Hoffman
Lenny G. wrote: Hippo/ __init__.py Crypto.py Potamus.py And inside Crypto.py, I need to access python-crypto's Crypto.Hash package. Inside Potamus.py, I need to access Hippo.Crypto, e.g., Hippo/ __init__.py Crypto.py# wants to import python-crypto's Crypto.Hash

Re: First release of Shed Skin, a Python-to-C++ compiler.

2005-09-12 Thread Mark Dufour
On 9/12/05, Brian Quinlan [EMAIL PROTECTED] wrote: Mark Dufour wrote: The latter is certainly my goal. I just haven't looked into supporting exceptions yet, because I personally never use them. I feel they should only occur in very bad situations, or they become goto-like constructs that

Re: fully-qualified namespaces?

2005-09-12 Thread Lenny G.
Thanks Michael. That's actually what I already have, e.g., Hippo/ __init__.py HippoCrypto.py Potamus.py Of course, this has the disadvantage of not really taking advantage of the Hippo namespace -- I might as well have: HippoCrypto.py Hippo/ __init__.py Potamus.py or even get rid of

Re: How to handle very large MIME Messages with the email package?

2005-09-12 Thread Larry Bates
I have found that the SmtpWriter class hides all the complexity in creating emails like you want to send. It accepts a list of filenames that will be attachments to the email you generate. Check it out here: http://motion.sourceforge.net/related/send_jpg.py As an aside. Email was not really

ANN: Leo 4.3.2 beta 1

2005-09-12 Thread Edward K. Ream
Leo 4.3.2 beta 1 is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 To learn about Leo, see: http://webpages.charter.net/edreamleo/intro.html The highlights of 4.3.2: --- - Improved Leo's documentation: - A tutorial

Re: fully-qualified namespaces?

2005-09-12 Thread Michael Hoffman
Lenny G. wrote: It sounds like you are saying that there either isn't a way to make the interpreter utilize this type of namespace difference, or that doing so is so convoluted that it is certainly worse than just living with Hippo.HippoCrypto. I can live with these facts (with a little bit

Software bugs aren't inevitable

2005-09-12 Thread Paddy
A work colleague circulated this interesting article about reducing software bugs by orders of magnitude: http://www.spectrum.ieee.org/WEBONLY/publicfeature/sep05/0905ext.html Some methods they talk about include removing error prone and ambiguous expressions from their ADA based language Sparc

Re: OCR librarys

2005-09-12 Thread Larry Bates
You need to specify a platform you will be running on. I've had good experience with ExperVision's RTK toolkit on Windows. It is not free, but it is very, very good. Sometimes software is actually worth paying for ;-). Larry Bates Timothy Smith wrote: i'm looking for ocr librarys with

Re: Grouping lists

2005-09-12 Thread Kay Schluehr
PyPK wrote: If I have a list say lst = [1,1,1,1,3,5,1,1,1,1,7,7,7] I want to group the list so that it returns groups such as [(0,3),4,5,(6,9),(10,12)]. which defines the regions which are similar. Thanks, Hi, I got a solution without iterators and without comparing adjecent elements!

Re: Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Oren Tirosh
After connecting a drive to the system (via USB or IDE) I would like to be able to see within seconds if there were changes in the file system of that drive since last check (250 GB drive with about four million files on it). Whenever a file is modified the last modification time of the

Re: Is it possible to detect if files on a drive were changed without scanning the drive?

2005-09-12 Thread Grant Edwards
On 2005-09-12, Oren Tirosh [EMAIL PROTECTED] wrote: Whenever a file is modified the last modification time of the directory containing it is also set. Nope. $ ls -ld --time-style=full-iso . drwxr-xr-x 2 grante grante 4096 2005-09-12 12:38:04.749815352 -0500 ./ $ touch asdf

Unfortunate newbie questions!

2005-09-12 Thread CPIM Ronin
Hi Folks, I'm brand spanking new to Python, busy reading docs and going through two of the ubiquitous O'Reilly books--Learning Python by Lutz/Ascher and Python Programming on Win32 by Hammond/Robinson. Still I have a just few newbie questions: -In the Windows Python version, how can

defining __repr__

2005-09-12 Thread sven
hi list, i'd like to define __repr__ in a class to return the standardrepr a la __main__.A instance at 0x015B3DA0 plus additional information. how would i have to do that? how to get the standardrepr after i've defined __repr__? sven. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to protect Python source from modification

2005-09-12 Thread Steve M
This is a heck of a can of worms. I've been thinking about these sorts of things for awhile now. I can't write out a broad, well-structured advice at the moment, but here are some things that come to mind. 1. Based on your description, don't trust the client. Therefore, security, whatever that

First release of Shed Skin, a Python-to-C++ compiler.

2005-09-12 Thread Mark Dufour
In general it's considered quite pythonic to catch exceptions :-) It's a particularly useful way of implementing duck typing for example. I'm not sure if I've got *any* code that doesn't use exceptions somewhere Hehe. Okay. It will probably always be the case that you have to lose some Python

Re: wxPython MainLoop exception handling problem

2005-09-12 Thread ncf
Errm, maybe you could use the sys.excepthook function to catch the error and then print the details yourself from the traceback object. import sys def _exceptionhook(type, value, traceback): ''' your code here ''' sys.excepthook = _exceptionhook ((untested)) --

Re: Python Database Scripts

2005-09-12 Thread ncf
Hmm...sorry to go a little off topic here, but I, also, have been striving to learn Python/MySQL for a while using MySQL's official thing. Can you please explain to me why one must use a cursor and can't just do an execute on the connction? :confused about the subject: --

Re: wxPython MainLoop exception handling problem

2005-09-12 Thread Kreedz
Well, it worked :) Thanks a lot! - Kreedz -- http://mail.python.org/mailman/listinfo/python-list

Re: OCR librarys

2005-09-12 Thread Josef Meile
Hi Timothy, first at all, sorry if you receive this message twice, but I sent a message five hours ago and I don't see it on mail.python.org/python-list. Now at least the OP will receive it since I included it in a CC. This thread may give you an start:

Re: Python Database Scripts

2005-09-12 Thread jegenye2001
Well, for a single connection object you could use several cursor objects and juggle with all of them in your program. This can come in handy if it's not about a simple script like I put in here. You can reuse the results from the cursors, etc. without issuing more, potentially resource-hungry,

Re: Unfortunate newbie questions!

2005-09-12 Thread Colin J. Williams
CPIM Ronin wrote: Hi Folks, I'm brand spanking new to Python, busy reading docs and going through two of the ubiquitous O'Reilly books--Learning Python by Lutz/Ascher and Python Programming on Win32 by Hammond/Robinson. Still I have a just few newbie questions: -In the Windows

Re: Unfortunate newbie questions!

2005-09-12 Thread Alessandro Bottoni
- What book or doc would you recommend for a thorough thrashing of object oriented programming (from a Python perspective) for someone who is weak in OO? In other words, how can someone learn to think in an OO sense, rather than the old linear code sense?

  1   2   >