[PythonCE] win32api
Frédéric Mantegazza
frederic.mantegazza at gbiloba.org
Mon Apr 7 23:48:25 CEST 2008
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
More information about the PythonCE
mailing list