From infopazo at hdsnet.hu Sat Dec 2 12:41:18 2006 From: infopazo at hdsnet.hu (infopazo at hdsnet.hu) Date: Sat, 02 Dec 2006 12:41:18 +0100 Subject: [PythonCE] gps serial read error Message-ID: <4571665E.5010907@hdsnet.hu> I receive the folowing error while I read gps information from my MyPal 636N: ('SerialException', '', [' File "\\SD card\\work\\python\\serial-teszt.py", line 32, in \n rv=s.read(50)\n', ' File "\\SD Card\\Program Files\\Python25\\ceserial.py", line 205, in read\n return self.__buffered_read(size)\n', ' File "\\SD Card\\Program Files\\Python25\\ceserial.py", line 248, in __buffered_read\n raise SerialException, windll.coredll.GetLastError()\n']) Source code: # -*- coding:iso8859-2 -*- import sys import ctypes import winbase import ceserial import exch latin2_decoder = lambda s: str(s) #unicode(s, "iso8859-2", "replace") def gprmc_test(row_ary): return (row_ary[0] == "$GPRMC") and (row_ary[1]!="") and (row_ary[3]!="") and (row_ary[5]!="") def get_pos(row_ary): return {'rtime':float(row_ary[1]),'lon':float(row_ary[3]),'lat':float(row_ary[5])} def rec_pos(data): cur.execute("insert into coords_rec (rectime,long,lat) values (%f,%f,%f)"%(data['rtime'],data['lon'],data['lat'])) from sqlite3 import dbapi2 as sqlite con=sqlite.connect("\\SD Card\\work\\cdata.db",isolation_level=None) con.text_factory=latin2_decoder cur=con.cursor() s=ceserial.Serial(port="COM5:",baudrate=4800) s.open() of=open('\\SD Card\\work\\python\\tmp.txt',"w") rv=s.read(50) cnt=0 c2=0 while (len(rv)>0) and (cnt<10000) and (c2<5): try: of.write(rv) gps_ary=rv.split(',') if (gprmc_test(gps_ary)): rec_pos(get_pos(gps_ary)) print "(%f,%f,%f)"%(rtime,lon,lat) #break cnt+=1 rv=s.read(50) except Exception, e: c2=c2+1 print "%d. exception: "%c2 print exch.formatExceptionInfo() con.close() of.close() s.close() From bandung at skyesystems.com Fri Dec 8 13:14:34 2006 From: bandung at skyesystems.com (Bandung) Date: Fri, 8 Dec 2006 04:14:34 -0800 (PST) Subject: [PythonCE] Windows Mobile 5.0 Now Has a Console! Message-ID: <7756714.post@talk.nabble.com> 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#a7756714 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Sat Dec 9 21:10:23 2006 From: bandung at skyesystems.com (Bandung) Date: Sat, 9 Dec 2006 12:10:23 -0800 (PST) Subject: [PythonCE] Windows Mobile 5.0 Now Has a Console! In-Reply-To: <7756714.post@talk.nabble.com> References: <7756714.post@talk.nabble.com> Message-ID: <7775868.post@talk.nabble.com> 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): : 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. From bandung at skyesystems.com Sat Dec 9 23:27:37 2006 From: bandung at skyesystems.com (Bandung) Date: Sat, 9 Dec 2006 14:27:37 -0800 (PST) Subject: [PythonCE] Windows Mobile 5.0 Now Has a Console! In-Reply-To: <7775868.post@talk.nabble.com> References: <7756714.post@talk.nabble.com> <7775868.post@talk.nabble.com> Message-ID: <7777157.post@talk.nabble.com> 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): > : > > 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. From bandung at skyesystems.com Sun Dec 10 05:21:24 2006 From: bandung at skyesystems.com (Bandung) Date: Sat, 9 Dec 2006 20:21:24 -0800 (PST) Subject: [PythonCE] Python CE on Windows Mobile 5 In-Reply-To: <3534108.post@talk.nabble.com> References: <000601c64d14$3c0011c0$3900a8c0@jsihome.com> <1143006381.3405.257221969@webmail.messagingengine.com> <85d9ccbb0603220206u581af064te8aa9d7372dd7ede@mail.gmail.com> <3534108.post@talk.nabble.com> Message-ID: <7779252.post@talk.nabble.com> 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. From bandung at skyesystems.com Tue Dec 12 16:14:53 2006 From: bandung at skyesystems.com (Bandung) Date: Tue, 12 Dec 2006 07:14:53 -0800 (PST) Subject: [PythonCE] grid manager In-Reply-To: References: Message-ID: <7835000.post@talk.nabble.com> The following code snippet shows what I use in order to place a frame at the top rather than the centre of my screen. #### --Frame --------------- self.frame1=Frame(Parent) # self.frame1.configure(width= 235,height= 150) self.frame1.grid(row=0,column=0, sticky=W) # self.frame1.place(x=0) # self.frame1.configure(bg="green") self.frame3=Frame(Parent) # self.frame3.configure(width= 235, ) self.frame3.grid(row=1,column=0, sticky=W) self.frame4=Frame(Parent) # self.frame3.configure(width= 235, ) self.frame4.grid(row=2,column=0, sticky=W) You will note that frame1 has been positioned using the grid. I set its position at row = 0, col = 0. And by using the parameter "sticky = W", it has been left justified. I could have used sticky= NW but instead, I chose to use the another command to force the frame to always be in the top left corner. That is the "place" command. frame.place(x=0) forces everything into the top left hand corner. Hope this helps. dave_welch wrote: > > When using the grid manager is there any way to set the start of the > grid. For example, I have my window default to the screen size when > it starts running, but when I first use the grid manager (row=0, > column=0) it places the widget at the center of the window. Is there > any way to make row/column (0,0) to start from the top of the window > rather than the center? Thanks. > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/grid-manager-tf2715939.html#a7835000 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Tue Dec 12 16:35:16 2006 From: bandung at skyesystems.com (Bandung) Date: Tue, 12 Dec 2006 07:35:16 -0800 (PST) Subject: [PythonCE] Programming on Pocket PC's, use Python? In-Reply-To: <4558D874.4080309@GreenBlueFish.com> References: <4558D874.4080309@GreenBlueFish.com> Message-ID: <7835354.post@talk.nabble.com> If you want to play around with the PPC before buying one, try using the following emulator. It can be run from a usb key. In that way, you can take your virtual ppc "anywhere with you". http://www.furrygoat.com/2005/09/portable_ce_20.html Portable Win CE This pocket pc on an usb stick will run all of the currently embedded apps that ship with WIndows mobile 5.0 as an example. Plus you can add software such as pythonce and run it. FOr whatever reason, I could not get wxPython to play in this environment so I have scrubbed playing with it. IT is not all that stable and from my experience there seems to be no guarabntee that an app which runs within the emulator, will run on the hardware device (or vice versa) You will be able to see how things work. The speed of the emulator is not that great so you may not be able to accurately access if certain software packages will run fast enough for you. Anyways, its a good place to start playing with windows mobile apps before investing any money. I initially liked working with the emulator because I could run pocket pc software with a screen resolution of 640 x 480 rather than that dinky 320 x 240. But the inability to get a software configuration that works on the hardware device, to run on the emulator, has caused me to dump it. If you want a better understanding of the differences between pythonce and python, visit the web site. http://pythonce.sourceforge.net/Wikka/HomePage pythonce In general, most features work. There are some nifty debugging capabilities that I wished worked and a number of os and sys functions that aren't there in the pocket pc version but overall, its a pretty good emulation. The biggest problem is with building a GUI that is portable between your desktop and the pocket pc. The simplest GUI for me is TKinter but the widgets are very limited. I added TkTable which helps a bit. Plus I have used BWidgets. The latter works great on the desktop but one widget, the combo box blows up on the ppc. JBirdAngel wrote: > > > > > > > > Hello, > > i am looking into Pocket PC's and am wanting to better understand the > options for programming on them.  python is what im most familiar > with > on dekstops, but still am not a programmer, i like that it is portable > and so on, so id like to be able to program on my pocket PC but have > the program be as cross platform as possible, i dont fully understand > what all the differences betweeen PythonCE and Python for the desktop > mean in relation to how it would affect the portability of the > programs, so i am wondering about that.. > > also is PythonCE continually and currently being developed? > > what all are my options for programming on Pocket PC's for a variety of > platforms or where is the best place to look?  it looks like various > microsoft things are used alot for pocket PC's but it sounds like they > are very platform restricted and so not at all what im interested in. > > ive also seen a couple things like Pocket Programming Language and > Go-DB, but i am not familiar enough with programming languages to > udnerstand what all these are capable of, and i would of course prefer > something that doest cost money. > > things i might program would range so i cant really specify what > exactly id be interested in, but i would like to be able to program on > a Pocket PC for something that is intended for a Desktop, so if i came > up with some kind of program suited directly to an individual need of > say a store, i would like to be able to program for it on the pocket PC > even if its something that no Pocket PC would ever use, is this > possible? > > i dont want to be limited and would want the program to work on as wide > a range of things as possible, the Pocket PC as well as Linux/desktop > windows.. > > also i dont know all that much about pocket pc's at this point, i read > that one of the cons to consider for python is people having to > download it in order to run the program as well as the size, any > suggestions for better understanding all the consequences of this?  > and > affects of taking up the more space would take? > > on the newer Pocket PC's that have 400Mhz or up to i think 600mhz(?)  > is there alot of noticeable slowness with python being interpreted? or > how can i better understand to compare the possibilities that may be > open to me as far as programming on a pocket pc. > > i am very new to pocket pc's and new to python as well but have read > some on it, but i really dont understand how it all works or the > differences at this point, for example there is a pocket pc program > called Pocket Artist that seems to me to have the main features one > would want from GIMP or Photoshop, yet it takes up like 4mb or > something? i dont understand how such a featurefull program can take up > such little space, and why then do desktop programs take up so much > more space? > > if this is an improper place for these questions please let em know as > im not sure where to go with these questions exactly? > > also if its okay to ask more genaric PPC question, as i do not > currently have a PPC is there a way to see on my desktop what it would > be like to use one, for example id like to better understand how web > surfing would look on one and it would be nice to be able to try like > the free trial of some softwares for PPC and see if it functions enough > for me, as i am looking into the possiblity of using a Pocket PC as my > main computer, which the uses i would want are email/web > surfing/programming/ visual communication/web design, and all of this > does look possible to suite what im looking for. > > thank you - jason > > > > > > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/Programming-on-Pocket-PC%27s%2C-use-Python--tf2625230.html#a7835354 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Tue Dec 12 16:38:30 2006 From: bandung at skyesystems.com (Bandung) Date: Tue, 12 Dec 2006 07:38:30 -0800 (PST) Subject: [PythonCE] grid manager In-Reply-To: <7835000.post@talk.nabble.com> References: <7835000.post@talk.nabble.com> Message-ID: <7835420.post@talk.nabble.com> Here is another thread that talks about the joys of getting the grid manager to play nice. http://mail.python.org/pipermail/python-list/2002-July/155857.html Using The Grid Manager Bandung wrote: > > The following code snippet shows what I use in order to place a frame at > the top rather than the centre of my screen. > > #### --Frame --------------- > self.frame1=Frame(Parent) > # self.frame1.configure(width= 235,height= 150) > self.frame1.grid(row=0,column=0, sticky=W) > # self.frame1.place(x=0) > # self.frame1.configure(bg="green") > > self.frame3=Frame(Parent) > # self.frame3.configure(width= 235, ) > self.frame3.grid(row=1,column=0, sticky=W) > > self.frame4=Frame(Parent) > # self.frame3.configure(width= 235, ) > self.frame4.grid(row=2,column=0, sticky=W) > > You will note that frame1 has been positioned using the grid. I set its > position at row = 0, col = 0. And by using the parameter "sticky = W", it > has been left justified. I could have used sticky= NW but instead, I > chose to use the another command to force the frame to always be in the > top left corner. That is the "place" command. > > frame.place(x=0) > > forces everything into the top left hand corner. > > Hope this helps. > > > > dave_welch wrote: >> >> When using the grid manager is there any way to set the start of the >> grid. For example, I have my window default to the screen size when >> it starts running, but when I first use the grid manager (row=0, >> column=0) it places the widget at the center of the window. Is there >> any way to make row/column (0,0) to start from the top of the window >> rather than the center? Thanks. >> _______________________________________________ >> PythonCE mailing list >> PythonCE at python.org >> http://mail.python.org/mailman/listinfo/pythonce >> >> > > -- View this message in context: http://www.nabble.com/grid-manager-tf2715939.html#a7835420 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Tue Dec 12 16:42:29 2006 From: bandung at skyesystems.com (Bandung) Date: Tue, 12 Dec 2006 07:42:29 -0800 (PST) Subject: [PythonCE] Python 2.5 for Windows CE / ARM In-Reply-To: <456B6A91.9050702@lestat.st> References: <456B6A91.9050702@lestat.st> Message-ID: <7835484.post@talk.nabble.com> You should either use the CAB install option (ie download the cab file and place it on your mobile) or run the install.exe from you desktop when you are linked to your mobile via ActiveSync. Make sure that you get the additional files that are missing, ie the Tkinter files as well as the MySQLite files and place them within the appropriate directory on your mobile. The instructions are there in the download. Or you can refer to prior message threads on this site. David Goncalves wrote: > > Hello, > > I'm trying to install Python on my CE device since many time ;) > I've just found that release of PythonCE (2.5) but unfortunetly > this version is not working on my device. > > I've the following message : "Python.exe is not a valid CE application". > > My device is running WindowsCE 4.2 on an ARM processor (Intel PXA255). > > Do you think it's just a compil time option to make it compatible or > there is no chance for me to see it working on my device ? ;) > > Thanks. > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/Python-2.5-for-Windows-CE---ARM-tf2715042.html#a7835484 Sent from the Python - pythonce mailing list archive at Nabble.com. From pythonce-ml at lestat.st Wed Dec 13 21:22:41 2006 From: pythonce-ml at lestat.st (David Goncalves) Date: Wed, 13 Dec 2006 21:22:41 +0100 Subject: [PythonCE] Python 2.5 for Windows CE / ARM In-Reply-To: <7835484.post@talk.nabble.com> References: <456B6A91.9050702@lestat.st> <7835484.post@talk.nabble.com> Message-ID: <45806111.5000608@lestat.st> Hi, Thanks for your tips ;) But unfortunetly there is no chance for me to get PythonCE working on my device (with or without the additionnal files). I'm using a WindowsCE 4.2 Core version. The Python.exe is not recognized as a "Valid CE application". The only distribution that works is the HPC2000 one but that distrib is pretty old and not full functional for me :( I don't know what to do to have PythonCE on my WinCE :( Any idea ? > You should either use the CAB install option (ie download the cab file and > place it on your mobile) or run the install.exe from you desktop when you > are linked to your mobile via ActiveSync. > > Make sure that you get the additional files that are missing, ie the Tkinter > files as well as the MySQLite files and place them within the appropriate > directory on your mobile. The instructions are there in the download. Or > you can refer to prior message threads on this site. From bandung at skyesystems.com Wed Dec 13 22:32:55 2006 From: bandung at skyesystems.com (Bandung) Date: Wed, 13 Dec 2006 13:32:55 -0800 (PST) Subject: [PythonCE] Python 2.5 for Windows CE / ARM In-Reply-To: <45806111.5000608@lestat.st> References: <456B6A91.9050702@lestat.st> <7835484.post@talk.nabble.com> <45806111.5000608@lestat.st> Message-ID: <7861775.post@talk.nabble.com> David, Could you download this version of python in a cab format and try to install it and tell us what happens? http://downloads.sourceforge.net/pythonce/PythonCE-243-20060430.PPC2003_ARM.CAB?modtime=1146511186&big_mirror=0 python 2.4.3 David Goncalves wrote: > > Hi, > > > Thanks for your tips ;) > > But unfortunetly there is no chance for me to get PythonCE working on my > device (with or without the additionnal files). > > I'm using a WindowsCE 4.2 Core version. The Python.exe is not recognized > as a "Valid CE application". > > The only distribution that works is the HPC2000 one but that distrib is > pretty old and not full functional for me :( > > I don't know what to do to have PythonCE on my WinCE :( > > Any idea ? > >> You should either use the CAB install option (ie download the cab file >> and >> place it on your mobile) or run the install.exe from you desktop when >> you >> are linked to your mobile via ActiveSync. > > >> Make sure that you get the additional files that are missing, ie the >> Tkinter >> files as well as the MySQLite files and place them within the appropriate >> directory on your mobile. The instructions are there in the download. >> Or >> you can refer to prior message threads on this site. > > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/Python-2.5-for-Windows-CE---ARM-tf2715042.html#a7861775 Sent from the Python - pythonce mailing list archive at Nabble.com. From pythonce-ml at lestat.st Wed Dec 13 23:41:21 2006 From: pythonce-ml at lestat.st (David Goncalves) Date: Wed, 13 Dec 2006 23:41:21 +0100 Subject: [PythonCE] Python 2.5 for Windows CE / ARM In-Reply-To: <7861775.post@talk.nabble.com> References: <456B6A91.9050702@lestat.st> <7835484.post@talk.nabble.com> <45806111.5000608@lestat.st> <7861775.post@talk.nabble.com> Message-ID: <45808191.3070103@lestat.st> Bandung wrote: > David, Could you download this version of python in a cab format and try to > install it and tell us what happens? > > http://downloads.sourceforge.net/pythonce/PythonCE-243-20060430.PPC2003_ARM.CAB?modtime=1146511186&big_mirror=0 > python 2.4.3 I've tried this version and the problem was the same. But during this time i had an idea and googled ;) It's seems that the only external DLL used by the exe is 'Aygshell.dll'. But in WinCE 4.2 core version there is no Aygshell included. I'm actually using a copy of this Dll needed for other softs on my device. I've found an old (40Kb) version of that Dll that makes PyCE work on my device but after putting that Dll, my system is quite unstable. (i.e nothing appears on my control panel... and other strange things) Do you have an idea of what function is used by Python when it is launched and why my 'dummy' aygshell is not good for him ? From bandung at skyesystems.com Thu Dec 14 01:13:43 2006 From: bandung at skyesystems.com (Bandung) Date: Wed, 13 Dec 2006 16:13:43 -0800 (PST) Subject: [PythonCE] Python 2.5 for Windows CE / ARM In-Reply-To: <45808191.3070103@lestat.st> References: <456B6A91.9050702@lestat.st> <7835484.post@talk.nabble.com> <45806111.5000608@lestat.st> <7861775.post@talk.nabble.com> <45808191.3070103@lestat.st> Message-ID: <7864386.post@talk.nabble.com> My guess is that you have a Sigmarion handheld. (You could have made our task so much easier by telling us what device you had in your first post). The reason why you are using the dummy Aygshell is so you can make software that was compiled for pocketpc's run on a handheld. I use to have an HP Jornada 720 and was used to employing this trick. The aygshell.dll handles new style command bar at the bottom of the screen. the gx.dll is related to gapi and a third software file requirement is the mfcce300.dll that comes with PPC Many a program would report the error "not a win ce application" if the wrong version of gx.dll is loaded. Pocket TV users encountered this problem often when they installed software that over had written a working gx.dll. The solution is to get a working gx.dll from another package. I would probably first try the gapi from this site but if it hiccups, its back to a ppc gapi instead. http://www.wincesoft.de/html/gapi_for_hpc_s.html hpc gapi Next thing is to make sure that you have a working aygshell. You may have to recreate one if various others don't work for you. http://www.wincesoft.de/aygshell.dll dummy aygshell.dll Use the info from this site to test your combination of gx.dll and aygshell.dll http://www.wincesoft.de/html/ppc_apps_on_hpc_s.html getting pocketpc apps to run on handhelds The following link will provide you with additional information on how to create your own aygshell.dll as well as a gx.dll.ini file. http://pages.ccapcable.com/lac/PPC_on_HPC.html using fake ppc dll's Finally, you will need to get the correct version of mfcce300.dll . If you are trying to run python 2.5 you probably need mfcce400.dll Try both. If python 2.5 won't run on your handheld, there is always a chance that the 2.4.3 version will. With regard to compiling your own version of python 2.5 for the sygarrion, well if you are capable of doing that, I've got a whole mess of other apps that I would like your assistance in recompiling, beginning with wxpython and ending with PIL. ;) Good luck. David Goncalves wrote: > > Bandung wrote: >> David, Could you download this version of python in a cab format and try >> to >> install it and tell us what happens? >> >> http://downloads.sourceforge.net/pythonce/PythonCE-243-20060430.PPC2003_ARM.CAB?modtime=1146511186&big_mirror=0 >> python 2.4.3 > > > I've tried this version and the problem was the same. > > But during this time i had an idea and googled ;) It's seems that the > only external DLL used by the exe is 'Aygshell.dll'. But in WinCE 4.2 > core version there is no Aygshell included. > > I'm actually using a copy of this Dll needed for other softs on my > device. > > I've found an old (40Kb) version of that Dll that makes PyCE work on > my device but after putting that Dll, my system is quite unstable. > (i.e nothing appears on my control panel... and other strange things) > > > Do you have an idea of what function is used by Python when it is > launched and why my 'dummy' aygshell is not good for him ? > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/Python-2.5-for-Windows-CE---ARM-tf2715042.html#a7864386 Sent from the Python - pythonce mailing list archive at Nabble.com. From JBirdAngel at GreenBlueFish.com Thu Dec 14 23:22:09 2006 From: JBirdAngel at GreenBlueFish.com (JBirdAngel) Date: Thu, 14 Dec 2006 17:22:09 -0500 Subject: [PythonCE] VimCE Message-ID: <4581CE91.9010401@GreenBlueFish.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20061214/fb0f5feb/attachment.html From bandung at skyesystems.com Fri Dec 15 00:28:11 2006 From: bandung at skyesystems.com (Bandung) Date: Thu, 14 Dec 2006 15:28:11 -0800 (PST) Subject: [PythonCE] VimCE In-Reply-To: <4581CE91.9010401@GreenBlueFish.com> References: <4581CE91.9010401@GreenBlueFish.com> Message-ID: <7883485.post@talk.nabble.com> Yes it is Rainer's VIM. I wish I knew how to compile Windows apps from source code. In that case, I would try to get version 7.0 working. (1) The good news is that Rainer's Vim 6.0 version works quite well. I had to add additional file folders and populate them with the necessary plugins in order to get all of the menu features working. To do this, I installed the desktop version 6.3 of Vim and then copied the entire sub folder structure over into my pda and voila, everything worked except for one script, vim.vim. When I deleted it, everything, and I do mean everything else within Vim worked. I added the most up-to-date python syntax script I could find and that is what I use. My pda has a hardware keyboard so I use it extensively. I have programmed missing keys for the escape key and some other combinations such as ctrl-Q as an example. I also wanted a backward slashes, etc. I can get a lot of things done on my pda with this hardware keyboard. Even though I have Calligrapher installed (which I love by the way) I don't need it when I am editing code. I would be willing to zip my Vim directory and upload it somewhere in order for you to take a look at . It has the _vimrc file setup for those features that I use. You don't have to stick with them. It will give you an idea of how useful this program is when you configure it to your liking. (2) Now that I have managed to get a pocket console programme working, I don't see the need to use VIM as a pda console anymore. (3) The third thing that I wanted to have was the ability to have an "open With" option within my file explorer so that I could choose either of the following actions to a) launch the python module by clicking on it or b) open it within Vim for editing. I was trying to get this working within Vim by writing a macro that would permit me to execute the module that I was editing but so far no luck. What I discovered instead was a little utility that attaches itself to the windows file explorer and permits me to do jsut that. If I click on the file, it executes. If I click and hold, I get a context menu where I choose "open with" and then I use Vim to edit it. I wish Total Commander's "view" or "edit" command worked properly. Unfortunately it doesn't appear to use "" around the file name that is being clicked on so every file that is within a directory whose name has a space in it, doesn't lauch properly. For example, all files within my storage card since they are inthe \Storage Card\"whatever.file" and because of the space, the program thinks the directory is "\Storage" rather than "\Storage Card" . The same thing is true with Resco's file explorer. Their "open with" feture doesn't work on my Windows 5.0 device. Now it could be that something I've installed is causing this behaviour since I don't see anyone else complaining about this. (4) There are some capabilities within the current python ports that are missing that would help with debugging. Examples are the ability to provide arguments when launching python such as python -i /myfile.py (the ability to execute a module and upon its completion, switch to a working interpreter mode). python -m pdb /myfile (the ability to execute a command such as the python debugger "pdb" and then launch a module in the interpreter with the debugger running) That's my experience to date. JBirdAngel wrote: > > > > > > > > is it VimCE that you use from Rainer? > > is this this and the command console things youve been talking about > the best development platform for python? i dont know if im saying it > right or what the difference between an editor and an IDE is unless the > difference is the ide running the programs/scripts too, or are there > other options available? > > thanks - jason > > > > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/VimCE-tf2823987.html#a7883485 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Fri Dec 15 00:43:49 2006 From: bandung at skyesystems.com (Bandung) Date: Thu, 14 Dec 2006 15:43:49 -0800 (PST) Subject: [PythonCE] VimCE In-Reply-To: <7883485.post@talk.nabble.com> References: <4581CE91.9010401@GreenBlueFish.com> <7883485.post@talk.nabble.com> Message-ID: <7883665.post@talk.nabble.com> Editing vs IDE Editing The most sought after features that I like to see in an editor are context sensitive hiliting and a lot of short cut keys. It would also be nice to have auto completion of commands. I don't have the latter within VimCE. IDE The ability to execute the modified code with a single click is really cool. It would also be cool to support auto completion of commands. A third feture would be the ability to enter some break points for debugging. Another capability would be to be able to access a graphical GUI builder, look at your code using a UML viewing mode, etc. IDLE is a pretty decent editor and IDE. But I am far more proficient editing code from within Vim. All I want over and above a decent editor for the pda environment now is the ability to execute that modified code easily without having to use 4 or 5 clicks (to find files that are deep within some file folder structure on my Storage Card). I have discovered a few work arounds which gets it down to two clicks and now I don't have to worry about a modified py module not being reloaded by IDLE and executed. So that is the extent of my search for a better "IDE" at this juncture. -- View this message in context: http://www.nabble.com/VimCE-tf2823987.html#a7883665 Sent from the Python - pythonce mailing list archive at Nabble.com. From JBirdAngel at GreenBlueFish.com Fri Dec 15 17:10:53 2006 From: JBirdAngel at GreenBlueFish.com (JBirdAngel) Date: Fri, 15 Dec 2006 11:10:53 -0500 Subject: [PythonCE] thanks Message-ID: <4582C90D.9030408@GreenBlueFish.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20061215/815aa79c/attachment.htm From bandung at skyesystems.com Fri Dec 15 23:29:51 2006 From: bandung at skyesystems.com (Bandung) Date: Fri, 15 Dec 2006 14:29:51 -0800 (PST) Subject: [PythonCE] thanks In-Reply-To: <4582C90D.9030408@GreenBlueFish.com> References: <4582C90D.9030408@GreenBlueFish.com> Message-ID: <7900449.post@talk.nabble.com> Vim is a text only editor. If you want to retain embedded word processing formatting, you will have to use something like pocket word (free with the windows mobile emulator link that I sent you or free with any pda that you purchase). Otherwise ya hafta "pony up" and buy TextMaker - which I love. I don't have an external keyboard. Still looking and trialing them. I have a Starcom 6700 which includes a hardware keyboard. Here is the link to my pocket Vim file. http://uploadhut.com/view.php/251938.zip Pocekt Vim Remember, you will have to go through the various sub folders and delete the files that you don't need. There are 4 megs of doc files, and several megs of tutorial files that you might not want on your pda. Also there are tons of syntax formats that you may never use. If you open my vimrc_bandung.vim setup file, you will note that I have defined a few short keys. For example, to type an I use three tabs . I also wanted square brackets so I use k and l Here are my keyboard mappings for the additional keys that are not on the Starcom6700. vmap >gv vmap imap \ imap k [ imap l ] imap n < imap m > imap a ^ map map q map \ map k [ map l ] map n < map m > map a ^ set lines=10 set tw=78 set mouse=a set nowrap set expandtab set ruler filetype plugin on filetype indent on I would not seriously consider doing my programming solely on a pda. It is at least twice as slow as a desktop and the screen real estate size seems frustratingly too small after awhile. -- View this message in context: http://www.nabble.com/thanks-tf2828051.html#a7900449 Sent from the Python - pythonce mailing list archive at Nabble.com. From JBirdAngel at GreenBlueFish.com Sat Dec 16 00:13:10 2006 From: JBirdAngel at GreenBlueFish.com (JBirdAngel) Date: Fri, 15 Dec 2006 18:13:10 -0500 Subject: [PythonCE] thanks again Message-ID: <45832C06.6040608@GreenBlueFish.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20061215/13cd660c/attachment.html From JBirdAngel at GreenBlueFish.com Sat Dec 16 01:32:31 2006 From: JBirdAngel at GreenBlueFish.com (JBirdAngel) Date: Fri, 15 Dec 2006 19:32:31 -0500 Subject: [PythonCE] setup.exe didnt finish downlaod cant delete Message-ID: <45833E9F.9090906@GreenBlueFish.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20061215/d09fb373/attachment.htm From JBirdAngel at GreenBlueFish.com Sat Dec 16 01:24:44 2006 From: JBirdAngel at GreenBlueFish.com (JBirdAngel) Date: Fri, 15 Dec 2006 19:24:44 -0500 Subject: [PythonCE] psyqlite and tkinter Message-ID: <45833CCC.7020702@GreenBlueFish.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonce/attachments/20061215/cd047245/attachment.html From bandung at skyesystems.com Sat Dec 16 04:07:22 2006 From: bandung at skyesystems.com (Bandung) Date: Fri, 15 Dec 2006 19:07:22 -0800 (PST) Subject: [PythonCE] thanks again In-Reply-To: <45832C06.6040608@GreenBlueFish.com> References: <45832C06.6040608@GreenBlueFish.com> Message-ID: <7902922.post@talk.nabble.com> (1) You unzip the file and copy the Vim directory to your \Storage Card\Program Files\Vim directory or into the device's main memory ie \Program Files\Vim (2) You will want to create a shortcut to the Vim.exe executable. Then you can launch Vim and begin programming. Notice the context sensitive color hiliting that is within Vim. You can get the same feature using Idle by the way. http://www.nabble.com/file/4760/vim-1.gif You install python and can run it. I like to put my unit in the landscape mode and use the hardware keyboard. If you want to use the Sip keyboard, you can. I use Calligrapher's SIP keyboard because it floats and I can move it to the top, middle or bottom of the screen. Calligrapher also gives me an key and a few other goodies. http://www.nabble.com/file/4761/python-1.gif (3) You don't need a cmd console to program with. I wanted it so that I could launch programs from a command prompt. Since my pocket SSH tunnelling programme must be launched via a dos command prompt, that's what I use it for. I can also launch other programs from the command prompt such as pword.exe, python, Vim, you name it. I can also launch an apps and provide it with an input file name as a command argument and the app will start with that file loaded. Notice how I've typed python calctaxes.py at the command prompt. This will launch python and load the module. You will also note that I ran a bat file that I created. This bat file is called env.bat and it expands my pocket pc's Path to include where my Python, Vim and other apps are located. I already provided the links to these cmd files, either Microsoft's (which you see in the image) or Symbol's pocket console. http://www.nabble.com/file/4764/cmd-1.gif (4) I added a little utility that permits me to do a "right click" if you will on a file within the file explorer and choose an alternate default "open". You can see the additional command called "open with" in the next image. This permits me to simultaneously launch a python module, then move to my file explorer and choose to open it with vim in order to edit it. http://www.nabble.com/file/4765/open-1.gif (5) Putting it all together. I developed a gui app using tKinter and python. I later added Bwidgets and then found another widget called tkTable. I would start with these tools in order to build your first gui app. I had a lot of trouble trying to get wxPython to work on my pda. I would prefer to use this tool since I use it on my desktop but, it won't load. Keeps writing an out of memory error. So there you have it. You should be able to test these tools using your pda emulator on your desktop. One other thing. It makes sense to get a good taskbar manager. I use vbar. This works like on your desktop so you can easily move between apps that are open, or close them. http://www.nabble.com/file/4766/tkinter-1.gif JBirdAngel wrote: > > > > > > > > Thanks again for the info and for the file. > > just so i understand, as i said im not too knowledgable about this so > far, so this will completley install vim, and to do that basically i > just copy the Vim folder onto my pocket pc, since you have already > installe dthe desktop version and copied the subfolders to your pda i > would not have to do this correct? > > in addition to this would be doing the console like you said, and of > course installing pythonce, then i would be set up for programming on > the pocket pc right?  > > the other piece i would want would be GUI stuff, and thats pretty much > all of it? or atleast all of it i need to know now to get started and > the rest i would learn as i go? > > and thank you for mentioning word, as i do not have a pocket pc, but > being that it was a .php file word didnt see it and coudlnt open it, > but i changed it to a .txt and it opened just fine, so in my > understanding i can edit it in word which keeps the formating, and then > just change it back to a .php for it to work on the web... kool > > Vim will however keep the python formatting right? apparently text and > word processing programs do formatting differently i guess. > > i like my pocket pc, its fun and kool and its kool to be able to > program in python on it... once/if i learn :) > > thanks - jason > > > > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/thanks-again-tf2830049.html#a7902922 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Sat Dec 16 04:13:27 2006 From: bandung at skyesystems.com (Bandung) Date: Fri, 15 Dec 2006 19:13:27 -0800 (PST) Subject: [PythonCE] setup.exe didnt finish downlaod cant delete In-Reply-To: <45833E9F.9090906@GreenBlueFish.com> References: <45833E9F.9090906@GreenBlueFish.com> Message-ID: <7902950.post@talk.nabble.com> To delete that file that is always in use, I suggest that you use the following trick. START | RUN | CMD CD to your directory. Use: DIR /X /A to see the SHORT FILE NAMES of the files and directories there. use: RMDIR [/Q] [drive:]path RD [/Q] [drive:]path /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. /Q Quiet mode, do not ask if ok to remove a directory tree with /S Example: RMDIR /Q c:\progra~1\McAfee~1 RD /Q c:\progra~1\McAfee~1 JBirdAngel wrote: > > > > > > > > Hello, > > i tried to download the setup.exe for pythonce 2.5, it iddnt finish > downloading said there was an unknown error and to try to download it > ot a differnet location, it wouldnt let me delete it saying there was a > person or program using it, i closed the open programs, though not > taskbar programs (im on windows xp) and it still wouldnt delete, then i > restarted the computer and tried to delete it right away but still says > a person or program is using it, it didnt complete downloading what > could be trying to use it? > > thanks - jason > > > > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/setup.exe-didnt-finish-downlaod-cant-delete-tf2830339.html#a7902950 Sent from the Python - pythonce mailing list archive at Nabble.com. From bandung at skyesystems.com Sat Dec 16 04:22:19 2006 From: bandung at skyesystems.com (Bandung) Date: Fri, 15 Dec 2006 19:22:19 -0800 (PST) Subject: [PythonCE] psyqlite and tkinter In-Reply-To: <45833CCC.7020702@GreenBlueFish.com> References: <45833CCC.7020702@GreenBlueFish.com> Message-ID: <7902999.post@talk.nabble.com> Yes you definitely will need the kTinker file. IF you plan on writing database driven apps then you will need psyqlite. Here is my "readme" that I created to remind me of where to put these files plus the fix for the indentation problem that python25ce has. ------------------------------------ MY README.txt ------------------------------------ Release Name: Python-2.5-20061012 Notes: This is a Windows CE / ARM port of Python 2.5. It has only been tested on Pocket PC 2003 for ARMV4 architecture. If you are upgrading from version 2.4.x or earlier then I recommended that you first make a backup of your Python installation, uninstall it and then install the new version. The files are: PythonCE-2.5-20061012-source.zip: the full source package PythonCE-2.5-20061012-patch.zip: the source as a patch to the official Python 2.5 release PythonCE-2.5-20061012-dev.zip: contains the header files and import library necessary for building C extension modules for PythonCE PythonCE-2.5-20061012-setup.exe: a setup program that registers PythonCE with Microsoft ActiveSync's application manager and installs it automatically PythonCE-25-20061012.PPC2003_ARM.cab: the cabinet file that is included as part of the setup.exe, for people who wish to install automatically but without an ActiveSync connection PythonCE-2.5-20061012-pysqlite.zip: contains sqlite3.dll and _sqlite3.pyd (these are not included in the .cab/.exe) PythonCE-2.5-20061012-_tkinter.zip: contains _tkinter.pyd (this is not included in the .cab/.exe) If you get the .exe then you don't need the .cab file. --------------- (1) the cab install is missing files _tinker.pyd 1. Copy it into the python25\DLL directory (2) the cab install is missing files sqlite3.dll and _sqlite3.pyd To install this package: 2. Copy sqlite3.dll into the PythonCE base directory, i.e. the directory containing python25.dll 3. Copy _sqlite3.pyd into the DLLs subdirectory where all of the other .pyd files are installed (3) IndentationError: expected an indented block. 4. There is a little script to fix this problem with python25.exe I copied the script from nabble and placed it into a file called pythonrc.py. Don't forget to use the pythonrc file.py by placing it into the temp directory. This resolves the problem with the interpreter not recognizing the indent behaviour needed for multi line scriptsthat occurs after a colon: For example, consider this simple example: >>> for i in xrange(10): This will result in an error within the stock python25ce. To get around this, create a file called pythonrc.py and paste the script provided by Dunston. I then placed this file in my \Temp directory which is where python25ce looks for it. This will change with the next release of python. Now indentation works properly whenever I launch a python interpreter. NOTE: pythonrc.py only runs when you invoke the interpreter. It does not launch when you run a module. JBirdAngel wrote: > > > > > > > > its okay to ask questions here even if id ont have > python installed yet and am not a programmer yet right? just wanna > maker sure.... > > i am wondering if i want psyqlite and tkinter zips that are part of the > total pythonce 2.5 download but not part of the setup/cab.. tkinter is > soemthign to do with gui i think? > > thanks - jason > > > > > _______________________________________________ > PythonCE mailing list > PythonCE at python.org > http://mail.python.org/mailman/listinfo/pythonce > > -- View this message in context: http://www.nabble.com/psyqlite-and-tkinter-tf2830373.html#a7902999 Sent from the Python - pythonce mailing list archive at Nabble.com. From pythonce-ml at lestat.st Sat Dec 16 14:14:24 2006 From: pythonce-ml at lestat.st (David Goncalves) Date: Sat, 16 Dec 2006 14:14:24 +0100 Subject: [PythonCE] Python 2.5 for Windows CE / ARM In-Reply-To: <7864386.post@talk.nabble.com> References: <456B6A91.9050702@lestat.st> <7835484.post@talk.nabble.com> <45806111.5000608@lestat.st> <7861775.post@talk.nabble.com> <45808191.3070103@lestat.st> <7864386.post@talk.nabble.com> Message-ID: <4583F130.7010905@lestat.st> Hi, I wasn't present this days to anwser you ;) Bandung wrote: > My guess is that you have a Sigmarion handheld. (You could have made our > task so much easier by telling us what device you had in your first post). > The reason why you are using the dummy Aygshell is so you can make software > that was compiled for pocketpc's run on a handheld [...] I'm using a Bluemedia BM6300 provided with WindowsCE .NET 4.2 (the hardware is the same as a MIO 138). Instead of having a 'Today page', i have a desktop with a start menu like win32. > Many a program would report the error "not a win ce application" if the > wrong version of gx.dll is loaded. Pocket TV users encountered this problem > often when they installed software that over had written a working gx.dll. > The solution is to get a working gx.dll from another package. I would > probably first try the gapi from this site but if it hiccups, its back to a > ppc gapi instead. > > http://www.wincesoft.de/html/gapi_for_hpc_s.html hpc gapi I'm already using GAPI for HPC (btw it's very nice) > Next thing is to make sure that you have a working aygshell. You may have > to recreate one if various others don't work for you. > > http://www.wincesoft.de/aygshell.dll dummy aygshell.dll > > Use the info from this site to test your combination of gx.dll and > aygshell.dll > > http://www.wincesoft.de/html/ppc_apps_on_hpc_s.html getting pocketpc apps to > run on handhelds > > The following link will provide you with additional information on how to > create your own aygshell.dll as well as a gx.dll.ini file. > > http://pages.ccapcable.com/lac/PPC_on_HPC.html using fake ppc dll's > > Finally, you will need to get the correct version of mfcce300.dll . If you > are trying to run python 2.5 you probably need mfcce400.dll Try both. > > If python 2.5 won't run on your handheld, there is always a chance that the > 2.4.3 version will. With regard to compiling your own version of python 2.5 > for the sygarrion, well if you are capable of doing that, I've got a whole > mess of other apps that I would like your assistance in recompiling, > beginning with wxpython and ending with PIL. ;) I've found a working AYGSHELL for my device (but i have to copy it to python's folder because if copied to windows, my system becomes unstable) Now i can have Python 2.5 + Tkinter working perfectly on my device. Thanks a lot for your help and for the good links you provided ;) -- David From bandung at skyesystems.com Mon Dec 18 10:24:25 2006 From: bandung at skyesystems.com (Bandung) Date: Mon, 18 Dec 2006 01:24:25 -0800 (PST) Subject: [PythonCE] psyqlite and tkinter In-Reply-To: <7902999.post@talk.nabble.com> References: <45833CCC.7020702@GreenBlueFish.com> <7902999.post@talk.nabble.com> Message-ID: <7925682.post@talk.nabble.com> Here is the script that Luke Dunstan built to correct the indentation problem. I saved it in a file called pythonrc.py. Why? Because this file gets loaded automatically everytime one launches a python interpreter. Unfortunately, pytonce25 looks for it in the PDA's \Temp directory. So that is where you need to put it. http://www.nabble.com/file/4860/pythonrc.py pythonrc.py Bandung wrote: > > Yes you definitely will need the kTinker file. IF you plan on writing > database driven apps then you will need psyqlite. Here is my "readme" > that I created to remind me of where to put these files plus the fix for > the indentation problem that python25ce has. > > > ------------------------------------ > MY README.txt > ------------------------------------ > > > Release Name: Python-2.5-20061012 > > Notes: > This is a Windows CE / ARM port of Python 2.5. It has only > been tested on Pocket PC 2003 for ARMV4 architecture. > > If you are upgrading from version 2.4.x or earlier then I > recommended that you first make a backup of your Python > installation, uninstall it and then install the new version. > > The files are: > > PythonCE-2.5-20061012-source.zip: the full source package > > PythonCE-2.5-20061012-patch.zip: the source as a patch to > the official Python 2.5 release > > PythonCE-2.5-20061012-dev.zip: contains the header files > and import library necessary for building C extension > modules for PythonCE > > PythonCE-2.5-20061012-setup.exe: a setup program that > registers PythonCE with Microsoft ActiveSync's > application manager and installs it automatically > > PythonCE-25-20061012.PPC2003_ARM.cab: the cabinet file that > is included as part of the setup.exe, for people who wish to > install automatically but without an ActiveSync connection > > PythonCE-2.5-20061012-pysqlite.zip: contains sqlite3.dll and _sqlite3.pyd > (these are > > not included in the .cab/.exe) > > PythonCE-2.5-20061012-_tkinter.zip: contains _tkinter.pyd (this is not > included in > > the .cab/.exe) > > If you get the .exe then you don't need the .cab file. > --------------- > (1) the cab install is missing files _tinker.pyd > > 1. Copy it into the python25\DLL directory > > (2) the cab install is missing files sqlite3.dll and _sqlite3.pyd > > To install this package: > > 2. Copy sqlite3.dll into the PythonCE base directory, i.e. the directory > containing > > python25.dll > > 3. Copy _sqlite3.pyd into the DLLs subdirectory where all of the other > .pyd files are > > installed > > > (3) IndentationError: expected an indented block. > > 4. There is a little script to fix this problem with python25.exe I > copied the > > script from nabble and placed it into a file called pythonrc.py. Don't > forget to use > > the pythonrc file.py by placing it into the temp directory. This resolves > the > > problem with the interpreter not recognizing the indent behaviour needed > for multi > > line scriptsthat occurs after a colon: > > For example, consider this simple example: > >>>> for i in xrange(10): > > This will result in an error within the stock python25ce. To get around > this, create > > a file called pythonrc.py and paste the script provided by Dunston. I > then placed > > this file in my \Temp directory which is where python25ce looks for it. > This will > > change with the next release of python. Now indentation works properly > whenever I > > launch a python interpreter. > > > NOTE: pythonrc.py only runs when you invoke the interpreter. It does not > launch when > > you run a module. > > > > > JBirdAngel wrote: >> >> >> >> >> >> >> >> its okay to ask questions here even if id ont have >> python installed yet and am not a programmer yet right? just wanna >> maker sure.... >> >> i am wondering if i want psyqlite and tkinter zips that are part of the >> total pythonce 2.5 download but not part of the setup/cab.. tkinter is >> soemthign to do with gui i think? >> >> thanks - jason >> >> >> >> >> _______________________________________________ >> PythonCE mailing list >> PythonCE at python.org >> http://mail.python.org/mailman/listinfo/pythonce >> >> > > -- View this message in context: http://www.nabble.com/psyqlite-and-tkinter-tf2830373.html#a7925682 Sent from the Python - pythonce mailing list archive at Nabble.com. From blackout_lair at yahoo.com Fri Dec 22 16:02:21 2006 From: blackout_lair at yahoo.com (Carlo Antonio Denaro) Date: Fri, 22 Dec 2006 07:02:21 -0800 (PST) Subject: [PythonCE] ne Message-ID: <228725.79411.qm@web54107.mail.yahoo.com> Hi to all developers, my name is Charles and im a student. I love python and i have a Nec Mobilepro 790 with wince 3.0 and linux (yeah!) i can use pythonce on this device? thanks :) and happy coding xmas < Carlo Antonio Denaro a.k.a. Blackout > /.-./..-/---/ < Linux User #374633 > [ >:-/ - evil ] * echelon suck usa poison gas terrorist Islam secret * rib attempted nuclear bomb attack bacteria unfaithful __________________________________________________ Do You Yahoo!? Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi http://mail.yahoo.it From coder_infidel at hotmail.com Fri Dec 22 16:27:48 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 23 Dec 2006 00:27:48 +0900 Subject: [PythonCE] ne References: <228725.79411.qm@web54107.mail.yahoo.com> Message-ID: ----- Original Message ----- From: "Carlo Antonio Denaro" To: Sent: Saturday, December 23, 2006 12:02 AM Subject: [PythonCE] ne > Hi to all developers, > my name is Charles and im a student. > I love python and i have a Nec Mobilepro 790 with > wince 3.0 and linux (yeah!) > > i can use pythonce on this device? > thanks :) and happy coding xmas There may be an old version of PythonCE that runs on Windows CE 3.0, I don't know. The latest releases have only been tested on Pocket PC 2003 (Windows CE 4.2) and later. If you wish to submit patches to allow the latest release to run on WinCE 3.0 then that would be helpful. I can't comment on whether Python would run under Linux on your PDA. Luke > > > > < Carlo Antonio Denaro a.k.a. Blackout > /.-./..-/---/ > < Linux User #374633 > [ >:-/ - evil ] > > * echelon suck usa poison gas terrorist Islam secret > * rib attempted nuclear bomb attack bacteria unfaithful From s.p.c.peters at gmail.com Sun Dec 24 14:40:37 2006 From: s.p.c.peters at gmail.com (Stephan Peters) Date: Sun, 24 Dec 2006 05:40:37 -0800 (PST) Subject: [PythonCE] Running with the screen turned off Message-ID: <8041082.post@talk.nabble.com> Hi all! Just started experimenting with Python on my windows mobile 2005 phone/pda. It has it's built in GPS receiver, so that just begs to be used. I already managed to establish a connection to it using ceserial. Very nice module. But now a question pops up. I'm planning to have my program run constantly in the background of my pda and function as a GPS logger. However, windows powers down by default after 3 minutes. And pauzes my program along with it. So, the big question is: does anyone know a way to keep the program running while the screen is turned off? Sort of like the screen off function as use by windows media player. Thanks in advance! Merry Christmas! Stephan Peters -- View this message in context: http://www.nabble.com/Running-with-the-screen-turned-off-tf2877064.html#a8041082 Sent from the Python - pythonce mailing list archive at Nabble.com. From nlu54 at yahoo.com Fri Dec 29 02:02:58 2006 From: nlu54 at yahoo.com (Naiqian Lu) Date: Thu, 28 Dec 2006 17:02:58 -0800 (PST) Subject: [PythonCE] How tobuild PythonCE 2.5 Message-ID: <959748.88118.qm@web36915.mail.mud.yahoo.com> Hi, I have download pythonce source, and try to build it to generate CAB file, just for familiar with python code. What I found out is that Scons will not build. It shows: C:\Source\python-wince\PCbuild\WinCE>scons scons: Reading SConscript files ... : global name 'defpaths' is not defined: the defpaths was used in msevc to get include, lib, and exe path. But I could not find where it gets defined (and set). The old version (2.4.3) use nmake, and set the path in batch file. Does the source package for 2.5 missing something? And where should I set the defpaths? Thanks in advance! Happy New Year! Naiqian Lu __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From darkbeast at darkbeast.com Fri Dec 29 04:55:11 2006 From: darkbeast at darkbeast.com (Andrew Burton) Date: Thu, 28 Dec 2006 21:55:11 -0600 Subject: [PythonCE] Python Error Message-ID: <4594919F.8070602@darkbeast.com> I'm still looking for the fix on my own, but has anyone seen this error: Traceback (innermost last): File "\Program Files\Python\lib\pcceshell.py", line 12 in from win32gui import * exceptions.ImportError.DLL load failed with error code 12 I loaded the latest version of Python CE onto my T-Mobile Dash, copied everything to Windows and Program Files, just as the instructions said. Can anyone offer a suggestion what I've done wrong? Thanks! -- Andrew Burton tuglyraisin at aol.com http://utilitarian.us - A Guide to Esoteric Technology in Paragon City http://jarodrussell.livejournal.com/ - Take a guess. ;) From pythonce-ml at lestat.st Fri Dec 29 10:30:32 2006 From: pythonce-ml at lestat.st (David Goncalves) Date: Fri, 29 Dec 2006 10:30:32 +0100 (CET) Subject: [PythonCE] How tobuild PythonCE 2.5 In-Reply-To: <959748.88118.qm@web36915.mail.mud.yahoo.com> References: <959748.88118.qm@web36915.mail.mud.yahoo.com> Message-ID: <40685.213.41.35.240.1167384632.squirrel@webmail.lestat.st> Hi, > I have download pythonce source, and try to build it > to generate CAB file, just for familiar with python code. > > What I found out is that Scons will not build. It > shows: > > > C:\Source\python-wince\PCbuild\WinCE>scons > scons: Reading SConscript files ... > : global name 'defpaths' > is not defined: > > the defpaths was used in msevc to get include, lib, and exe path. But I > could not find where it gets defined (and set). I got the same problem trying to compile PythonCE. I resolved it by creating en empty 'defpaths' list on line 365 of msevc.py and manually added 'include_path', 'lib_path' and 'exe_path' to it. It seems that when Scons cannot get that paths from the registry, it gets values from that list, but the list is not initialised anywhere. BTW : Use 'os.path.join' to indicate paths in the list to avoid backslahes problems. Regards. From coder_infidel at hotmail.com Sat Dec 30 10:39:18 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 30 Dec 2006 18:39:18 +0900 Subject: [PythonCE] Python Error References: <4594919F.8070602@darkbeast.com> Message-ID: ----- Original Message ----- From: "Andrew Burton" To: Sent: Friday, December 29, 2006 12:55 PM Subject: [PythonCE] Python Error > I'm still looking for the fix on my own, but has anyone seen this error: > > Traceback (innermost last): > File "\Program Files\Python\lib\pcceshell.py", line 12 in > from win32gui import * > exceptions.ImportError.DLL load failed with error code 12 > > I loaded the latest version of Python CE onto my T-Mobile Dash, copied > everything to Windows and Program Files, just as the instructions said. > Can anyone offer a suggestion what I've done wrong? Thanks! Which file did you download, exactly? The above code is not in any recent version of PythonCE. Perhaps the file pcceshell.py is left over from an old version? Luke From coder_infidel at hotmail.com Sat Dec 30 14:11:01 2006 From: coder_infidel at hotmail.com (Luke Dunstan) Date: Sat, 30 Dec 2006 22:11:01 +0900 Subject: [PythonCE] How tobuild PythonCE 2.5 References: <959748.88118.qm@web36915.mail.mud.yahoo.com> Message-ID: ----- Original Message ----- From: "Naiqian Lu" To: Sent: Friday, December 29, 2006 10:02 AM Subject: [PythonCE] How tobuild PythonCE 2.5 > Hi, > > I have download pythonce source, and try to build it > to generate CAB file, just for familiar with python > code. > > What I found out is that Scons will not build. It > shows: > > C:\Source\python-wince\PCbuild\WinCE>scons > scons: Reading SConscript files ... > : global name 'defpaths' > is not defined: > > the defpaths was used in msevc to get include, lib, > and exe path. But I could not find where it gets > defined (and set). > > The old version (2.4.3) use nmake, and set the path in > batch file. > > Does the source package for 2.5 missing something? And > where should I set the defpaths? It is a bug in msevc.py, but I didn't notice it before so there must be something different on your PC. Do you have Microsoft eMbedded Visual C++ 4.0 installed? Do you have the Pocket PC 2003 SDK installed? If you really need to use a different SDK then changes to the build system and/or source code may be necessary. If you have both of these then what directories are they installed in? Luke > > Thanks in advance! > > Happy New Year! > > Naiqian Lu