[Pythonmac-SIG] import problems
Zhi Peng
zhiyong_peng2003 at yahoo.com
Sat Dec 10 00:55:38 CET 2005
Thanks all
I have to add
#!pythonw
# -*- coding: Latin-1 -*-
at beginging of the file macerrors to get rid of warning message
What was the difference when I try to install module say I have module.py on Macintosh?
from distutils.core import setup
setup(name="MyModule", version="1.0" py_modules=["module.py"])
Is above enough to set up the module? Where are "module.py" should be in current dir?
Thanks
Bob Ippolito <bob at redivi.com> wrote:
On Dec 9, 2005, at 3:19 PM, Zhi Peng wrote:
> /System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> python2.3/plat-mac/macerrors.py
> on line 326, but no encoding declared; see
> http://www.python.org/peps/pep-0263.html for details
> import macerrors
>
> But if I erased "from appscript import *" then it will
> be fine. I think there is problem in appscript
No, it's a (harmless) bug in Python 2.3
Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import macerrors
__main__:1: DeprecationWarning: Non-ASCII character '\x80' in file /
System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
plat-mac/macerrors.py on line 326, but no encoding declared; see
http://www.python.org/peps/pep-0263.html for details
Just ignore it, edit the file and remove the offending character
(it's in the comment), or use Python 2.4 instead.
-bob
---------------------------------
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20051209/6eadc7be/attachment.html
More information about the Pythonmac-SIG
mailing list