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
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
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
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
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:
Thanks everyone!
--
http://mail.python.org/mailman/listinfo/python-list
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
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
That did it. Thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
> 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
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
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
18 matches
Mail list logo