I have basic Python functions working within ASP pages, but I am having
problems passing arguments to python scripts when they are called. Here is
what I have so far:
-
<%@ Language = Python%>
<%
import os
import sys
sys.path.append("d:/batch2000")
import c
I have a Python script that stores the results of the processing that it
does in a
database, but it has to have an alternate way of storing its data in a
database-friendly way (XML)in case the database is not available ( connected
down, data store full, etc. ).
Any recommendations on a way to do
Are there any tutorials on the Python CGI module? I think I found enough
fragments to get form data, but I need a way for the Python script to tell
whether it is being run in a web server environment or from the command
line. What I am thinking is testing for an environment variable that only
exist
I am having problems with using the Winzip command line tools and Python.
Here is an example of the several dozen different ways I have tried to
execute the Wzzip.exe utility with arguments using
popen2 -
This works (just runs the utility with not arguments ):
cmd = "\"d:/program files/wi
I am using the Winzip 9.0 Command Line Add-on to archive very large files (
1GB and over ) that are too large to be handled by Zipfile( this bug has
been reported but not resolved ). I tried calling the external program using
os.system(), but something about the output crashes my IDE ( Eclipse ), s
I am not sure if there is a better list to ask this question on, but here it
is:
I have a Python script that works fine for accessing WMI ( Windows
Management Interface ) class properties, but it does not let me access any
of their methods. The code below works fine with Win32_Process objects
unl
I am building a class and using a "main.py" script as the "driver" for
testing. Where I am having problems is that the class is defined in another
file ( say the class is "MyClass" and the file is "MyClass.py" that I am
importing as a module. The problem itself ( not a major one ), is that when
usi
Thanks Kent!
-Original Message-
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 26, 2005 9:52 AM
To: Gooch, John
Cc: tutor@python.org
Subject: Re: [Tutor] Are Empty "Placeholder" Functions possible?
Gooch, John wrote:
> Is there a way to create an e
Is there a way to create an empty function definition with no lines of code
in it? In my coding style I will often do this ( in other languages ) for
RAD just to remind myself that I will need to implement the function later.
Example: For a file handling class, I may need functions such as
copy,d
world applications.
Does anyone have a more elegant solution?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Kent Johnson
Sent: Tuesday, May 03, 2005 11:23 AM
Cc: tutor@python.org
Subject: Re: [Tutor] Subract Month From Date
Gooch, John wrote:
> What woul
What would be the simplest way to extract the Month and Year for one month
prior to the current month? I have been looking for a way to create a Date
object with the current date, and then subtract a month from it. Say it is
currently "January 1st, 2005", I would like to be able to subtract a month
L.L.C.
9601 S. Meridian Blvd.
Englewood, CO 80112
Desk: 720-514-5708
-Original Message-
From: Brian van den Broek [mailto:[EMAIL PROTECTED]
Sent: Friday, April 15, 2005 4:22 PM
To: Gooch, John
Cc: Python tutor
Subject: Re: [Tutor] Contructor Overloading and Function Tooktips
I have a couple of questions:
Is there a way to create multiple __init__ routines in a Python Class?
Secondly, I cannot remember how to make it so that when you start typing in
a defined function name, it pops up a tooltip showing the functions syntax.
ex: def delRecord( some params ):
Ken,
I misspoke when I said these were lists of dictionaries, they are actually
lists of object that have a "getSize()" getter function that returns the
size of their contents, which I would like to use for sorting.
Thank You,
John A. Gooch
Systems Administrator
IT - Tools
EchoStar Satellite L.
Let me know if there is a Tkinter list that is more appropriate for this
question.
I am writing a function whose job is it delete all of the selected items in
a Listbox. The only ways I can think of doing this is to
1) Get list of selected items using the listbox.curselection and then delete
each
Title: Message
I have
a class named 'Dir' that I want to be put into another class 'DirList' (
essential a linked list of Dir objects ) using the 'insert()' method. The syntax
is 'DirList.insert( Dir )' which works, but then I try to access the 'getSize()'
function of the 'Dir' class from *i
I am working on a dictionary sorting problem just like the one in the email
thread at the bottom of this message. My question about their solution is:
In these lines:
lst.sort(lambda m, n: cmp(m.get(field), n.get(field)))
where field is either 'name' or 'size'.
What is "n:" and wha
I have a threaded python ( Python 2.3.4 ) script that runs perfectly on
Windows 2000 Server SP4 when it is executed from IDLE ( i.e. press 'F5' from
the editor ), the threads do their work, halt, and the 'join' command picks
them up. When I run the same script from windows command line ( cmd.exe ),
I have a threaded python ( Python 2.3.4 ) script that runs perfectly on
Windows 2000 Server SP4 when it is executed from IDLE ( i.e. press 'F5' from
the editor ), the threads do their work, halt, and the 'join' command picks
them up. When I run the same script from windows command line ( cmd.exe ),
before it would
search the entire string for a match. This seems a bit unusual from my past
experience, but it solved the issue I was experiencing.
Thank you for your help.
John Gooch
-Original Message-
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 10:41 AM
This is weird. I have a script that checks walks through directories, checks
to see if their name matches a certain format ( regular expression ), and
then prints out what it finds. However, it refuses to ever match on numbers
unless the regexp is ".*". So far I have tried the following regular
exp
21 matches
Mail list logo