[PythonCE] (no subject)
Fri, 18 Oct 2002 06:24:47 -0700 (PDT)
--- email@example.com wrote:
> I tried your osce.py to use exec* funcs it worked wondefully.
Great. Thank you for the report.
It means that most of HPC2000 distribution components
can be used by PPC without any modification.
> I was just wondering.
> 1) In the help files it states something about replacing the current
> process and that they do not return. I dont realy understand what that
For the os.system, I think it is same as Standard Python, now.
exec* clones act differently.
Compare the os.execv of Python on desktop and PythonCE,
then you will see.
> 2) This may be a stupid question, but I took a look at osce.py and I see
> that for every func youlimport again some modules and then delete them.
> Why dont you just import it at the begining of the module and then delete
> it at the end. (It would seem to me that importing them every time takes
> longer no run.)
No, it's not stupid question.
I took that way because I saw that in other modules.
I think the reason behind that is not to import
these modules into the name space of "os" module.
If I do "import win32process" at the begining of
osce.py, it saves bit of typing, and maybe a little bit of
But when you do
you will see win32process and other modules in the list.
And that may considerd as namespace contamination.
Maybe I can remove "del"...
I don't know if it is needed for 2.2.
Speed-wise, I'm not sure if it makes big difference.
If you write somthing you need speed,
call win32process.CreateProcess directly.
Also, you can remove lots of code in many modules
if you want to create lean CE-only library.
That may save a little more memory and time.
But I'm not sure at all aboout benefit of it,
compared to the labor needed.
(Starting up of PythonCE could be shorter)
Maybe someone who knows better about Python
can tell us correct way to do.
- firstname.lastname@example.org -
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More