compile files

50 views
Skip to first unread message

William Warren

unread,
Jun 29, 2015, 1:20:35 AM6/29/15
to pyscr...@googlegroups.com
    I need to compile a Python file from PyScripter but my computer will only save as a regular script.

BBands

unread,
Jun 29, 2015, 10:26:37 AM6/29/15
to PyScripter Group
py2exe is your friend. py2exe.org

Kiriakos, has direct support of py2exe been considered?

Best to all,

    John

Rudy Trujillo

unread,
Sep 28, 2015, 12:48:42 PM9/28/15
to PyScripter
If your script does any gathering of directories or path be aware I am having a monumental failure that goes unresolved. My script does the following:
Asks for: 
Source Drive
Destination Drive
Destination Folder to create
Filename to save data
Extension we are searching for (i.e. txt)
from here it basically uses walk to look for what I asked, in this case, files with the extension 'txt'

Having wrote the script called KWS.py and tested it using pyscripter I was confident it passed the tests for functionality. It did all it was created to do. Now wanted to share with my friends and family. 
Here is the part that concerns py2exe, it successfully created my executable called, KWS.exe. Unfortunately it crashed and spit out this error:
The amount of time researching this failure is ridiculous compared to the time spent writing the script, and I continue to search the web for why this is happening.
So there is my testing of py2exe. 

Traceback (most recent call last):

File "KWS_add_func_call.py", line 47, in <module>

File "C:\Python34\lib\encodings\cp437.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0]

UnicodeEncodeError: 'charmap' codec can't encode characters in position 18-26: character maps to <undefined>

Lines 17, 18 and 19 from cp437.py

17 class IncrementalEncoder(codecs.IncrementalEncoder):

18 def encode(self, input, final=False):

19 return codecs.charmap_encode(input,self.errors,encoding_map)[0]

Reply all
Reply to author
Forward
0 new messages