473,499 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem compiling executable with py2exe

tim
I wrote this very simple program that checks a directory and makes a
list of files that surpass a given size.
I tried to compile it using py2exe.
I used py2exe before with more complex programs without any problem.
Now, although my program works fine when I run it from PythonWin, it
won't compile to an executable.

here's the program:

#############
import os

blacklist=[]
d=raw_input('path')
s=int(raw_input('maxsize (in bytes):'))
f = os.listdir(d)
outfile = open(d + r'\filelist_for_this_location.txt', 'wb')
outfile.write('files found in ' + d + '\n'+ 'checking maximum filesize:
' + str(s) + ' bytes...\n')
for n in f:
filepath = os.path.join(d,n)
if os.path.isfile(filepath):
outfile.write(n + '\n')
currsize = int(os.path.getsize(filepath))
if currsize >= s:
outfile.write('------------> is too big\n')
blacklist.append(filepath)
outfile.write('\n'+'\n'+ 'blacklist\n')
for bl in blacklist:
outfile.write(bl + '\n')
outfile.close()
##############

here's the py2exe error log:

Traceback (most recent call last):
File "filesizechecker.py", line 4, in ?
EOFError: EOF when reading a line

any idea?

Tim

Nov 25 '05 #1
0 1193

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2968
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
3
2397
by: vincent wehren | last post by:
Hi, as a small capabilities demo I coded the piece below to show how to use Python for cgi'ing on localhost and it more or less does the trick :-). However, I when I freeze it with py2exe,...
6
4036
by: bap | last post by:
When I try to run a program on a clean machine using the VPython extensions after compiling with PY2EXE I get the following error message: "The procedure entry point IsWow64Process could not be...
3
5172
by: David Fraser | last post by:
Hi We are trying to debug a problem with services created using py2exe. It seems that these problems have arisen after services were installed and removed a few times. OK, first the actual...
2
2097
by: codecraig | last post by:
Hi, I tried to take the Monkey Shell script (http://www.sharp-ideas.net/archives/2005/03/monkey_shell_us.html) and make it into an executable. I am making an executable for the server piece...
1
352
by: David | last post by:
I am unable to use py2exe to create an executable, even on the simple sample that comes with the package. There seems to be a problem when it is copying files. The ‘build’ and ‘dist’ directories...
0
1735
by: erkidevries | last post by:
Problem compiling Tkinter program with bmp images (using py2exe) I have a Tkinter gui program that uses bmp as backgrounds. The program itself works when I run from the source. I placed the...
4
3977
by: bwaha | last post by:
First time trying to create an executable with py2exe. I have a small program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'), matplotlib ('0.83.2'), win32com (latest?), Numeric...
10
3924
by: Vincent Delporte | last post by:
Hi I browsed the archives, but since some messages date back a bit, I wanted to make sure that - py2exe is still the best tool in town to compile Python scripts to run on a Windows host that...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.