From stewart.midwinter at gmail.com Tue Feb 1 00:54:55 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Tue Feb 1 00:54:58 2005 Subject: [PythonCE] Data fields don't update, they replace? Message-ID: Strange behaviour observed with Tkinter on PythonCE. I've attached a simple helloworld.py that demonstrates the behaviour. This little app simply displays 'hello, world!' in a label. If you press the Update button, the text changes to 'goodbye, world.' using the config method. In real life, you might have a worker thread that is monitoring some process, and the GUI periodically updates itself. If I run this app on my desktop, it works as I expect. But when I run it on the PocketPC, what happens when I press the Update button is that the whole root window is duplicated, with the new text appearing in the new root window. The old root window can be found hiding underneath. Has anyone else noted this behaviour? If so, how do you work around it? thanks, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com -------------- next part -------------- import os OS = os.name.lower() if OS == 'ce': import pythonrc #contains the sys.path.append() commands from Tkinter import Tk, Label, Button import sys root = Tk() width = 240; height = 100 x = 0; y = 50 geometry = '%sx%s+%s+%s' % (width,height,x,y) root.wm_geometry(geometry) l = Label(root, text = 'hello, world!') l.pack() b = Button(root, text = 'quit', command = sys.exit) def up(): l.config(text='goodbye, world.') l.update() u = Button(root, text = 'update', command = up) b.pack() u.pack() root.mainloop() From stewart.midwinter at gmail.com Tue Feb 1 01:35:37 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Tue Feb 1 01:35:40 2005 Subject: [PythonCE] Re: Data fields don't update, they replace? - never mind In-Reply-To: References: Message-ID: Never mind - I must be losing my mind. I thought I saw this behaviour, but when I tried to display it to a colleague, it wouldn't happen. Perhaps what I saw was a previous version of the app hanging around underneath the newer one. sigh... S -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Tue Feb 1 03:04:36 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Tue Feb 1 03:04:39 2005 Subject: [PythonCE] Re: Data fields don't update, they replace? - and furthermore In-Reply-To: References: Message-ID: now it's doing it again! I get two copies of my root window when I start my app. The problem isn't with Python, though, it's with me. for some reason, a double-tap on the hellworld.py icon in Advanced Explorer is launching two copies of the app. If I press-hold on the icon and select Open from the pop-up menu, I don't get the behaviour. So it was operator error, but not for the reason I initially expected. Hope you all can learn something from this, or at least enjoy a good laugh! cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Thu Feb 3 08:14:04 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Thu Feb 3 08:14:07 2005 Subject: [PythonCE] idleCE Message-ID: Blake, thanks for the latest version of idleCE. I've been using it recently - it's plenty usable as it now stands. But of course I've thought of a couple of feature requests. Firstly, line numbers, so if my code doesn't run and I get an exception, I can go directly to the line number referenced. Secondly, multiple (or at least two) document buffers, so I can copy code snippets from one file to another. I was thinking that a notebook widget might be the way to go for that. cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Thu Feb 3 08:28:24 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Thu Feb 3 08:28:26 2005 Subject: [PythonCE] PythonCE app idea Message-ID: I've been looking for a small graphics app for Windows Mobile that can do vector graphics and I can't find any, only one full-featured app that costs $45. It occurs to me that Tkinter might be a good tool for building such an app. Using the canvas widget, it might be possible to do some useful graphics, then save the screen as a .gif image. Does anyone have any thoughts on this? cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From kitsune_e at yahoo.com Thu Feb 3 18:51:00 2005 From: kitsune_e at yahoo.com (Ed Blake) Date: Thu Feb 3 18:51:03 2005 Subject: [PythonCE] PythonCE app idea In-Reply-To: Message-ID: <20050203175100.47522.qmail@web50208.mail.yahoo.com> --- Stewart Midwinter wrote: > I've been looking for a small graphics app for Windows Mobile that can > do vector graphics and I can't find any, only one full-featured app > that costs $45. It occurs to me that Tkinter might be a good tool for > building such an app. Using the canvas widget, it might be possible > to do some useful graphics, then save the screen as a .gif image. > > Does anyone have any thoughts on this? > > cheers, Nothing to helpful except that it should work. AFAIK the canvas widget is functional, though events under Tkinter can be a problem. Even turtle works which is pretty cool. Try import turtle, turtle.demo(), it runs slow but it does work! From kitsune_e at yahoo.com Thu Feb 3 19:34:01 2005 From: kitsune_e at yahoo.com (Ed Blake) Date: Thu Feb 3 19:34:04 2005 Subject: [PythonCE] IdleCE Major bug!!! Message-ID: <20050203183401.65868.qmail@web50206.mail.yahoo.com> This is a silly thing to miss but it didn't cause ant kind of exception or overt problem. Twice in a row I have tried to edit IdleCE in IdleCE and both times after saving and closing I found that IdleCE would no longer run. Finally today I decided to track down the bug. I copied my malfunctioning version onto my PC's desktop and tried it out, same mysterious symptoms - Python starts, waits a while, then closes with no output... So I open the file in Idle and run it thinking the console is just vanishing to quickly. In Idle though the program works. Confused I close the IdleCE window... and to my surprise Idle closes as well! Eureka! I've run into this problem before, its caused by Tkinter apps which don't have a mainloop. So I open the file in Idle again and scroll to the end of the file, then I open the outline in Leo and compare the last lines. The line root.mainloop() is missing in the modified version. The code which opens the file was reading all but the last line, the line where root.mainloop() was. If there where some newlines at the end of the file I could have edited it several times before it stopped working! Anyway here is the repaired version: http/kitsu/petesdomain.com/files/IdleCE.py If anyone else has any problems feel free to complain, even if I don't get around to it right away I am keeping a todo list for features/bugs. From kitsune_e at yahoo.com Thu Feb 3 20:16:29 2005 From: kitsune_e at yahoo.com (Ed Blake) Date: Thu Feb 3 20:16:33 2005 Subject: [PythonCE] One more thing... Message-ID: <20050203191630.69128.qmail@web50203.mail.yahoo.com> I just remembered this, its a tiny script for checking what (keyboard) events your Tkinter app is recieving. -------------- next part -------------- A non-text attachment was scrubbed... Name: event-check.py Type: text/x-python Size: 648 bytes Desc: event-check.py Url : http://mail.python.org/pipermail/pythonce/attachments/20050203/b103641b/event-check.py From miles at lubin.us Thu Feb 3 22:13:14 2005 From: miles at lubin.us (Miles Lubin) Date: Thu Feb 3 22:14:12 2005 Subject: [PythonCE] Screen size? Message-ID: <420293EA.1090006@lubin.us> I'm just playing around and trying to get my python program to work on my pocket pc. It's working great after using the input function posted on this list in september, but the one problem is that the window seems to be hardcoded for a size bigger than my screen, I have an Axim X5. This makes the horizontal scroll bar partly usable, but the vertical scroll bar is off the screen. This didn't happen with the pocket pc python 2.2 from MurkWorks... Any way to fix this? Please reply as soon as possible, as I am planning on presenting this programin two days. Miles From stewart.midwinter at gmail.com Fri Feb 4 06:07:07 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Fri Feb 4 06:07:11 2005 Subject: [PythonCE] Screen size? In-Reply-To: <420293EA.1090006@lubin.us> References: <420293EA.1090006@lubin.us> Message-ID: Miles: The python2.3.4.zip file has a python.exe that's designed for 240x320 screen, but there is another python.exe floating around that will support 480x640. But that doesn't help you, I know. In your case, it sounds as though you've started up an app and gotten your root window a little too large for your screen. You can tune it as follows: use the attached little app I prepared, screenTuner.py. It will display current screen resolution, current root window size, and allow you to make changes to your window size and see the effect. cheers, S On Thu, 03 Feb 2005 16:13:14 -0500, Miles Lubin wrote: > I'm just playing around and trying to get my python program to work on > my pocket pc. > It's working great after using the input function posted on this list in > september, but the one problem is that the window seems to be hardcoded > for a size bigger than my screen, I have an Axim X5. This makes the > horizontal scroll bar partly usable, but the vertical scroll bar is off > the screen. This didn't happen with the pocket pc python 2.2 from > MurkWorks... Any way to fix this? Please reply as soon as possible, as I > am planning on presenting this programin two days. -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com -------------- next part -------------- #screenTuner.py #by Stewart Midwinter, 2005-02-03, stewart 'at' midwinter 'dot' ca import sys, thread, string, os, time from socket import * global geometry global ent1, ent2 global sizex, sizey, startx, starty, xmax, ymax sizex = 240; sizey = 240 #default values startx = 0; starty = 0 #default values ent1 = None; ent2 = None #default values OS = os.name.lower() if OS == 'ce': import pythonrc #contains the sys.path.append() commands else: # we are on the desktop sys.path.append('c:\\programs') import Tkinter root = Tkinter.Tk() root.title('Screen Tuner') if OS == 'ce': xmax, ymax = root.wm_maxsize() sizex, sizey = xmax, ymax startx = 0; starty = 0 sizex = sizex - startx -6 sizey = sizey - starty -6 else: # we're not in CE, maybe in Windows instead xmax, ymax = root.wm_maxsize() sizex, sizey = (xmax/2, ymax/2) startx = xmax/4; starty = ymax/4 def update(sizex,sizey): print 'updating with %sx%s' % (sizex, sizey) sizex_new = ent1.get() sizey_new = ent2.get() if len(sizex_new) > 0 and len(sizey_new) > 0: try: sizex = int( sizex_new ) sizey = int( sizey_new ) except TypeError: print "Screen size requires integers" #now a reasonableness check if sizex < 100: sizex = 100 if sizey < 100: sizey = 100 if sizey > xmax*2: sizex = xmax*2 if sizey > ymax*2: sizey = ymax*2 geometry = "%dx%d+%d+%d"%(sizex,sizey,startx,starty) root.wm_geometry(geometry) ent1.config(text=sizex); ent2.config(text=sizey) root.update() def quit(): root.destroy() root.quit() geometry = "%dx%d+%d+%d" % (sizex,sizey,startx,starty) root.wm_geometry(geometry) root.update() myFont = ('Helvetica', 10, 'bold') lab1 = Tkinter.Label(root,font=myFont, text = "Screen size:\n%d wide x %d high\n" % (xmax, ymax)) lab1.grid(row=0, column=0, columnspan=1) lab2 = Tkinter.Label(root,text = "Window size:\n") lab2.grid(row=1, column=0, columnspan=1) ent1 = Tkinter.Entry(root) ent1.insert(0,sizex) ent1.grid(row=2, column=0) lab3 = Tkinter.Label(root, text = " X ") lab3.grid(row=3, column=0) ent2 = Tkinter.Entry(root ) ent2.insert(0, str(sizey) ) ent2.grid(row=4, column=0) but1 = Tkinter.Button(root,text="Update", command = lambda x=sizex,y=sizey: update(x,y) ) but1.grid(row=5, column=0, sticky="SW") but2 = Tkinter.Button(root,text="Quit", command = quit) but2.grid(row=5, column=0, stick= "S") root.mainloop() From stewart.midwinter at gmail.com Fri Feb 4 06:24:08 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Fri Feb 4 06:24:11 2005 Subject: [PythonCE] more on screen resolution Message-ID: I'm using a Toshiba e830, which has a VGA screen, and I've installed the VGA version of python.exe, but after creating the screenTuner.py app for Miles, I was surprised to find my screen resolution was set to 240x320. What to do about that? Well, there are utilities like SE_VGA and OzVGA that force your PDA into VGA mode, but not apps respond well to that: low-res apps end up taking up just 1/4 of the screen! What is needed is an app-by-app approach. Well, I found one. There's a freeware app called ForceHiRes available from a Japanese developer at : http://www.geocities.co.jp/SiliconValley-Cupertino/2039/ the page is in Japanese, but you should be able to find the download link. Install, run, and add python to the list of hi-res apps. After I did so, now my screenTuner.py app reports a screen resolution of 480x640, which gives me a whole lot room in which to place widgets! Couple of other apps on that page worth mentioning: FileDialogChanger, an improved file dialog, and Screen Rotate, which on each invocation will rotate your screen another 90? clockwise. I put an icon to it on my Home screen app launcher. cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From mike at pcblokes.com Fri Feb 4 09:12:55 2005 From: mike at pcblokes.com (Michael Foord) Date: Fri Feb 4 09:13:00 2005 Subject: [PythonCE] Screen size? In-Reply-To: <420293EA.1090006@lubin.us> References: <420293EA.1090006@lubin.us> Message-ID: <42032E87.4070600@pcblokes.com> Miles Lubin wrote: > I'm just playing around and trying to get my python program to work on > my pocket pc. > It's working great after using the input function posted on this list > in september, Which function was that ? I'm interested in getting a version of raw_input - I know Isr posted something, but it wasn't working yet (I thought) ? > but the one problem is that the window seems to be hardcoded for a > size bigger than my screen, I have an Axim X5. This makes the > horizontal scroll bar partly usable, but the vertical scroll bar is > off the screen. This didn't happen with the pocket pc python 2.2 from > MurkWorks... What version are you using ? It's not a problem I've ever had. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml > Any way to fix this? Please reply as soon as possible, as I am > planning on presenting this programin two days. > > Miles > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > > > From miles at lubin.us Fri Feb 4 13:31:31 2005 From: miles at lubin.us (Miles Lubin) Date: Fri Feb 4 13:31:38 2005 Subject: [PythonCE] Screen size? In-Reply-To: References: <420293EA.1090006@lubin.us> Message-ID: <42036B23.4040600@lubin.us> Oops :) I was using the python for HPC-2000 :) Why isn't the pocketpc version on sourceforge? Michael: I'm using the input function from http://mail.python.org/pipermail/pythonce/2004-September/000762.html. It's messy, but its good enough for me. Miles From mike at pcblokes.com Fri Feb 4 14:29:29 2005 From: mike at pcblokes.com (Michael Foord) Date: Fri Feb 4 14:29:34 2005 Subject: [PythonCE] Screen size? In-Reply-To: <42036B23.4040600@lubin.us> References: <420293EA.1090006@lubin.us> <42036B23.4040600@lubin.us> Message-ID: <420378B9.4080305@pcblokes.com> Miles Lubin wrote: > Oops :) > I was using the python for HPC-2000 :) > Why isn't the pocketpc version on sourceforge? I don't know who maintains the sourceforge site. > > Michael: > I'm using the input function from > http://mail.python.org/pipermail/pythonce/2004-September/000762.html. > It's messy, but its good enough for me. > Cool. I'll check it out. I'm mainly using IDLE on my Pocket PC now :-) Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml > Miles > > > > > From kitsune_e at yahoo.com Fri Feb 4 19:50:21 2005 From: kitsune_e at yahoo.com (Ed Blake) Date: Fri Feb 4 19:50:25 2005 Subject: [PythonCE] More on Tkinter canvas Message-ID: <20050204185021.29942.qmail@web50207.mail.yahoo.com> I've gotten curious about the Tkinter canvas widget now. I haven't had enough time to really play with it but I do have access to some great examples. Attached is my favorite example from the /demos/tkinter/matt directory slightly modified to run on WinCE. Also here is a url where you can get the demos: http://weblog.cs.uiowa.edu/python-2.3.1/Demo/tkinter/ Unforunatly I couldn't find a zip/tgz containing all the demos, but they do have fairly discriptive names so the above should work. It might also be interesting to go through and adjust these so they will all work on WinCE... -------------- next part -------------- A non-text attachment was scrubbed... Name: canvas-moving-or-creating.py Type: text/x-python Size: 2682 bytes Desc: canvas-moving-or-creating.py Url : http://mail.python.org/pipermail/pythonce/attachments/20050204/2f12b32e/canvas-moving-or-creating.py From stewart.midwinter at gmail.com Fri Feb 4 23:05:50 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Fri Feb 4 23:05:53 2005 Subject: [PythonCE] More on Tkinter canvas In-Reply-To: <20050204185021.29942.qmail@web50207.mail.yahoo.com> References: <20050204185021.29942.qmail@web50207.mail.yahoo.com> Message-ID: Cool! I think that from all of Matt's examples put together, it would be possible to cobble together a little graphics editor for PythonCE. I'll take a closer look at these and try to educate myself about canvases. Thanks for pointing out this site! cheers S On Fri, 4 Feb 2005 10:50:21 -0800 (PST), Ed Blake wrote: > > http://weblog.cs.uiowa.edu/python-2.3.1/Demo/tkinter/ -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Mon Feb 7 00:14:13 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Mon Feb 7 00:14:17 2005 Subject: [PythonCE] line-endings problem with PythonCE Message-ID: I've noticed that many of the python files that I edit on the desktop (or even most of those that I don't), when brought over the Pocket PC and opened in Tillanosoft Notepad or Total Commander's editor, have line endings that are recognized. Instead, there's a square symbol and the line does not break. This has led to a problem where one file, when opened, causes python to instantly crash. The same file can be opened in Pocket Word, but it simply deletes all of the line endings, thus making it impossible for me to read the file and parse it line by line. Have any of you experienced anything similar? What's your take on this? thanks, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From mike at pcblokes.com Mon Feb 7 09:07:02 2005 From: mike at pcblokes.com (Michael Foord) Date: Mon Feb 7 09:06:53 2005 Subject: [PythonCE] line-endings problem with PythonCE In-Reply-To: References: Message-ID: <420721A6.9030705@pcblokes.com> This is because many python files are saved with UNIX line endings instead of windows ones. The easiest solution is simply to get python to open them and then write them back out again. handle = open(filename, 'r') thefile = handle.read() handle.close() open(filename, 'w')..write(thefile) will do the job. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml Stewart Midwinter wrote: >I've noticed that many of the python files that I edit on the desktop >(or even most of those that I don't), when brought over the Pocket PC >and opened in Tillanosoft Notepad or Total Commander's editor, have >line endings that are recognized. Instead, there's a square symbol and >the line does not break. This has led to a problem where one file, >when opened, causes python to instantly crash. The same file can be >opened in Pocket Word, but it simply deletes all of the line endings, >thus making it impossible for me to read the file and parse it line by >line. > >Have any of you experienced anything similar? What's your take on this? > >thanks, > > From mike at pcblokes.com Mon Feb 7 09:12:16 2005 From: mike at pcblokes.com (Michael Foord) Date: Mon Feb 7 09:12:07 2005 Subject: [PythonCE] IdleCE Feature Request Message-ID: <420722E0.4020401@pcblokes.com> A couple of feature requests. The first of which isn't straightforward - but would be nice. 1) Get IdleCE to use the windows clipboard for cut/copy/past operations. At the moment it's not possible to copy and paste into IdleCE from other applications. This would mean finding the right function calls in the windows API I guess. Whilst we're on the subject ctrl- C, X, V, S key bindings would also be very nice. 2) Is there a maximum file size limit for IdleCE ? When attempting to edit a 46kb file yesterday, it would only seem to load the first couple of kilobytes ? Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml From kitsune_e at yahoo.com Mon Feb 7 19:02:45 2005 From: kitsune_e at yahoo.com (Ed Blake) Date: Mon Feb 7 19:02:49 2005 Subject: [PythonCE] IdleCE Feature Request In-Reply-To: <420722E0.4020401@pcblokes.com> Message-ID: <20050207180245.9487.qmail@web50207.mail.yahoo.com> --- Michael Foord wrote: > A couple of feature requests. The first of which isn't straightforward - > but would be nice. > > 1) Get IdleCE to use the windows clipboard for cut/copy/past operations. > At the moment it's not possible to copy and paste into IdleCE from other > applications. This would mean finding the right function calls in the > windows API I guess. Whilst we're on the subject ctrl- C, X, V, S key > bindings would also be very nice. > > 2) Is there a maximum file size limit for IdleCE ? When attempting to > edit a 46kb file yesterday, it would only seem to load the first couple > of kilobytes ? > > Regards, > > Fuzzy Okay, I'll answer the first question first. To my knowledge IdleCE is using the system clipboard. I have a number of influential Python texts stored on my SD card and I copy example code from IE to IdleCE to test it out. Possibly the version of tcl/tk you are using is flawed/hacked/altered to change its behavior. The version of PythonCE and Tk I am using were obtained here: http://fore.validus.com/~kashtan/ Also about ctrl-c/x/v/z... These also should work by default, but on my device (HP Ipaq PPC WinCE 2003) I cannot generate a ctrl-keysym event. This is why I have added the highlight-click popup menu and the the double-tap to paste. I assume since you are asking about the key combinations you are using an HPC, the only thing I can suggest is that you get my event-check script and try to setup your own event binding to do copy/paste/etc. Just put self.bind('',self.copy/paste/etc.) in the __init__ of the SyntaxHighlightingText widget. One of the future features I am planning is a visible clipboard with a memory, this also may solve some of your problems/my bugs. On the second topic I have wondered myself what the file size limits are. Python takes a largish amount of memory to run, and with a Tkinter app running you also have tcl/tk and the Tkinter modules loaded into memory. Now if you have several other applications running as well you may be nearing the limits of your availible memory. Also I did not use any memory safe operations in opening files, I just open()ed then readlines() into a variable. I should probably change it to readline()... There changed, now it uses iteration to get the lines in the file. So far the largest file I've opened is IdleCE itself (~26k) I would be interested to hear the size of the largest file others had successfully edited. Anyway if I have time I will play around with the editing stuff and testing file capabilities, but their is so much to do. Anyway thanks for the feed back and feel free to get in there and play around with the code. Alot of stuff I did the easiest/fastest way I could think of so there are plenty of things to improve. I think most of the code is fairly straight forward, the only hairy parts is the colorizer and where stuff is hacked to pass selections between the popup menu and subsequent functions. From kitsune_e at yahoo.com Mon Feb 7 22:36:50 2005 From: kitsune_e at yahoo.com (Ed Blake) Date: Mon Feb 7 22:36:53 2005 Subject: [PythonCE] Tiny alteration to event-check Message-ID: <20050207213650.45940.qmail@web50208.mail.yahoo.com> Tab delimited columns so the results are readable. -------------- next part -------------- A non-text attachment was scrubbed... Name: event-check.py Type: text/x-python Size: 651 bytes Desc: event-check.py Url : http://mail.python.org/pipermail/pythonce/attachments/20050207/96079708/event-check.py From mike at pcblokes.com Tue Feb 8 09:35:02 2005 From: mike at pcblokes.com (Michael Foord) Date: Tue Feb 8 09:35:07 2005 Subject: [PythonCE] IdleCE Feature Request In-Reply-To: <20050207180245.9487.qmail@web50207.mail.yahoo.com> References: <20050207180245.9487.qmail@web50207.mail.yahoo.com> Message-ID: <420879B6.6060105@pcblokes.com> Ed Blake wrote: >--- Michael Foord wrote: > > > >>A couple of feature requests. The first of which isn't straightforward - >>but would be nice. >> >>1) Get IdleCE to use the windows clipboard for cut/copy/past operations. >>At the moment it's not possible to copy and paste into IdleCE from other >>applications. This would mean finding the right function calls in the >>windows API I guess. Whilst we're on the subject ctrl- C, X, V, S key >>bindings would also be very nice. >> >>2) Is there a maximum file size limit for IdleCE ? When attempting to >>edit a 46kb file yesterday, it would only seem to load the first couple >>of kilobytes ? >> >>Regards, >> >>Fuzzy >> >> > >Okay, I'll answer the first question first. To my knowledge IdleCE is using >the system clipboard. I have a number of influential Python texts stored on >my SD card and I copy example code from IE to IdleCE to test it out. >Possibly the version of tcl/tk you are using is flawed/hacked/altered to >change its behavior. The version of PythonCE and Tk I am using were obtained >here: > >http://fore.validus.com/~kashtan/ > > Sounds like the version of Tkinter I have is dodgy. I'll try downloading and re-installing. My device is an ARM XDA with PPC2002. I was surprised that my 46k file didn't open (46k is peanuts compared to the size of the libraries). I tried several times though and it always cut off at the same place... Bizarre. Particularly as to achieve that you would have had to *explicitly* limit file size (which I thought was unlikely !). Anyway - I'm really pleased with IdleCE - it is much nicer to edit files with than Pocket Notepad !! Many Thanks Regards, Fuzzyman http://www.voidspace.org.uk/python/index.shtml >Also about ctrl-c/x/v/z... These also should work by default, but on my >device (HP Ipaq PPC WinCE 2003) I cannot generate a ctrl-keysym event. This >is why I have added the highlight-click popup menu and the the double-tap to >paste. I assume since you are asking about the key combinations you are >using an HPC, the only thing I can suggest is that you get my event-check >script and try to setup your own event binding to do copy/paste/etc. Just >put self.bind('',self.copy/paste/etc.) in the __init__ of the >SyntaxHighlightingText widget. One of the future features I am planning is a >visible clipboard with a memory, this also may solve some of your problems/my >bugs. > >On the second topic I have wondered myself what the file size limits are. >Python takes a largish amount of memory to run, and with a Tkinter app >running you also have tcl/tk and the Tkinter modules loaded into memory. Now >if you have several other applications running as well you may be nearing the >limits of your availible memory. Also I did not use any memory safe >operations in opening files, I just open()ed then readlines() into a >variable. I should probably change it to readline()... There changed, now >it uses iteration to get the lines in the file. So far the largest file I've >opened is IdleCE itself (~26k) I would be interested to hear the size of the >largest file others had successfully edited. > >Anyway if I have time I will play around with the editing stuff and testing >file capabilities, but their is so much to do. Anyway thanks for the feed >back and feel free to get in there and play around with the code. Alot of >stuff I did the easiest/fastest way I could think of so there are plenty of >things to improve. I think most of the code is fairly straight forward, the >only hairy parts is the colorizer and where stuff is hacked to pass >selections between the popup menu and subsequent functions. >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce > > > > > From stewart.midwinter at gmail.com Wed Feb 9 05:55:01 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Wed Feb 9 05:55:03 2005 Subject: [PythonCE] Qt for Windows now to be LGPL Message-ID: Says so here: http://www.trolltech.com/newsroom/announcements/00000192.html They will release sources, but you have to compile yourself. So, does that mean it could be compiled for Windows Mobile? Would that be a Good Thing or a Bad Thing? cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Wed Feb 9 05:58:54 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Wed Feb 9 05:58:57 2005 Subject: [PythonCE] re: line-endings problem with PythonCE Message-ID: Mike, that suggestion to read the file and then write it back out was just what I needed. It worked a treat on my large config file, and I'm now able to process it and move forward. Thanks a lot. Thanks to Ed Blake too for pointing out that nasty last-line chomping bug in idleCE. It chomped my root.mainloop() and for a while I couldn't figure out why my app would vanish as soon as it started - then I remembered your posting and fixed it. cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From mats.d.wichmann at intel.com Wed Feb 9 07:32:51 2005 From: mats.d.wichmann at intel.com (Wichmann, Mats D) Date: Wed Feb 9 07:33:02 2005 Subject: [PythonCE] Qt for Windows now to be LGPL Message-ID: >Says so here: >http://www.trolltech.com/newsroom/announcements/00000192.html No, it doesn't say that at all. It will be under the same terms as the Linux and Mac versions, that is dual-licensed under GPL and a commercial license. There's a big difference between GPL and LGPL. From mike at pcblokes.com Wed Feb 9 11:07:26 2005 From: mike at pcblokes.com (Michael Foord) Date: Wed Feb 9 11:07:41 2005 Subject: [PythonCE] Qt for Windows now to be LGPL In-Reply-To: References: Message-ID: <4209E0DE.9000801@pcblokes.com> Stewart Midwinter wrote: >Says so here: >http://www.trolltech.com/newsroom/announcements/00000192.html > >They will release sources, but you have to compile yourself. So, does >that mean it could be compiled for Windows Mobile? Would that be a >Good Thing or a Bad Thing? > >cheers, > > Still GPL is better than the commercial only license it was previously available as. Compiling it for windows Mobile will be very challenging . The windows implementation will use a lot of system calls - only a subset of those calls will be available on windows mobile. The source would need modifying to only use resources available under windows mobile. Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml From stewart.midwinter at gmail.com Wed Feb 9 17:58:18 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Wed Feb 9 17:58:22 2005 Subject: [PythonCE] Qt for Windows now to be LGPL In-Reply-To: References: Message-ID: sorry, that was a typo. I did recall reading GPL, not LGPL, and yes, that it will be dual-licensed. Interesting that you can develop for free using the GPL version, but if you make something commercial and don't want to release source code, I guess at that point you could purchase a commercial license. On Tue, 8 Feb 2005 22:32:51 -0800, Wichmann, Mats D wrote: > No, it doesn't say that at all. It will be under the same > terms as the Linux and Mac versions, that is dual-licensed under > GPL and a commercial license. There's a big difference > between GPL and LGPL. cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From jdavis at wgen.net Thu Feb 10 01:02:31 2005 From: jdavis at wgen.net (Jesse Davis) Date: Thu Feb 10 01:02:34 2005 Subject: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? Message-ID: Hi Python wincers: I know this info must be "out there", but I can't find it. I want to build a stripped-down version of Python2x.dll (preferably 2.4) for an ARM Pocket PC. I want to install the smallest possible Python on the unit, including expat & socket, but not much else. So, how do I build a new Python24.dll for PocketPC? Does the standard source distro from python.org have a build configuration I can use? Do I need to do anything terribly special? Can someone point me to the canonical web page on this topic? Much appreciated, Jesse. From stewart.midwinter at gmail.com Thu Feb 10 04:34:58 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Thu Feb 10 04:35:01 2005 Subject: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? In-Reply-To: References: Message-ID: Welcome Jesse: well there certainly is a version of Python2.x for Pocket PC. The latest built version is 2.3.4; I'm using it myself on a Toshiba e830. You can find it here: http://fore.validus.com/~kashtan/, I'm building an app that uses socket communications with a client talking via WiFi to a server on a network. the main issue is not the socket per se, but rather the interaction of threads with my Tkinter GUI... Look in the archives on this list and you'll find lots of goodies. Couple gotchas: 1. you can install the whole thing to an external card, but make sure you edit the Python Install.lnk file to reflect the location before running it or else double-clicking in Explorer won't work. 2. your source code apps can go anywhere, but you'll need to add a line to add your python location to the sys.path, and another so Tkinter can be found. Best way is to create a module in your docs folder called, say, pythonrc.py, and in it put something like: import sys sys.path.append('\\SD Card\\Program Files\\Python\\Lib') sys.path.append('\\SD Card\\Program Files\\Python\\Lib\\python23.zip\\lib-tk') sys.path.append('\\SD Card\\') docHome = ('\\My Documents\\Python') Also, so that I can run my apps on either PocketPC or Windows desktop at my leisure, I add the following to them: if __name__ == '__main__': OS = os.name.lower() if OS == 'ce': import osce import pythonrc #contains the sys.path.append() commands import Pmw docHome = pythonrc.docHome else: # we are on the desktop global thisDir thisDir = sys.path[0] docHome = thisDir sys.path.append('c:\\programs') import Pmw Note that there's an osce.py that you can find on this list. Also, Ed Blake has put together a mini version of idle called idleCE, which youcan find at: http://kitsu.petesdomain.com/files/IdleCE.py there's also a VGA version of the PythonCE.exe, though you may need a utility like ForceHiRes to get it to actually run in hi-res mode. I've found that the Tkinter apps look *much* nicer when run that way. cheers S -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Sun Feb 13 06:31:06 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Sun Feb 13 06:31:09 2005 Subject: [PythonCE] drop-up menus? Message-ID: Most applications for Pocket PC follow a design wherein the menus are along the bottom of the screen, so menu entries don't drop down, they drop up. I wonder what would be involved in getting Tkinter or Pmw menus to have that behaviour? cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From jdavis at wgen.net Tue Feb 15 18:42:09 2005 From: jdavis at wgen.net (Jesse Davis) Date: Tue Feb 15 18:42:12 2005 Subject: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? Message-ID: Thanks for the help. Is it possible to significantly shrink Python23.dll? Under my current build, it's 1252k, which is a big chunk of a PPC's memory. I don't need the console, or even bytecode-compilation, if all I run are pre-compiled pyc's, right? So I'm hoping there's a smaller "minimal" build for me. I've tried removing some of the .obj files from PCbuild\WinCE\binaries\ARMRel420\pythoncore, then running lib & link, but all the object files I've tried so far are referred to by obviously necessary files, like import.obj. Is this as small as it gets? -----Original Message----- From: Stewart Midwinter [mailto:stewart.midwinter@gmail.com] Sent: Wednesday, February 09, 2005 10:35 PM To: Jesse Davis Cc: pythonce@python.org Subject: Re: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? Welcome Jesse: well there certainly is a version of Python2.x for Pocket PC. The latest built version is 2.3.4; I'm using it myself on a Toshiba e830. You can find it here: http://fore.validus.com/~kashtan/, I'm building an app that uses socket communications with a client talking via WiFi to a server on a network. the main issue is not the socket per se, but rather the interaction of threads with my Tkinter GUI... Look in the archives on this list and you'll find lots of goodies. Couple gotchas: 1. you can install the whole thing to an external card, but make sure you edit the Python Install.lnk file to reflect the location before running it or else double-clicking in Explorer won't work. 2. your source code apps can go anywhere, but you'll need to add a line to add your python location to the sys.path, and another so Tkinter can be found. Best way is to create a module in your docs folder called, say, pythonrc.py, and in it put something like: import sys sys.path.append('\\SD Card\\Program Files\\Python\\Lib') sys.path.append('\\SD Card\\Program Files\\Python\\Lib\\python23.zip\\lib-tk') sys.path.append('\\SD Card\\') docHome = ('\\My Documents\\Python') Also, so that I can run my apps on either PocketPC or Windows desktop at my leisure, I add the following to them: if __name__ == '__main__': OS = os.name.lower() if OS == 'ce': import osce import pythonrc #contains the sys.path.append() commands import Pmw docHome = pythonrc.docHome else: # we are on the desktop global thisDir thisDir = sys.path[0] docHome = thisDir sys.path.append('c:\\programs') import Pmw Note that there's an osce.py that you can find on this list. Also, Ed Blake has put together a mini version of idle called idleCE, which youcan find at: http://kitsu.petesdomain.com/files/IdleCE.py there's also a VGA version of the PythonCE.exe, though you may need a utility like ForceHiRes to get it to actually run in hi-res mode. I've found that the Tkinter apps look *much* nicer when run that way. cheers S -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From tlesher at gmail.com Tue Feb 15 18:45:49 2005 From: tlesher at gmail.com (Tim Lesher) Date: Tue Feb 15 18:45:51 2005 Subject: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? In-Reply-To: References: Message-ID: <9613db60050215094561fa7741@mail.gmail.com> On Tue, 15 Feb 2005 12:42:09 -0500, Jesse Davis wrote: > Thanks for the help. Is it possible to significantly shrink > Python23.dll? Under my current build, it's 1252k, which is a big chunk > of a PPC's memory. I don't need the console, or even > bytecode-compilation, if all I run are pre-compiled pyc's, right? So > I'm hoping there's a smaller "minimal" build for me. > > I've tried removing some of the .obj files from > PCbuild\WinCE\binaries\ARMRel420\pythoncore, then running lib & link, > but all the object files I've tried so far are referred to by obviously > necessary files, like import.obj. Is this as small as it gets? I put a minimal bit of effort into this a few months ago, and got it down to 900k or so, but it wasn't obvious how to cut it further. I'm certainly interested in such an effort. -- Tim Lesher From jdavis at wgen.net Tue Feb 15 18:48:08 2005 From: jdavis at wgen.net (Jesse Davis) Date: Tue Feb 15 18:48:14 2005 Subject: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? Message-ID: That's good to hear -- would you mind posting how you did it? -----Original Message----- From: Tim Lesher [mailto:tlesher@gmail.com] Sent: Tuesday, February 15, 2005 12:46 PM To: Jesse Davis Cc: Stewart Midwinter; pythonce@python.org Subject: Re: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? On Tue, 15 Feb 2005 12:42:09 -0500, Jesse Davis wrote: > Thanks for the help. Is it possible to significantly shrink > Python23.dll? Under my current build, it's 1252k, which is a big > chunk of a PPC's memory. I don't need the console, or even > bytecode-compilation, if all I run are pre-compiled pyc's, right? So > I'm hoping there's a smaller "minimal" build for me. > > I've tried removing some of the .obj files from > PCbuild\WinCE\binaries\ARMRel420\pythoncore, then running lib & link, > but all the object files I've tried so far are referred to by > obviously necessary files, like import.obj. Is this as small as it gets? I put a minimal bit of effort into this a few months ago, and got it down to 900k or so, but it wasn't obvious how to cut it further. I'm certainly interested in such an effort. -- Tim Lesher From tlesher at gmail.com Tue Feb 15 18:59:31 2005 From: tlesher at gmail.com (Tim Lesher) Date: Tue Feb 15 18:59:34 2005 Subject: [PythonCE] Build minimized Python2x.dll for WinCE/PPC? In-Reply-To: References: Message-ID: <9613db6005021509593f968866@mail.gmail.com> On Tue, 15 Feb 2005 12:48:08 -0500, Jesse Davis wrote: > That's good to hear -- would you mind posting how you did it? I don't know whether I still have it, but I recall that eliminating Cmd wasn't too hard, and it was a pretty decent-sized chunk. I'll look for it when I get home. -- Tim Lesher From tech at zip51.com Thu Feb 17 17:06:50 2005 From: tech at zip51.com (Bill) Date: Thu Feb 17 14:10:00 2005 Subject: [PythonCE] Graphics problem Message-ID: <4214C11A.6030300@zip51.com> I am using a 2200 iPAQ with Win 2003. Unfortunitly, the only graphic format I have been able to use is GIF using PhotoImage in Tk. My problem is that some pictures display scrambled on the ipaq but not on a normal pc. If I adjust the pixel size a little they seem to work. Any Ideas? Does anyone know how I might use a PNG format in stead of GIF? Thanks for your time. From stewart.midwinter at gmail.com Thu Feb 17 17:46:11 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Thu Feb 17 17:46:14 2005 Subject: [PythonCE] Graphics problem In-Reply-To: <4214C11A.6030300@zip51.com> References: <4214C11A.6030300@zip51.com> Message-ID: PhotoImage only accepts .gif images. You can use PIL from effbot.org if you want to use jpg (not sure if it will accept .png). cheers Stewart Panajachel, Guatemala On Thu, 17 Feb 2005 08:06:50 -0800, Bill wrote: > I am using a 2200 iPAQ with Win 2003. Unfortunitly, the only graphic > format I have been able to use is GIF using PhotoImage in Tk. My > problem is that some pictures display scrambled on the ipaq but not on a > normal pc. If I adjust the pixel size a little they seem to work. > > Any Ideas? > > Does anyone know how I might use a PNG format in stead of GIF? -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From anthony.tuininga at gmail.com Fri Feb 18 22:35:53 2005 From: anthony.tuininga at gmail.com (Anthony Tuininga) Date: Fri Feb 18 22:36:05 2005 Subject: [PythonCE] PythonCE for Python 2.4? Message-ID: <703ae56b050218133526efafd4@mail.gmail.com> Does anyone know of any attempts to support PythonCE under Python 2.4? There doesn't appear to be any unified development project dealing with this but perhaps I'm missing something -- I certainly hope so! I would be willing to assist/test as needed. I'm also willing to work on this myself if I am given a few pointers to material for research. Thanks in advance for any information you might be able to provide. From bkc at murkworks.com Fri Feb 18 23:14:29 2005 From: bkc at murkworks.com (Brad Clements) Date: Fri Feb 18 22:52:58 2005 Subject: [PythonCE] PythonCE for Python 2.4? In-Reply-To: <703ae56b050218133526efafd4@mail.gmail.com> Message-ID: <42161D16.11069.214C7D4A@coal.murkworks.com> On 18 Feb 2005 at 14:35, Anthony Tuininga wrote: > Does anyone know of any attempts to support PythonCE under Python 2.4? > There doesn't appear to be any unified development project dealing > with this but perhaps I'm missing something -- I certainly hope so! I > would be willing to assist/test as needed. I'm also willing to work on > this myself if I am given a few pointers to material for research. > Thanks in advance for any information you might be able to provide. Yes, but it's in chip-away mode. I have the base Python 2.3 in subversion, then I applied all the CE patches and checked that in. My plan is to check in Python 2.4 and diff apply the CE changes from 2.3 to 2.4 My 2.3 builds work, and I left off working on the path issue, specifically handling storage card installations on non english devices. Then, I kind of got sidetracked on PyChrome -- Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax http://www.wecanstopspam.org/ AOL-IM: BKClements From anthony.tuininga at gmail.com Fri Feb 18 23:42:37 2005 From: anthony.tuininga at gmail.com (Anthony Tuininga) Date: Fri Feb 18 23:43:23 2005 Subject: [PythonCE] PythonCE for Python 2.4? In-Reply-To: <42161D16.11069.214C7D4A@coal.murkworks.com> References: <703ae56b050218133526efafd4@mail.gmail.com> <42161D16.11069.214C7D4A@coal.murkworks.com> Message-ID: <703ae56b05021814429dc2d91@mail.gmail.com> I have no difficulty building the Python 2.3 builds either. My "dumb" attempts of simply building Python 2.4 directly and with the patches from Python 2.3 applied both failed. Hopefully your attempt to diff apply the patches is more successful. Do you have a set of diffs or do you have to generate those first? Any timeline on any of this? I realize there are an infinite number of distractions available.... :-) On Fri, 18 Feb 2005 17:14:29 -0500, Brad Clements wrote: > On 18 Feb 2005 at 14:35, Anthony Tuininga wrote: > > > Does anyone know of any attempts to support PythonCE under Python 2.4? > > There doesn't appear to be any unified development project dealing > > with this but perhaps I'm missing something -- I certainly hope so! I > > would be willing to assist/test as needed. I'm also willing to work on > > this myself if I am given a few pointers to material for research. > > Thanks in advance for any information you might be able to provide. > > Yes, but it's in chip-away mode. > > I have the base Python 2.3 in subversion, then I applied all the CE patches and > checked that in. > > My plan is to check in Python 2.4 and diff apply the CE changes from 2.3 to 2.4 > > My 2.3 builds work, and I left off working on the path issue, specifically handling storage > card installations on non english devices. > > Then, I kind of got sidetracked on PyChrome > > -- > Brad Clements, bkc@murkworks.com (315)268-1000 > http://www.murkworks.com (315)268-9812 Fax > http://www.wecanstopspam.org/ AOL-IM: BKClements > > From tech at zip51.com Sat Feb 19 22:27:32 2005 From: tech at zip51.com (Bill) Date: Sat Feb 19 19:31:11 2005 Subject: [PythonCE] Icon Question Message-ID: <4217AF44.9060607@zip51.com> Does anyone know how to set the icon that is displayed in the start menu or file menu for .py files? I tried the Registry, but could'nt seem to make it work. Thanks for your time, Bill From leovivi2 at ig.com.br Sun Feb 20 16:44:24 2005 From: leovivi2 at ig.com.br (leovivi2) Date: Sun Feb 20 17:11:11 2005 Subject: [PythonCE] help unsubscribe Message-ID: <20050220_154424_058737.leovivi2@ig.com.br> From anne.wangnick at t-online.de Mon Feb 21 21:13:16 2005 From: anne.wangnick at t-online.de (anne.wangnick@t-online.de) Date: Mon Feb 21 21:13:30 2005 Subject: AW: [PythonCE] Icon Question In-Reply-To: <4217AF44.9060607@zip51.com> Message-ID: I guess you HKCR/.py key is set to Python.File? Well, then you can set HKCR/Python.File/DefaultIcon to, e.g., \Program Files\Python\Lib\Python.exe,0 Regards, Sebastian -----Urspr?ngliche Nachricht----- Von: pythonce-bounces+anne.wangnick=t-online.de@python.org [mailto:pythonce-bounces+anne.wangnick=t-online.de@python.org]Im Auftrag von Bill Gesendet: Samstag, 19. Februar 2005 22:28 An: pythonce@python.org Betreff: [PythonCE] Icon Question Does anyone know how to set the icon that is displayed in the start menu or file menu for .py files? I tried the Registry, but could'nt seem to make it work. Thanks for your time, Bill _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce From isrgish at fastem.com Tue Feb 22 00:47:24 2005 From: isrgish at fastem.com (Isr Gish) Date: Tue Feb 22 00:48:14 2005 Subject: [PythonCE] Icon Question Message-ID: <20050221234812.40F501E4003@bag.python.org> >From: "Bill" >Subject: [PythonCE] Icon Question > > Does anyone know how to set the icon that is displayed in the start >menu or file menu for .py files? > >I tried the Registry, but could'nt seem to make it work. Make These entries in the registry. [HKEY_CLASSES_ROOT\.py] default ="PySource" [HKEY_CLASSES_ROOT\.pyc] @="PySource" [HKEY_CLASSES_ROOT\PySource] @="Python Source" [HKEY_CLASSES_ROOT\PySource\shell] [HKEY_CLASSES_ROOT\PySource\shell\open] [HKEY_CLASSES_ROOT\PySource\shell\open\command] @="\"\\Program Files\\Python\\lib\\python.exe\" \"%1\" %*" [HKEY_CLASSES_ROOT\PySource\DefaultIcon] @="\\Program Files\\Python\\lib\\python.exe, 0" You should chnge the reference of python.exe To the location of your executable. If you need any more help feel free to ask. All the best Isr > > >Thanks for your time, > Bill >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce From tech at zip51.com Tue Feb 22 07:42:00 2005 From: tech at zip51.com (Bill) Date: Tue Feb 22 04:46:12 2005 Subject: [PythonCE] Using Tix Message-ID: <421AD438.3000706@zip51.com> I tried to use the Tix ComboBox on my Pocket PC and got the following error: File "binaries\lib\lib-tk\Tix.py", line 210, in __init__ _tkinter.TclError: can't find package Tix the Tix.pyc file is in the Zip python file. Any Ideas? Thanks for your time, Bill From stewart.midwinter at gmail.com Tue Feb 22 22:36:01 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Tue Feb 22 22:36:04 2005 Subject: [PythonCE] Using Tix In-Reply-To: <421BC533.7030303@zip51.com> References: <421AD438.3000706@zip51.com> <421BC533.7030303@zip51.com> Message-ID: Tix works for me. See test script... #test-tix.py import pythonrc import Tix s = Tix.Button(text = "Tix!") s.pack() s.mainloop() #pythonrc.py, located in docHome along with all other Python scripts import sys sys.path.append('\\SD Card\\Program Files\\Python\\Lib') sys.path.append('\\SD Card\\Program Files\\Python\\Lib\\python23.zip\\lib-tk') docHome = ('\\My Documents\\Python') cheers S > The file I am talking about is Tix.pyc under the lib-tk driectory in the > zip file. I didn't add it. Is Tix suposed to be functional in this package? -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From stewart.midwinter at gmail.com Wed Feb 23 03:10:45 2005 From: stewart.midwinter at gmail.com (Stewart Midwinter) Date: Wed Feb 23 03:37:37 2005 Subject: [PythonCE] Using Tix In-Reply-To: <421C025B.9080509@zip51.com> References: <421AD438.3000706@zip51.com> <421BC533.7030303@zip51.com> <421C025B.9080509@zip51.com> Message-ID: Bill: On Tue, 22 Feb 2005 20:11:07 -0800, Bill wrote: > Where did you get your python package? I got mine from sourceforge for > winCE 2003. Is there a better source? yes, try the source here: http://fore.validus.com/~kashtan/ and you should have more luck. Let us know how it goes. cheers, -- Stewart Midwinter stewart@midwinter.ca stewart.midwinter@gmail.com From james.burkert at gmail.com Wed Feb 23 05:56:56 2005 From: james.burkert at gmail.com (James Burkert) Date: Wed Feb 23 05:57:02 2005 Subject: [PythonCE] Numeric or Numarray Message-ID: <42aeae2205022220565902866b@mail.gmail.com> Hey folks, I'm having a tough time getting either Numeric or Numarray to work on my PDA. I just copy the source code over, set the sys.path to include the appropriate \Lib and \Src folders, but I get errors like "No module named multiarray" I'm guessing this part of the code is included in the C code that comes in the source code. Anybody have any pointers? I basically need to do a lot of linear algebra and matrix mathematics types of operations pretty quickly. Thanks! James -- ---------- James Burkert Systems Integration and Mission Operations Colorado Space Grant Consortium My Schedule: https://webcal.colorado.edu/command.shtml?calid=burkert&view=weekview From focke at slac.stanford.edu Wed Feb 23 16:12:24 2005 From: focke at slac.stanford.edu (Warren Focke) Date: Wed Feb 23 16:12:40 2005 Subject: [PythonCE] Numeric or Numarray In-Reply-To: <42aeae2205022220565902866b@mail.gmail.com> References: <42aeae2205022220565902866b@mail.gmail.com> Message-ID: Yes, the "heavy lifting" for both is done in C. Has anyone tried to compile these for PPC? I'd give it a shot if I had a working Windos system. :-P If you have a JVM, you might try jython/jnumeric. Jython (http://www.jython.org/) is maintined, jnumeric (http://sourceforge.net/projects/jnumerical/) seems not to be, last update was in 2002. Warren Focke On Tue, 22 Feb 2005, James Burkert wrote: > Hey folks, > > I'm having a tough time getting either Numeric or Numarray to work on > my PDA. I just copy the source code over, set the sys.path to include > the appropriate \Lib and \Src folders, but I get errors like "No > module named multiarray" I'm guessing this part of the code is > included in the C code that comes in the source code. Anybody have any > pointers? I basically need to do a lot of linear algebra and matrix > mathematics types of operations pretty quickly. > > Thanks! > James > > -- > ---------- > James Burkert > Systems Integration and Mission Operations > Colorado Space Grant Consortium > > My Schedule: https://webcal.colorado.edu/command.shtml?calid=burkert&view=weekview > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > From papipo at gmail.com Mon Feb 28 16:51:10 2005 From: papipo at gmail.com (=?ISO-8859-1?Q?Rodrigo_Alvarez_Fern=E1ndez?=) Date: Mon Feb 28 16:51:12 2005 Subject: [PythonCE] opening .cdb database files Message-ID: <6d2bdda050228075153b07bb8@mail.gmail.com> Hi! I need to use .cdb files as databases in my app. They are created by ActiveSync when a .mdb (M$ access database) file is copied into the PDA. I've found this: http://cvs.sourceforge.net/viewcvs.py/pythonce/pywincedb/ But, I neither know if it is what I need, and how to use it. Please, give me some advice. I've been searching 2 days and I found nothing. Thanks, Rodrigo. From jdavis at wgen.net Mon Feb 28 21:40:33 2005 From: jdavis at wgen.net (Jesse Davis) Date: Mon Feb 28 21:40:37 2005 Subject: [PythonCE] Linker errors building PyWin32 for CE (ARMRel420) Message-ID: Salutations, I'm getting linker errors (3 unresolved external symbols) building PyWin32. I followed the instructions on Kashtan's page, so I "nmake all" from PCbuild\WinCE. Everything builds fine until nmake reaches makefile.pywintypes (output included below). It tries to link pywintypes.dll but fails to resolve symbols PyWinMethod_NewWAVEFORMATEXType, PyWAVEFORMATEXType, & PyDEVMODEType, which are required by PyWinTypesmodule.obj. The first two symbols can be found in PyWAVEFORMATEX.cpp, the third in PyDEVMODE.cpp. So adding PyWAVEFORMATEX.cpp to makefile.pywintypes takes care of two of the symbols, but PyDEVMODE.cpp can't compile (output below). And besides, why should I have to add things to the makefile? The compile errors in PyDEVMODE.cpp seem related to differences in the wingdi.h for Windows & WinCE. For example, PyDEVMODE.cpp refers to _devicemodeW.dmPosition. In the Windows wingdi.h, _devicemodeW has such a member; in WinCE's wingdi.h, it's absent. There are many other members that are absent or have different types in the two headers, meaning I can't build PyDEVMODE.cpp, so I can't satisfy PyWinTypesmodule.obj's imports. However, I imagine others can build PyWin32 without lots of tweaks, either to makefile.pywintypes or to PyDEVMODE.cpp. What am I doing wrong? Appreciations, Jesse. ************ link.exe output on original makefile.pywintypes: ************ Building pywintypes link.exe @C:\DOCUME~1\jdavis\LOCALS~1\Temp\nma00560. Creating library binaries\ARMRel420\pywintypes\pywintypes.lib and object binaries\ARMRel420\pywin types\pywintypes.exp LINK : warning LNK4049: locally defined symbol "PyCE_SystemTimeToCTime" imported LINK : warning LNK4049: locally defined symbol "PyCE_UnixTimeToFileTime" imported PyWinTypesmodule.obj : error LNK2001: unresolved external symbol "struct _object * __cdecl PyWinMeth od_NewWAVEFORMATEX(struct _object *,struct _object *)" (?PyWinMethod_NewWAVEFORMATEX@@YAPAU_object@@ PAU1@0@Z) PyWinTypesmodule.obj : error LNK2001: unresolved external symbol "struct _typeobject PyWAVEFORMATEXT ype" (?PyWAVEFORMATEXType@@3U_typeobject@@A) PyWinTypesmodule.obj : error LNK2001: unresolved external symbol "struct _typeobject PyDEVMODEType" (?PyDEVMODEType@@3U_typeobject@@A) binaries\ARMRel420\pywintypes\pywintypes.dll : fatal error LNK1120: 3 unresolved externals NMAKE : fatal error U1077: 'link.exe' : return code '0x460' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft eMbedded C++ 4.0\COMMON\EVC\bin\NMAKE.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft eMbedded C++ 4.0\COMMON\EVC\bin\NMAKE.EXE"' : return code '0x2' Stop. ************ clarm.exe output after adding PyDEVMODE.cpp to makefile.pywintypes: ************ clarm.exe /O2 /D "ARM" /D "_ARM_" /D "NDEBUG" /I ..\..\Include /I ..\..\PC\WinCE /D Py_ENAB LE_SHARED /D _WIN32_WCE=420 /D WIN32_PLATFORM_PSPC=420 /D UNDER_CE=420 /D UNICODE /D _UNICODE /D _ USRDLL /D WIN32PPC /D WIN32 /D STRICT /D INTERNATIONAL /D USA /D INTLMSG_CODEPAGE /nologo /W3 /Fp" binaries\ARMRel420\pywintypes\pywintypes.pch" /Fo"binaries\ARMRel420\pywintypes\\" /c /D BUILD_PYWIN TYPES /D /Oxs C:\share\pywin32\win32\src\PyDEVMODE.cpp PyDEVMODE.cpp c:\share\pywin32\win32\src\pydevmode.cpp(26) : error C2039: 'dmPosition' : is not a member of '_devi cemodeW' c:\program files\windows ce tools\wce420\pocket pc 2003\include\armv4\wingdi.h(427) : see de claration of '_devicemodeW' c:\share\pywin32\win32\src\pydevmode.cpp(26) : error C2228: left of '.x' must have class/struct/unio n type c:\share\pywin32\win32\src\pydevmode.cpp(26) : error C2440: 'initializing' : cannot convert from 'ch ar [40]' to 'int' This conversion requires a reinterpret_cast, a C-style cast or function-style cast .....and many other errors ************ Relevant environment variables ************ CC=clarm.exe CESUBSYSTEM=windowsce,4.20 CEVERSION=420 CFG=ARMREL INCLUDE=C:\Program Files\Windows CE Tools\WCE420\pocket pc 2003\include\armv4;C:\Program Files\Windo ws CE Tools\WCE420\pocket pc 2003\MFC\include;C:\Program Files\Windows CE Tools\WCE420\pocket pc 200 3\ATL\include; LIB=C:\Program Files\Windows CE Tools\WCE420\pocket pc 2003\lib\armv4;C:\Program Files\Windows CE To ols\WCE420\pocket pc 2003\MFC\lib\armv4;C:\Program Files\Windows CE Tools\WCE420\pocket pc 2003\ATL\ lib\armv4; OS=Windows_NT OSVERSION=WCE420 PLATFORM=pocket pc 2003 PYWIN32ROOT=C:\share\pywin32 SDKROOT=C:\Program Files\Windows CE Tools TARGETCPU=ARM TARGET_OSVERSION=420 WCEROOT=C:\Program Files\Microsoft eMbedded C++ 4.0