[PythonCE] Re: PythonCE digest, Vol 1 #73 - 7 msgs

Telion telionce@yahoo.com
Thu, 19 Sep 2002 09:49:36 -0700 (PDT)


--- Mike Mellor <mmellor1@yahoo.com> wrote:
> I'm using the latest release for MIPS (2.2+) (the
> April 02 release).  

Ok, then you have to update your files.
I think you have to replace at least pythonCE22.exe,
pcceshell.py, and win32gui.pyd.
Maybe a few other files but I don't remember.

> 
> First question - what do I need to do to get .py
> files to use the 
> PythonCE icon in the file manager programs?  I have
> an entry in the 
> registry under PyFile (which is linked to .py and
> .pyc files) that has 
> an entry for DefaultIcon.  I have been able to get
> it to use icons from 
> other programs (the wish/tk icon) but not Python. 
> The entry I have for 
> default icon is "Python.exe, 0".  

After updating PythonCE22.exe, you will see the icon.
But you may see the quater of big icon, 
instead of whole small icon.
I may fix this sometime lator.

Meanwhile, you may recopy old python.exe
(let's say, from 1.52) and specify to use 
the icon in that one.

If you want to change icon, there is a
great software called resourcehacker.
And this will let you change Icons and 
resources as you wish.
(Try on a copied file to be safe.) 

> 
> Second question - I cannot run .py files from any
> folder that has a 
> space in the title, such as My Documents, Storage
> Card or Program Files. 
>  The error is that python is unable to find file
> (for example) /Program 
> ....  Is there a work around?
> 
> Thanks.
> 
> Mike

Well, if you are trying something like;
>>> import /program files/youscript
>>> import /program files/youscript.py
>>> import "/program files/youscript.py"
>>> import "/program files/youscript"
It dosn't work.

You may do this;
>>> execfile("/program files/yourscript.py")

or, you can set sys.path to desired directory;
>>> import sys
>>> sys.path.append('/program files')
>>> import yourscript

I checked with my machine, and it worked with
'/program files/'. 

What is your machine by the way?
NEC? Sharp? Intermec?



=====
Telion
- telionce@yahoo.com -

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com