[PythonCE] Trying to Code Python ON a Pocket PC Phone

Bandung bandung at skyesystems.com
Tue Sep 26 20:35:54 CEST 2006

I've come across a nice little plugin for Vim that permits me to run/execute
a python script from within Vim.  It works like a charm on my Windows
desktop as well as Linux desktop.  Its called 
http://www.petersblog.org/node/461 runscript.vim   The script makes use of
function keys F9, F11 and F12.  The lack of these hardware keys on my pda
doesn't bother me since I can substitue other key combinations using the
appropriate entries within my _vimrc file.  What's nice about this plugin is
that it will even launch my python scripts that have gui interfaces. The
trick is to get it working on my pda.

What is also potentially nice about this plugin is that if I can get it
working, I can use Vim as a sort of windows mobile 5.0 console.  Then I can
edit files within Vim and by typing :!start python %s .... as an example,
get that script to run on my pda.  Being ever suspicious of mobile windoze,
before transferring this script to my pda, I wanted to see if I could launch
programs from within Vim using the :!start command.

Much to my surprise, I can launch embedded mobile apps such as Word (aka
pword).  I just type :!start pword and by gosh, up pops pocket word.  I
haven't been able to get python.exe to launch since it is located inside my
Storage Card and the :!start command just doesn't see that directory.   I
wish there was a "path" equivalent for Windows mobile so that I could put
\Storage Card\Program Files\Python24 in the path statement and just type
:!start python.exe

Anyways, I will keep plugging away at this.  I found another script that
will permit me to put breakpoints within the python code being edited within
Vim so that I can debug it.  The plugin calls python's built in debugger and
executes the script being edited by Vim within this debugger.  I don't know
yet whether or not this debugger is part of the pythonce build.  

Bandung wrote:
> The only way that I know how to "edit" a *.py file rather than execute it
> is to change the registry entry that *.py points to in your registry. 
> Normally .py calls the "pyfile"  entry and it is within pyfile where  one
> types the command to launch python24.exe.   I simply point *.py to my Vim
> Open Start command which is within the registry entry "vimfile" and Vim
> launches instead.  If you use "idle" as your editor, I suppose you could
> get it to do the same thing.  If you are not familiar with modifying your
> registry to do this, don't worry.  There are utilities that can do this
> for you.
> Now by doing this, you realize that you can no longer execute *.py files
> when you double click on them  if you have a windows mobile 5.0 device. 
> Since there is no console for Windows mobile 5.0, there is no way to
> launch a *.py without double clicking on it.  If you have a windows mobile
> 2003, then you can download a console programme that will permit you to
> launch your *.py files  from a dos like command line.  
> So why do this personally?  Well its only when I am doing a lot of
> editiing and I get weary of launching Vim and then opening up the
> appropriate *.py file.  Without this trick, its a lot of keystrokes to
> open up a *.py file via Vim because Vim always starts its file open search
> in the default directory within main storage and all of my files are
> buried deep down a directory tree on my Storage Card.
> I can shell out of Vim on my desktop to run programmes that I am editing
> within Vim without exiting Vim.  I haven't tried that on my pda because
> windows mobile 5.0 doesn't have a console so I naturally assume that I'm
> screwed.  Because in most cases, I am screwed on Windows Mobile 5.0  I
> can't get things like OpenSSH working because this version of mobile
> windoze lacks this console.  Plus there are many other terrible side
> effects to this missing console feature such as not having any raw_inout"
> capabilities from my python24ce interpreter.
> Sigh ....
> David P. Gil wrote:
>> I copied some files for a basic Python project im working onto my PDA
>> Phone
>> to work on and install PythonCE on it. In a previous reply, someone told
>> me
>> to just double tap my python files and it should allow me to edit them.
>> Apparently when I do this, the script is run instead. I don't want to use
>> interactive mode I want the script mode so I can write and edit bigger
>> python programs. Does anyone know how I can do this?
>> Sorry if this seems like too basic of a question. Have sympathy, I am an
>> artist working in the game industry taking interest in the wacky work of
>> programming. Thanks in advance for any help you can provide.
>> _______________________________________________
>> PythonCE mailing list
>> PythonCE at python.org
>> http://mail.python.org/mailman/listinfo/pythonce

View this message in context: http://www.nabble.com/Trying-to-Code-Python-ON-a-Pocket-PC-Phone-tf2293883.html#a6512966
Sent from the Python - pythonce mailing list archive at Nabble.com.

More information about the PythonCE mailing list