Class methods

2005-10-05 Thread Hughes, Chad O
Title: Class methods Is there any way to create a class method? I can create a class variable like this: class Foo: classVariable = None def __init__(self, classVariable): Foo.classVariable = classVariable A = Foo('a') B = Foo('b') Print 'The class variable for A is %s and the

Can't start new thread

2005-08-11 Thread Hughes, Chad O
Title: Can't start new thread I am trying to understand what is causing python to raise this error when I create a number of threads: thread.error: can't start new thread I have been told that it is due to the default thread size (1 MB), but I have recompiled python defining an alternate

RE: Database recommendations for Windows app

2005-06-22 Thread Hughes, Chad O
Firebird is cross platform (you would need the classic server version) look at the following post: http://mail.python.org/pipermail/python-list/2005-June/286366.html Chad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Will McGugan Sent: Wednesday, June

RE: Python choice of database

2005-06-20 Thread Hughes, Chad O
One db that is very much worth trying is Firebird. This is an open source Interbase 6.0 (Borland product) compatible db. It is a SourceForge project. There are three versions: the super server which is a client/server db, classic server (the one that I am very familiar with) which is also a

RE: Overcoming herpetophobia (or what's up w/ Python scopes)?

2005-06-17 Thread Hughes, Chad O
I am very familiar with Python, but I don't know Pearl. In order to answer your question, you will have to tell me about your statement, I couldn't live without closures and without the fine control over scopes that Pearl provides. I don't know what these things are to Pearl. If you tell me what

RE: Overcoming herpetophobia (or what's up w/ Python scopes)?

2005-06-17 Thread Hughes, Chad O
10:02 AM To: python-list@python.org Subject: RE: Overcoming herpetophobia (or what's up w/ Python scopes)? On Fri, 17 Jun 2005 09:36:55 -0700, Hughes, Chad O wrote: I am very familiar with Python, but I don't know Pearl. The language is *always* spelt without the a, and usually all in lower

RE: Overcoming herpetophobia (or what's up w/ Python scopes)?

2005-06-17 Thread Hughes, Chad O
2005 10:22:05 -0700, Hughes, Chad O wrote: Are you sure about the lower-case thing. The original post states Perlhead and there are many instances at www.Perl.com where O'REILLY spells perl as Perl. I did say usually :-) But in fact it seems that the creator of Perl/perl, Larry Wall, now

RE: how to operate the excel by python?

2005-06-17 Thread Hughes, Chad O
Title: Message Ihave posed a more complete answer to your question, however, it is quite a large and It is awaiting approval. For now, xlRight = -4152. You can find this out by opening up Excel and typing the ALT-F11 combination. From there use the ObjectBrowser. For example if you type in

RE: Finding Word and switch focus to it

2005-06-15 Thread Hughes, Chad O
The first part is easy. I will have to think about the second part. To find an opened copy of Word and switch focus to it do the following: from win32com.client import Dispatch word = Dispatch('Word.Application') wdWindowStateNormal = 0 if len(word.Documents): word.Activate() if

RE: Finding Word and switch focus to it

2005-06-15 Thread Hughes, Chad O
Consider reading this post. It highlights how to do what you want: http://mail.python.org/pipermail/python-win32/2002-April/000322.html Chad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Henry Sent: Wednesday, June 15, 2005 3:21 PM To:

RE: Opening a drive folder from Python

2005-06-14 Thread Hughes, Chad O
I think you are talking about the following: from win32com.client import Dispatch path = raw_input('Type in a path: ') s=Dispatch('WScript.Shell') s.Run('Explorer %s'%path) Chad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Henry Sent:

RE: [python-win32] NTService detecting if the Windows System is Idle

2005-06-13 Thread Hughes, Chad O
-Original Message- From: Hughes, Chad O Sent: Monday, June 13, 2005 9:09 AM To: 'Fred Dixon' Subject: RE: [python-win32] NTService detecting if the Windows System is Idle There may be important processes running in the background (headless process with no user interaction) that need

RE: how to operate the excel by python?

2005-06-10 Thread Hughes, Chad O
Here are two scripts that I have had to build for a class that I teach. You will either need to write the constants explicitly, or I can email neet the constans module that I have built, for the second one to work. I will copy it to the very end. If you have any questions, just let me know.

RE: how to operate the excel by python?

2005-06-10 Thread Hughes, Chad O
Sorry, I meant to spell check but I did not somehow. Chad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hughes, Chad O Sent: Friday, June 10, 2005 10:01 AM To: python-list@python.org Subject: RE: how to operate the excel by python? Here are two

RE: SMTP Test Rig

2005-06-10 Thread Hughes, Chad O
example I have seen yet. Chad -Original Message- From: Tim Williams [mailto:[EMAIL PROTECTED] Sent: Friday, June 10, 2005 5:35 AM To: Hughes, Chad O; Jesse Noller Subject: SMTP Test Rig Chad, Jesse. The SMTP test rig receives SMTP emails and can be configured to write them to the screen

Posting a reply to a post in an existing thread

2005-06-09 Thread Hughes, Chad O
Title: Posting a reply to a post in an existing thread This may be a dumb question. I am new to using this list, and I cannot figure out how to send a reply to a message that has been posed in a thread without creating a new thread. Let me rephrase my question. The instructions for posting

smtpd module

2005-06-09 Thread Hughes, Chad O
Title: smtpd module Does anyone know of any documentation on how to use the smtpd module, either the SMTPServer or the DebuggingServer? I cannot find any usage cases or examples anywhere. I can find examples of using the smtplib module but not the smtpd module. Thanks, Chad --

RE: smtpd module

2005-06-09 Thread Hughes, Chad O
, Chad -Original Message- From: Ivan Shevanski [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 2:03 PM To: python-list@python.org Cc: Hughes, Chad O Subject: RE: smtpd module So youre wondering how to send mail in python? I have a lot of examples if you want the smtp module. I don't

RE: EnumKey vs EnumValue

2005-06-06 Thread Hughes, Chad O
EnumKey enumerates subkeys which are equivalent to the folders in regedit. EnumValue enumerates values only. The reason your script is not printing anything must be due to the fact that you are passing in a registry path that contains only subkeys and no values. As I mentioned before, the

Thread Stack Size

2005-06-01 Thread Hughes, Chad O
Title: Thread Stack Size I am using the threading module to create a great deal of threads. Is there any way to set the thread stack size? It looks like each thread is being given a default stack size of 1MB. I have looked all over and I cannot find a way to shrink the stack to a few KB.