osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: Windows Mobile 5.0 Now Has a Console! -
msg#00003

List: python.windows-ce

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index


What a difference a "\" makes.

When calling python, it needs to have the exact path given, the relative
path doesn't work. So if I enter the following..

\> python \sample.py

Then it works! What this means is I can now write bat files which call
various pythom modules. I can also execute python modules from the cmd
console by typing

\> python \path\sample\module.py

What I want to get working next is the ability to execute my python
scripts/modules from within pocket Vim. I can already edit python modules
from within pocket Vim, complete with all of the syntax hiliting, that
includes colours and correct indentations. I can assign a key stroke combo
to launch macros and now that I can get python to run from the cmd concole
and pass it a module, I have the makings of a pretty decent development
environment.

I just wish that the -i parameter would work. Then we could type the
following..

\> python \path\sample\module.py -i

and put python into the interactive mode while loading the module. If
anyone knows how to get pythonce to accept parameters such as -i, etc, this
would be the bomb.

Bandung


Bandung wrote:
>
> It is strange that I can use the Cmd console to launch other programs such
> as Vim.exe and hand these apps a file to open when they startup. For
> example, the following works when I type "vim sample.txt" at the command
> prompt...
>
> Pocket CDM v 4.20
> \> vim sample.txt
>
> This starts up Vim with the file sample.txt loaded.
>
> I can just as easily launch pocket word in the same manner.
>
> \> pword sample.doc
>
> Yet when I try to launch python with a py module, it borks.
>
> \> python sample.py
>
> Traceback (innermost last):
> <NULL>: <NULL>
>
> If I just type python, then it launches ok.
>
> \> python
>
> Python 2.5 (release25-maint, Oct 11 2006 ......
>>>>
>
> There are a number of os functions not implemented within pythonce such as
> os.system or os.exec or os.spawn but I fail to see why this should stop
> the cmd console's shell from starting python and handing it a module as an
> argument.
>
> Any thoughts?
>
>
>
>
> Bandung wrote:
>>
>> It is now possible to load and run Microsoft's console as well as
>> Simbolic's PocketConsole. Here are the steps.
>>
>> 1. Get the Pocket Console and install it
>> http://www.symbolictools.de/public/pocketconsole/index.htm Pocket
>> Console
>>
>> 2. Get the Pocket CMD file and install it
>>
>> http://www.symbolictools.de/public/pocketconsole/applications/cmd/index.htm
>> Pocket Cmd
>>
>> 3. You can also install Microsoft's cmd program in parallel with the Open
>> Source one. There is a pocket cmd console buried within PowerToys 2003.
>> I tried to install it but it didn't work properly. If you can extract
>> the following three files from the CAB then you can get it working. All
>> you need is the cmd.exe and shell.exe files placed anywhere in one
>> directory. Then use the console.dll that symbolic installs within the
>> Windows directory rather than the Microsoft console.dll and you will be
>> able to run Microsoft's cmd dos utility.
>> I have a stand alone install for Microsoft's Cmd utility version 4.2 as
>> well as the older one called 3.0 These work quite well. I just don't
>> know where to find them on the web anymore. If you would like to try the
>> stand alone installer, I will post them on a free downloading file site.
>>
>> 4. The most important step! Change the following registry entry.
>>
>> HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo
>>
>> set this value to 0
>>
>> What is beautiful about this set of programs is that I can now launch
>> other apps from a dos console. I am able to launch the pocket ssh port
>> created by Rainer (it supports tunneling) and other apps that have
>> command line arguments and switches. Example. ssh mysite.com -l bandung
>> -L 25:127.0.0.1:25
>>
>> So to the point. I want to be able to launch python with the command
>> line prompts/arguments. Things such as python.exe my_module.py -i and
>> the like. But these features seemed to have been removed from the python
>> ce port. If they are put back, then we should be able to test our
>> modules by running them within an interactive python session.
>>
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/Windows-Mobile-5.0-Now-Has-a-Console%21-tf2780274.html#a7777157
Sent from the Python - pythonce mailing list archive at Nabble.com.


Thread at a glance:

Previous Message by Date:

Re: Windows Mobile 5.0 Now Has a Console!

It is strange that I can use the Cmd console to launch other programs such as Vim.exe and hand these apps a file to open when they startup. For example, the following works when I type "vim sample.txt" at the command prompt... Pocket CDM v 4.20 \> vim sample.txt This starts up Vim with the file sample.txt loaded. I can just as easily launch pocket word in the same manner. \> pword sample.doc Yet when I try to launch python with a py module, it borks. \> python sample.py Traceback (innermost last): <NULL>: <NULL> If I just type python, then it launches ok. \> python Python 2.5 (release25-maint, Oct 11 2006 ...... >>> There are a number of os functions not implemented within pythonce such as os.system or os.exec or os.spawn but I fail to see why this should stop the cmd console's shell from starting python and handing it a module as an argument. Any thoughts? Bandung wrote: > > It is now possible to load and run Microsoft's console as well as > Simbolic's PocketConsole. Here are the steps. > > 1. Get the Pocket Console and install it > http://www.symbolictools.de/public/pocketconsole/index.htm Pocket Console > > 2. Get the Pocket CMD file and install it > > http://www.symbolictools.de/public/pocketconsole/applications/cmd/index.htm > Pocket Cmd > > 3. You can also install Microsoft's cmd program in parallel with the Open > Source one. There is a pocket cmd console buried within PowerToys 2003. > I tried to install it but it didn't work properly. If you can extract the > following three files from the CAB then you can get it working. All you > need is the cmd.exe and shell.exe files placed anywhere in one directory. > Then use the console.dll that symbolic installs within the Windows > directory rather than the Microsoft console.dll and you will be able to > run Microsoft's cmd dos utility. > I have a stand alone install for Microsoft's Cmd utility version 4.2 as > well as the older one called 3.0 These work quite well. I just don't > know where to find them on the web anymore. If you would like to try the > stand alone installer, I will post them on a free downloading file site. > > 4. The most important step! Change the following registry entry. > > HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo > > set this value to 0 > > What is beautiful about this set of programs is that I can now launch > other apps from a dos console. I am able to launch the pocket ssh port > created by Rainer (it supports tunneling) and other apps that have command > line arguments and switches. Example. ssh mysite.com -l bandung -L > 25:127.0.0.1:25 > > So to the point. I want to be able to launch python with the command line > prompts/arguments. Things such as python.exe my_module.py -i and the > like. But these features seemed to have been removed from the python ce > port. If they are put back, then we should be able to test our modules > by running them within an interactive python session. > > > -- View this message in context: http://www.nabble.com/Windows-Mobile-5.0-Now-Has-a-Console%21-tf2780274.html#a7775868 Sent from the Python - pythonce mailing list archive at Nabble.com.

Next Message by Date:

Re: Python CE on Windows Mobile 5

Their console does indeed work on Windows Mobile 5.0 And so does the Microsoft console ver 4.2 All you have to do after installing either or both apps is to change one registry entry. HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo set this value to 0 With this change, I am able to call python from the cmd console and feed it a module like this.. \> python \path\sample\pymodule.py Make sure to set the Path environment variable in order for the shell to find python without a long path statement. I wished that we could use the options such as python -c or python -i That would really help with debugging. jeffbarish wrote: > > I've been using Python on Windows Mobile 5 for a couple months. I have > encountered only two problems, neither directly related to Python. (1) I > haven't been able to find a console that works on Mobile 5. PocketConsole > (http://www.symbolictools.de/public/pocketconsole/) works only on Mobile > 2002. (2) wxPython produces a bogus warning about comctrl32.dll if you > use a list control in virtual mode. Other than that, everything I have > done with Python has worked. I was particularly pleased to see that Pyro > works on PythonCE. > -- View this message in context: http://www.nabble.com/Building-win32com-on-windows-CE-tf1319151.html#a7779252 Sent from the Python - pythonce mailing list archive at Nabble.com.

Previous Message by Thread:

Re: Windows Mobile 5.0 Now Has a Console!

It is strange that I can use the Cmd console to launch other programs such as Vim.exe and hand these apps a file to open when they startup. For example, the following works when I type "vim sample.txt" at the command prompt... Pocket CDM v 4.20 \> vim sample.txt This starts up Vim with the file sample.txt loaded. I can just as easily launch pocket word in the same manner. \> pword sample.doc Yet when I try to launch python with a py module, it borks. \> python sample.py Traceback (innermost last): <NULL>: <NULL> If I just type python, then it launches ok. \> python Python 2.5 (release25-maint, Oct 11 2006 ...... >>> There are a number of os functions not implemented within pythonce such as os.system or os.exec or os.spawn but I fail to see why this should stop the cmd console's shell from starting python and handing it a module as an argument. Any thoughts? Bandung wrote: > > It is now possible to load and run Microsoft's console as well as > Simbolic's PocketConsole. Here are the steps. > > 1. Get the Pocket Console and install it > http://www.symbolictools.de/public/pocketconsole/index.htm Pocket Console > > 2. Get the Pocket CMD file and install it > > http://www.symbolictools.de/public/pocketconsole/applications/cmd/index.htm > Pocket Cmd > > 3. You can also install Microsoft's cmd program in parallel with the Open > Source one. There is a pocket cmd console buried within PowerToys 2003. > I tried to install it but it didn't work properly. If you can extract the > following three files from the CAB then you can get it working. All you > need is the cmd.exe and shell.exe files placed anywhere in one directory. > Then use the console.dll that symbolic installs within the Windows > directory rather than the Microsoft console.dll and you will be able to > run Microsoft's cmd dos utility. > I have a stand alone install for Microsoft's Cmd utility version 4.2 as > well as the older one called 3.0 These work quite well. I just don't > know where to find them on the web anymore. If you would like to try the > stand alone installer, I will post them on a free downloading file site. > > 4. The most important step! Change the following registry entry. > > HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo > > set this value to 0 > > What is beautiful about this set of programs is that I can now launch > other apps from a dos console. I am able to launch the pocket ssh port > created by Rainer (it supports tunneling) and other apps that have command > line arguments and switches. Example. ssh mysite.com -l bandung -L > 25:127.0.0.1:25 > > So to the point. I want to be able to launch python with the command line > prompts/arguments. Things such as python.exe my_module.py -i and the > like. But these features seemed to have been removed from the python ce > port. If they are put back, then we should be able to test our modules > by running them within an interactive python session. > > > -- View this message in context: http://www.nabble.com/Windows-Mobile-5.0-Now-Has-a-Console%21-tf2780274.html#a7775868 Sent from the Python - pythonce mailing list archive at Nabble.com.

Next Message by Thread:

Re: Python CE on Windows Mobile 5

Their console does indeed work on Windows Mobile 5.0 And so does the Microsoft console ver 4.2 All you have to do after installing either or both apps is to change one registry entry. HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo set this value to 0 With this change, I am able to call python from the cmd console and feed it a module like this.. \> python \path\sample\pymodule.py Make sure to set the Path environment variable in order for the shell to find python without a long path statement. I wished that we could use the options such as python -c or python -i That would really help with debugging. jeffbarish wrote: > > I've been using Python on Windows Mobile 5 for a couple months. I have > encountered only two problems, neither directly related to Python. (1) I > haven't been able to find a console that works on Mobile 5. PocketConsole > (http://www.symbolictools.de/public/pocketconsole/) works only on Mobile > 2002. (2) wxPython produces a bogus warning about comctrl32.dll if you > use a list control in virtual mode. Other than that, everything I have > done with Python has worked. I was particularly pleased to see that Pyro > works on PythonCE. > -- View this message in context: http://www.nabble.com/Building-win32com-on-windows-CE-tf1319151.html#a7779252 Sent from the Python - pythonce mailing list archive at Nabble.com.
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!