win32api
Frédéric Mantegazza <[email protected]> Mon, 7 Apr 2008 22:48:25 +0100
| Newsgroups | gmane.comp.python.windows-ce |
|---|---|
| Organization | Home |
| Message-ID | <[email protected]> |
Does the win32api exist for PythonCE? I'm trying to write code that can
work under linux, win and winCE. linux and win works fine, using this
code:
if sys.platform.startswith("linux") or sys.platform.startswith("Mac"):
HOME_DIR = os.path.expandvars("$HOME")
CONFIG_DIR = os.path.join(HOME_DIR, ".papywizard")
try:
os.mkdir(CONFIG_DIR)
except OSError, (errno, errmsg):
if errno == 17:
pass
else:
raise
TEMP_DIR = "/tmp"
elif sys.platform.startswith("win"):
import win32api
HOME_DIR = win32api.ExpandEnvironmentStrings("%HOMEPATH%")
CONFIG_DIR = os.path.join(HOME_DIR, ".papywizard")
try:
os.mkdir(CONFIG_DIR)
except OSError, (errno, errmsg):
if errno == 183:
pass
else:
raise
TEMP_DIR = CONFIG_DIR
How can I add support for winCE?
Thanks,
--
Frédéric
http://www.gbiloba.org