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 mat

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: how to get the return value of a thread?

2005-09-12 Thread Antoon Pardon
Op 2005-09-09, Leo Jay schreef <[EMAIL PROTECTED]>: > Dear all, > > i would like to get the return value of all threads > > e.g. > def foo(num): > if num>10: > return 1 > elif num>50: > return 2 > else > return 0 > > > after i invoked > t = thread.start_new_thre

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?

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 dep

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 comman

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

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

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... > > > class User: > > def View(self): > # play with data here >

Re: python script under windows

2005-09-12 Thread Marco Aschwanden
> Can you help me ? Or better is there some info for unix person how > to survive with python on windows ;-) Use py2exe to transform your app into a service... -- 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 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

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 logg

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 proble

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 -- http://mail.p

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? -- http://mail.python.org/mailman/listi

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 =

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 handwriting

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 g

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

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 proble

Re: read stdout/stderr without blocking

2005-09-12 Thread Adriaan Renting
I was not aware you were using Windows, you might need to find something similar to select and pty that works in Windows or maybe go though Cygwin, I don't know. I'm on Linux, the only help I can offer is showing you my working code, that's a mix of Pexpect, subProcess and Parseltongue. I'm not

Premature wakeup of time.sleep()

2005-09-12 Thread Erich Schreiber
In the Python Library Reference the explanation of the time.sleep() function reads amongst others: > The actual suspension time may be less than that requested because > any caught signal will terminate the sleep() following execution > of that signal's catching routine. Also, the suspension tim

[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 p

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, b

Re: read stdout/stderr without blocking

2005-09-12 Thread Jacek Popławski
> 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 will happen when output is shorter? -- http://mail.python

Re: Why do Pythoneers reinvent the wheel?

2005-09-12 Thread A.M. Kuchling
On Sat, 10 Sep 2005 12:35:37 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: > I think the manual does need a section on how to find code other than > the library. But where do you put it? The tutorial's final section (http://docs.python.org/tut/node14.html) mentions PyPI. A link to the AS

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 = 'no

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

2005-09-12 Thread Mark Dufour
>First the good news: ShedSkin (SS) more or less works on Windows. After >patching gc6.5 for MinGW, building it, and testing it on WinXP with >some succuess, and after patching my local copy of SS, I can get the >test.py to compile from Python to C++, and it seems that I can get >almost all the uni

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 poin

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 assu

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? > fr

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

Re: read stdout/stderr without blocking

2005-09-12 Thread Adriaan Renting
The line only means it will read a maximum of 1024 characters, most of the output I try to catch is much shorter. I think that if the output is longer as 1024, it will read the rest after another call to select.select, but I think I have not yet come across that case and have not tested it. I s

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

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

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 o

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: http://www.w3.org/1999/xhtml"; xml:lang="en-US" lang="en-US" i18n:domain="plone" metal:use-macro="he

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 the

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? -- http://mail.python.org/mailman/listinfo/pyth

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 pyparsin

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 ab

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 se

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 lik

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 wri

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 -- http://mail.python.org/mailman/listinfo/python-l

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

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 conne

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)

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 C

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 o

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 l

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 = c

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

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! -- http://mail.python.org/mai

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 mailin

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 PYTHON

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

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

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! -- http://mail.python.org/mailman/li

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 databa

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 pro

Re: How to protect Python source from modification

2005-09-12 Thread bruno modulix
Frank Millman wrote: > Peter Hansen wrote: > >>Frank Millman wrote: >> (snip) >>>The only truly secure solution I can think of would involve a radical >>>reorganisation of my program >> >>Please define what "truly secure" means to you. >> > > > Fair question. I am not expecting 'truly' to mean 1

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 times

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 connec

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 a

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 che

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 multi-use

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 Crypt

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

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 d

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=3458&package_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 introduc

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 b

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 rea

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 elemen

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 c

wxPython MainLoop exception handling problem

2005-09-12 Thread Kreedz
Hi, I'm making some intelligent logging module that redirects stdout and stderr of a wxPython GUI. I am logging the exceptions in a wx TreeCtrl. My problem is that when an exception is thrown, there are many calls to stderr that are made which gives this kind of result: Traceback (most recent cal

Re: Creating BibTex files with XdkBibTeX

2005-09-12 Thread Fernando Perez
Rob Cowie wrote: > I'm looking for a module that is able to create valid BibTex documents. > I'm currently using string substitution to create the content, but it > is not validated in any way. > > The only BibTex creation module available in Python (that I can find) > is XdkBibTeX > (http://arti

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 a

  1   2   >