PythonCard and Py2Exe

2005-02-15 Thread PipedreamerGrey
I've been banging my head against this problem for a week. It's time to ask for help, because I'm obviously not going to solve this by trial and error. I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the pr

Re: PythonCard and Py2Exe

2005-02-15 Thread PipedreamerGrey
For this setup file, the executable packs, but when I attempt to run the program, the screen flashes, " cannot import name radiogroup ". I've attempted adding "import radiogroup", "from Pythoncard import radiogroup" and "from Pythoncard.compnents import radiogroup" to the setup file, and that doe

Re: PythonCard and Py2Exe

2005-02-16 Thread pipedreamergrey
> You should move these 'import ...' statements to your *script* so that > py2exe doesn find them, not to the setup script. > > Thomas Removing import statements only returns this error message before the package compiles: = "custdb", 'setup' is not defined No files are returned. -- http://ma

Re: PythonCard and Py2Exe

2005-02-16 Thread pipedreamergrey
The Error: (Most recent call last): C:\Documents and Settings\Gateway User\ Desktop\custdb\setup.py", line 1, name = "custdb", 'setup' is not defined There may be a single word infront of 'setup' on the fourth line, it scramble on my screen because I have to use a screen capture to read th

Re: PythonCard and Py2Exe

2005-02-18 Thread PipedreamerGrey
I am using the command prompt. What I realized after reading your entry, Peter, is that if I use "setup.py py2exe" instead of "start setup.py py2exe" I can see the error in the same window without it closing. I went into the script and double spaced everything in case Notebook smashed the lines

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( nam

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( nam

PythonCard and Py2Exe

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( name

Py2Exe Import Error

2005-02-22 Thread PipedreamerGrey
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is the exact code I'm using in the setup file: from distutils.core import setup import py2exe setup( name

Re: PythonCard and Py2Exe

2005-02-26 Thread PipedreamerGrey
That did it. Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Changing a value for each folder while traversing a file system

2006-07-26 Thread PipedreamerGrey
I'm using the script below (originally from http://effbot.org, given to me here) to open all of the text files in a directory and its subdirectories and combine them into one Rich text file (index.rtf). Now I'm adapting the script to convert all the text files into individual html files. What I c

Re: Changing a value for each folder while traversing a file system

2006-07-27 Thread PipedreamerGrey
No, that doesn't work. Though, leaving the random snippet about the "for file in DirectoryWalker("."):" line, it does leave all files the same value, rather than switching the value for every single file. The problem is, the value is shared accross every folder. -- http://mail.python.org/mailma

Re: Changing a value for each folder while traversing a file system

2006-07-27 Thread PipedreamerGrey
That seems logical, but the syntax doesn't work. I keep getting the error: 'module object' has no attribute 'dirname' -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing a value for each folder while traversing a file system

2006-07-28 Thread PipedreamerGrey
Perfect. That's exactly what I wanted. Thanks. For those reading this later on, the following script will crawl through a directory, select all the text files, dump them into seperate numbered html files in the parent directory (in which the python script is executed). In this example, the firs

Expanding Search to Subfolders

2006-06-05 Thread PipedreamerGrey
This is the beginning of a script that I wrote to open all the text files in a single directory, then process the data in the text files line by line into a single index file. os.chdir("C:\\Python23\\programs\\filetree") mydir = glob.glob("*.txt") index = open("index.rtf", 'w') for File in mydir

Re: Expanding Search to Subfolders

2006-06-06 Thread PipedreamerGrey
Thanks, that was a big help. It worked fine once I removed > os.chdir("C:\\Python23\\programs\\Magazine\\SamplesE") and changed "for file, st in DirectoryWalker("."):" to "for file in DirectoryWalker("."):" (removing the "st") -- http://mail.python.org/mailman/listinfo/python-list

Re: Expanding Search to Subfolders

2006-06-06 Thread PipedreamerGrey
Thanks everyone! -- http://mail.python.org/mailman/listinfo/python-list

Re: Expanding Search to Subfolders

2006-06-06 Thread PipedreamerGrey
Here's the final working script. It opens all of the text files in a directory and its subdirectories and combines them into one Rich text file (index.rtf): #! /usr/bin/python import glob import fileinput import os import string import sys index = open("index.rtf", 'w') class DirectoryWalker: