From strubel@photonfocus.com Tue Oct 1 09:02:20 2002 From: strubel@photonfocus.com (Martin Strubel) Date: Tue, 1 Oct 2002 10:02:20 +0200 Subject: [PythonCE] Re: Python and Win CE 3.0 (ARM) References: <3D981120.13888.C9B4652@localhost> Message-ID: <004101c26920$df9ca450$5401a8c0@martinstest> > > aygshell is being pulled in by the PPC specific command bar functionality. You should > probably comment that out of win32gui and rebuild without the aygshell.lib in the linker > list. > > Probably easiest to remove the .lib, link, see what unresolved externs you have and > comment them out of win32gui If I remember right, it was some other file having many references to all these SH calls. But in the meantime I got Telion's modifications. Will hopefully get to try this after work. I found quite many programs being binary compatible to the HPC2000 (i.e. my jornada 710) but depending on the aygshell.dll so that I am thinking of hacking some emulation. Finally found the headers in one of these SDKs from M$, so it shouldn't be too hard. If someone has already done that, please let me know! Thanks & Greetings from cold, but sunny Switzerland, - Strubi From telionce@yahoo.com Wed Oct 2 17:48:39 2002 From: telionce@yahoo.com (Telion) Date: Wed, 2 Oct 2002 09:48:39 -0700 (PDT) Subject: [PythonCE] Current Directory emulation Message-ID: <20021002164839.19390.qmail@web21101.mail.yahoo.com> Here is how to emulate Current Directory so that some scripts would run without modification on CE. If you include following code at the beginning of site.py, os.getcwd(), os.chdir() will be emulated. Also, it wrap os.listdir(). Same thing can be applied to other os functions like; mkdir, rename, chmod, etc..etc... What do you think of this idea? Any suggestion and/or improved code? ### os.getcwd, os.chdir emulation + os.listdir fix ### import os os.cwd = "\\" def __getcwd(): return os.cwd os.getcwd = __getcwd def __fullpath(p): if not p or type(p) != str: raise OSError, "Invalid path" if not p[0] in "/\\": p = os.path.join(os.cwd,p) p = p.replace('/','\\') pl = p.split('\\') #print pl i =0 while 1: if i >= len(pl): break #print i, pl[i] if pl[i] =='..': try: pl.pop(i) pl.pop(i-1) except: raise OSError, "Invalid path" i -= 1 if i < 0: raise OSError, "Invalid path" elif not pl[i]: pl.pop(i) else: i += 1 return "\\"+"\\".join(pl) def __chdir(p): fullpath = __fullpath(p) if os.path.isdir(fullpath): os.cwd = fullpath else: raise OSError, "Invalid path" os.chdir = __chdir # os.listdir may fails when "\\storage card\\../" is the given path # It does not fail when "\\wndows\\..\\" or "/Program files/../" # Probably something related with CF or memory card. # So, give the aboslute path, instead. os.oldlistdir = os.listdir def __listdirfix(p): if p != '': p = __pathfix(p) #print p if p == "\\": p = '' return os.oldlistdir(p) os.listdir = __listdirfix #### END OF CE FIX ### ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From goodey27@juno.com Wed Oct 2 17:56:43 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Wed, 2 Oct 2002 12:56:43 -0400 Subject: [PythonCE] input And raw_input Message-ID: <20021002.125729.1960.3.goodey27@juno.com> I'm a Newbie to Python. 1) I was trying to use the input function... x = int(raw_input("enter your age. ")) and this is how the display looks after pressing ENTER enter your age. Traceback (most recent call last): File "\Program Files\Python\lib\pcceshell.py", line 457, in Interact exec codeOb in locals EOFError: EOF when reading a line 2) Cant get this string to work on CE ordinal is not in range(128) I've tried using encoding don't remember exactly what but what I tried didn't work. Any help would be greatly appreciated. Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Wed Oct 2 18:26:35 2002 From: telionce@yahoo.com (Telion) Date: Wed, 2 Oct 2002 10:26:35 -0700 (PDT) Subject: [PythonCE] input And raw_input Message-ID: <20021002172635.45813.qmail@web21105.mail.yahoo.com> goodey27@juno.com wrote: (2002/10/02 12:56) > >I'm a Newbie to Python. >1) I was trying to use the input function... > >x = int(raw_input("enter your age. ")) > >and this is how the display looks after pressing ENTER > >enter your age. Traceback (most recent call last): > File "\Program Files\Python\lib\pcceshell.py", line 457, in Interact > exec codeOb in locals >EOFError: EOF when reading a line > > >2) Cant get this string to work on CE >ordinal is not in range(128) >I've tried using encoding don't remember exactly what but what I tried >didn't work. > >Any help would be greatly appreciated. > >Isr > Please tell us about following points: What kind of machine are you using? Is it CE2.11 or CE3.0? HPC or PPC,PsPC? What is the CPU, ARM, MIPS, or SHx? Which version of Python you are running, 1.52, 2.2, other? Where did you downloaded from? Also, did you set 'encoding' in site.py? ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From telionce@yahoo.com Wed Oct 2 19:02:34 2002 From: telionce@yahoo.com (Telion) Date: Wed, 2 Oct 2002 11:02:34 -0700 (PDT) Subject: [PythonCE] Current Directory emulation (fix) Message-ID: <20021002180234.23934.qmail@web21102.mail.yahoo.com> I pasted wrong one in the earlier post. Please try this one instead. ### os.getcwd, os.chdir emulation + os.listdir fix ### import os os.cwd = "\\" def __getcwd(): return os.cwd os.getcwd = __getcwd def __fullpath(p): if not p or type(p) != str: raise OSError, "Invalid path" if not p[0] in "/\\": p = os.path.join(os.cwd,p) p = p.replace('/','\\') pl = p.split('\\') #print pl i =0 while 1: if i >= len(pl): break #print i, pl[i] if pl[i] =='..': try: pl.pop(i) pl.pop(i-1) except: raise OSError, "Invalid path" i -= 1 if i < 0: raise OSError, "Invalid path" elif not pl[i]: pl.pop(i) else: i += 1 return "\\"+"\\".join(pl) def __chdir(p): fullpath = __fullpath(p) if os.path.isdir(fullpath): os.cwd = fullpath else: raise OSError, "Invalid path" os.chdir = __chdir # os.listdir may fails when "\\storage card\\../" is the given path # It does not fail when "\\wndows\\..\\" or "/Program files/../" # Probably something related with CF or memory card. # So, give the aboslute path, instead. os.oldlistdir = os.listdir def __listdirfix(p): if p != '': p = __fullpath(p) #print p if p == "\\": p = '' return os.oldlistdir(p) os.listdir = __listdirfix #### END OF CE FIX ### ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From brian@ablelinktech.com Wed Oct 2 23:29:15 2002 From: brian@ablelinktech.com (Brian Brown) Date: Wed, 02 Oct 2002 16:29:15 -0600 Subject: [PythonCE] Python CE and GUI work Message-ID: <3D9B733B.2060807@ablelinktech.com> Greetings! I'm a long type python user, but just recently started working for a company that does a lot of CE development... so now I'm kinda out of my element :) This company has been doing all evb development, but they are open to moving to a more unified platform so we can support CE, Windows, and OSX. Python in on the table for the language of choice. I've been able to get the distributions running on an ARM and a MIPS unit, using Brad's distro for ARM and grabbing Telion's stuff for MIPS. What I would really like to do is be able to run pyui + sdl for a gui interface (really I want wxPython... but I don't have the c++ skills to help a lot, at least not yet :). That also entails PIL and pygame... has anyone tried to put any of these on CE? I'm gonna give it a shot, but if anyone has any horror stories or helpful hints, it would be greatly appreciated. Anything I'm able to get going I'll post if anyone is interested. Also, if anyone has any other suggestions for GUI stuff that could work with our platform requirements, I'd be all ears ;) Thanks for the great work that I get to benefit from! Brian From bkc@murkworks.com Wed Oct 2 23:44:25 2002 From: bkc@murkworks.com (Brad Clements) Date: Wed, 02 Oct 2002 18:44:25 -0400 Subject: [PythonCE] Python CE and GUI work In-Reply-To: <3D9B733B.2060807@ablelinktech.com> Message-ID: <3D9B3E67.18240.190459DD@localhost> On 2 Oct 2002 at 16:29, Brian Brown wrote: > I'm a long type python user, but just recently started working for a > company that does a lot of CE development... so now I'm kinda out of my > element :) Naww.. > > do is be able to run pyui + sdl for a gui interface (really I want > wxPython... but I don't have the c++ skills to help a lot, at least not yet > :). That also entails PIL and pygame... has anyone tried to put any of > these on CE? I'm gonna give it a shot, but if anyone has any horror stories > or helpful hints, it would be greatly appreciated. Anything I'm able to get > going I'll post if anyone is interested. I really want to see wxPython on there so I can move PythonCard over. but, wxWindows for CE isn't available yet, and frankly I think that project is dead. I don't think wxPython requires PIL or pygame. Unless you're saying you also need those goodies. > Also, if anyone has any other suggestions for GUI stuff that could work > with our platform requirements, I'd be all ears ;) Thanks for the great > work that I get to benefit from! Well, CE and Windows both have win32gui.. You can use the CreateDialogIndirect() functionality, if all you need is entry forms. ugh. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From goodey27@juno.com Thu Oct 3 01:47:58 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Wed, 2 Oct 2002 20:47:58 -0400 Subject: [PythonCE] input And raw_input Message-ID: <20021002.205149.440.0.goodey27@juno.com> I'm using an iPaq 3670 running pocketpc 2002 it has a strong arm cpu python version 2.2 I'm not sure from where I dowloaded put I think I followed a link from www.python.org I didn't set encoding in site.py I dont know anything about that Isr On Wed, 2 Oct 2002 10:26:35 -0700 (PDT) Telion writes: > goodey27@juno.com wrote: > (2002/10/02 12:56) > > > >I'm a Newbie to Python. > >1) I was trying to use the input function... > > > >x = int(raw_input("enter your age. ")) > > > >and this is how the display looks after pressing ENTER > > > >enter your age. Traceback (most recent call last): > > File "\Program Files\Python\lib\pcceshell.py", line 457, in > Interact > > exec codeOb in locals > >EOFError: EOF when reading a line > > > > > >2) Cant get this string to work on CE > >ordinal is not in range(128) > >I've tried using encoding don't remember exactly what but what I > tried > >didn't work. > > > >Any help would be greatly appreciated. > > > >Isr > > > > Please tell us about following points: > > What kind of machine are you using? > Is it CE2.11 or CE3.0? > HPC or PPC,PsPC? > What is the CPU, ARM, MIPS, or SHx? > Which version of Python you are running, 1.52, 2.2, other? > Where did you downloaded from? > > Also, did you set 'encoding' in site.py? > > > > > ===== > Telion > - telionce@yahoo.com - > http://pages.ccapcable.com > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Thu Oct 3 06:11:33 2002 From: telionce@yahoo.com (Telion) Date: Wed, 2 Oct 2002 22:11:33 -0700 (PDT) Subject: [PythonCE] input And raw_input Message-ID: <20021003051133.38777.qmail@web21107.mail.yahoo.com> Well, maybe the version of Python you are using does not support input() or raw_input(), yet. If you are willing to do many testing, I can provide pcceshell.py that support these functions. It may take a few days since I don't have iPaq, and I'm not an expart who can get it right at first try. With these things in mind, if you want to go ahead, please send me the file, pcceshell.py that you are using. It should be in 'Lib' directory. I'll be able to tell more, when I see it. For the problem number 2, you should find site.py. If it's there search 'encoding'. And change the line: encoding = 'ascii' to encoding = 'mbcs' If you don't find site.py, let me know what it saids when you do: >>> import sys >>> sys.version and >>> sys.version_info also >>> sys.modules goodey27@juno.com wrote: (2002/10/02 20:47) >I'm using an iPaq 3670 running pocketpc 2002 >it has a strong arm cpu >python version 2.2 >I'm not sure from where I dowloaded put I think I followed a link from >www.python.org >I didn't set encoding in site.py I dont know anything about that > >Isr > >On Wed, 2 Oct 2002 10:26:35 -0700 (PDT) Telion >writes: >> goodey27@juno.com wrote: >> (2002/10/02 12:56) >> > >> >I'm a Newbie to Python. >> >1) I was trying to use the input function... >> > >> >x = int(raw_input("enter your age. ")) >> > >> >and this is how the display looks after pressing ENTER >> > >> >enter your age. Traceback (most recent call last): >> > File "\Program Files\Python\lib\pcceshell.py", line 457, in >> Interact >> > exec codeOb in locals >> >EOFError: EOF when reading a line >> > >> > >> >2) Cant get this string to work on CE >> >ordinal is not in range(128) >> >I've tried using encoding don't remember exactly what but what I >> tried >> >didn't work. >> > >> >Any help would be greatly appreciated. >> > >> >Isr >> > >> >> Please tell us about following points: >> >> What kind of machine are you using? >> Is it CE2.11 or CE3.0? >> HPC or PPC,PsPC? >> What is the CPU, ARM, MIPS, or SHx? >> Which version of Python you are running, 1.52, 2.2, other? >> Where did you downloaded from? >> >> Also, did you set 'encoding' in site.py? >> ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From bkc@murkworks.com Thu Oct 3 13:12:21 2002 From: bkc@murkworks.com (Brad Clements) Date: Thu, 03 Oct 2002 08:12:21 -0400 Subject: [PythonCE] input And raw_input In-Reply-To: <20021002.205149.440.0.goodey27@juno.com> Message-ID: <3D9BFBBF.419.1BE80815@localhost> On 2 Oct 2002 at 20:47, goodey27@juno.com wrote: > I'm using an iPaq 3670 running pocketpc 2002 > it has a strong arm cpu > python version 2.2 > I'm not sure from where I dowloaded put I think I followed a link from > www.python.org I didn't set encoding in site.py I dont know anything about > that > This is a PPC platform. Raw_input won't work because there isn't a real console. You can use a message box or dialog for input. win32gui also has a helper function described in the desktop pythonwin docs.. I forget what it's called, but it's meant for "one line prompt, one line input with ok,cancel" dialog.. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From telionce@yahoo.com Thu Oct 3 16:04:28 2002 From: telionce@yahoo.com (Telion) Date: Thu, 3 Oct 2002 08:04:28 -0700 (PDT) Subject: [PythonCE] Re Python CE and GUI work Message-ID: <20021003150428.99940.qmail@web21106.mail.yahoo.com> Hi Brian, I think you are the first person reporting about MIPS version. Let me know if you find bug or you have suggestions. For GUI, I do not really know if someone is working on something. As Brad has indicated, we can create GUI apps using win32gui module. Other than that, if you use calldll.pyd (and also maybe edll.py), You can access other gui library offered in dll form. I know there are game libararies for CE, gapi emulation. http://frog.flipcode.com/GAPI_Emu/download.html Personally, I'm thinking something like winpy (The name doesn't sound so good, though) It offers compatibility for other win32 platforms, and even UNIX type machine. But I have not really done anything, yet. I thinnk easiest way is to look for a Libarary already availabe for CE, and use it through calldll --- to begin with --- and then creating wrapper module later. As for wxPython, I have thought about it. I think there are a little to many requirements that have to be solvedto use it. But I'll be pretty happy if someone can make it run on CE. Conclusion: Brad (who has skill) seems to be busy these days, and me (who has a litlle more time) lacks in skill for porting something serious. So, we need someone else who has both skill and time. --- or --- Try to make use of GUI and/or Graphic libraries already ported on CE, and start from there. As I'm not a type who dreams and waits for eternity to be saved, I will go into later choice unless first choice becomes reality. Telion Brian Brown wrote: (2002/10/02 18:29) > >Greetings! > > I'm a long type python user, but just recently started working for a >company that does a lot of CE development... so now I'm kinda out of my >element :) > >This company has been doing all evb development, but they are open to >moving to a more unified platform so we can support CE, Windows, and >OSX. Python in on the table for the language of choice. I've been able >to get the distributions running on an ARM and a MIPS unit, using Brad's >distro for ARM and grabbing Telion's stuff for MIPS. What I would really >like to do is be able to run pyui + sdl for a gui interface (really I >want wxPython... but I don't have the c++ skills to help a lot, at least >not yet :). That also entails PIL and pygame... has anyone tried to put >any of these on CE? I'm gonna give it a shot, but if anyone has any >horror stories or helpful hints, it would be greatly appreciated. >Anything I'm able to get going I'll post if anyone is interested. > >Also, if anyone has any other suggestions for GUI stuff that could work >with our platform requirements, I'd be all ears ;) >Thanks for the great work that I get to benefit from! > >Brian > > Telion lac@ccapcable.com http://pages.ccapcable.com/lac/PythonCEj.html ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From goodey27@juno.com Thu Oct 3 17:34:47 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Thu, 3 Oct 2002 12:34:47 -0400 Subject: [PythonCE] input And raw_input Message-ID: <20021003.130611.928.0.goodey27@juno.com> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ----__JNP_000_2baa.1370.0780 Content-Type: text/plain Content-Transfer-Encoding: 7bit Telion > For the problem number 2, you should find site.py. > If it's there search 'encoding'. > And change the line: > encoding = 'ascii' > to > encoding = 'mbcs' I only have the copiled version of site.py (site.pyc) > If you don't find site.py, let me know what it saids > when you do: > >>> import sys > >>> sys.version > and > >>> sys.version_info > also > >>> sys.modules here are the results : sys.version = '2.2+ (#0, Jan 20 2002, 13:30:34) [MSC 32 bit (ARM)]' sys.version_info = (2, 3, 0, 'alpha', 1) sys.modules = {'cStringIO': , '__future__': , 'copy_reg': , 'sre_compile': , 'threading': , '_sre': , 'traceback': , 'site': , 'ce': , 'atexit': , 'code': , 'pcceshell': , '__main__': , 'win32event': , 'strop': , 're': , 'errno': , 'sre_constants': , 'imp': , 'os.path': , 'tokenize': , 'new': , 'ntpath': , 'stat': , 'string': , 'inspect': , 'cPickle': , 'repr': , 'sys': , '__builtin__': , 'hotshot': , 'hotshot._hotshot': None, 'codeop': , 'types': , 'struct': , 'thread': , 'StringIO': , 'os': , 'sre': , '_hotshot': , 'pydoc': , 'linecache': , 'token': , 'win32gui': , 'time': , 'exceptions': , 'sre_parse': , 'pickle': , 'marshal': , 'dis': } Isr ----__JNP_000_2baa.1370.0780 Content-Type: text/plain; name="pcceshell.py" Content-Transfer-Encoding: base64 IyBBICJQeXRob24gY29uc29sZSIgZm9yIFdpbmRvd3MgQ0UuDQojDQojIEFsc28gd29ya3Mgb24g TlQvOXggKHdpdGggYSBmZXcgbGltaXRhdGlvbnMhKSAtIHVzZWZ1bCBmb3IgZGVidWdnaW5nIQ0K Iw0KIyBVc2VkIDIgdGhyZWFkcyAtIG9uZSBmb3IgVUkgKGllLCB0aGUgbWVzc2FnZSBsb29wKSBh bmQgYW5vdGhlciB0aHJlYWQNCiMgZm9yIGV4ZWN1dGluZyBQeXRob24gY29kZS4gIFVzZXMgdmVy eSBzaW1wbGUgZXZlbnRzIHRvIHN5bmNocm9uaXNlIHRoZSAyIQ0KDQpteVdpbmRvd1RpdGxlID0g IlB5dGhvbiBDRSINCmltcG9ydCBzeXMsIG9zDQoNCg0KZnJvbSB3aW4zMmd1aSBpbXBvcnQgKg0K ZnJvbSB3aW4zMmV2ZW50IGltcG9ydCAqDQppbXBvcnQgc3RyaW5nDQppbXBvcnQgdGhyZWFkLCB0 aHJlYWRpbmcNCmltcG9ydCB0cmFjZWJhY2sNCmltcG9ydCBjb2RlICMgc3RkIG1vZHVsZSBmb3Ig Y29tcGlsYXRpb24gdXRpbGl0aWVzLg0KaW1wb3J0IG5ldw0KaW1wb3J0IGltcA0KDQppZiBzeXMu cGxhdGZvcm0gPT0gJ1BvY2tldCBQQ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pDQogICAgICAg IHNlbGYub3V0cHV0UXVldWVMb2NrLnJlbGVhc2UoKQ0KICAgICAgICB0cnk6DQogICAgICAgICAg ICBQb3N0TWVzc2FnZShzZWxmLmh3bmQsIFdNX1VTRVIsIDAsIDApDQogICAgICAgIGV4Y2VwdDoN CiAgICAgICAgICAgIHBhc3MNCiAgICAgICAgDQogICAgZGVmIFJ1bihzZWxmKToNCiAgICAgICAg UHVtcE1lc3NhZ2VzKCkgIA0KDQogICAgZGVmIEdldEVkaXRNZXNzYWdlTWFwKHNlbGYpOg0KICAg ICAgICByZXR1cm4ge1dNX0NIQVIgOiBzZWxmLk9uRWRpdENoYXJ9DQoNCiAgICBkZWYgR2V0UGFy ZW50TWVzc2FnZU1hcChzZWxmKToNCiAgICAgICAgbWFwPXt9DQogICAgICAgIG1hcFtXTV9ERVNU Uk9ZXSA9IHNlbGYuT25QYXJlbnREZXN0cm95DQogICAgICAgIG1hcFtXTV9TSVpFXSA9IHNlbGYu T25QYXJlbnRTaXplDQogICAgICAgIG1hcFtXTV9TRVRGT0NVU10gPSBzZWxmLk9uUGFyZW50U2V0 Rm9jdXMNCiAgICAgICAgbWFwW1dNX1VTRVJdID0gc2VsZi5PblBhcmVudFVzZXINCiAgICAgICAg bWFwW1dNX0NPTU1BTkRdID0gc2VsZi5PblBhcmVudENvbW1hbmQNCiAgICAgICAgbWFwW1dNX1NF VFRJTkdDSEFOR0VdPSBzZWxmLm9uUGFyZW50U2V0dGluZ0NoYW5nZQ0KICAgICAgICBtYXBbV01f QUNUSVZBVEVdID0gc2VsZi5vblBhcmVudEFjdGl2YXRlDQogICAgICAgIG1hcFtXTV9DUkVBVEVd ID0gc2VsZi5vblBhcmVudENyZWF0ZQ0KICAgICAgICByZXR1cm4gbWFwDQogICAgICAgIA0KICAg IGRlZiBJbml0KHNlbGYpOg0KICAgICAgICB0cnk6DQogICAgICAgICAgICBzZWxmLmhpbnN0ID0g R2V0TW9kdWxlSGFuZGxlKE5vbmUpDQogICAgICA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VBJTkZPKCkNCiAgICAgICAgICAgIGlmIG5vdCBTaXBHZXRJbmZvKHNpbmZvKToNCiAg ICAgICAgICAgICAgICByYWlzZSBSdW50aW1lRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3IgZnJvbSBT aXBHZXRJbmZvJykNCiAgICAgICAgICAgIHJlY3QgPSBzaW5mby5yY1Zpc2libGVEZXNrdG9wDQog ICAgICAgICAgICBjeCA9IHJlY3RbMl0gLSByZWN0WzBdICAjIHJpZ2h0IC0gbGVmdA0KICAgICAg ICAgICAgY3kgPSByZWN0WzNdIC0gcmVjdFsxXSAgIyBoZWlnaHQNCiAgICAgICAgICAgIHggPSBy ZWN0WzBdDQogICAgICAgICAgICB5ID0gcmVjdFsxXQ0KICAgICAgICAgICAgaWYgc2luZm8uZmR3 RmxhZ3MgJiBTSVBGX09OOg0KICAgICAgICAgICAgICAgIGN5IC09IDI2ICAgICAjIE1FTlVfSEVJ R0hUDQogICAgICAgICAgICAgICAgT3V0cHV0RGVidWdTdHJpbmcoJ1NJUEYgaXMgb25cclxuJykN CiAgICAgICAgZWxzZToNCiAgICAgICAgICAgIHN0eWxlID0gV1NfT1ZFUkxBUFBFRFdJTkRPVw0K ICAgICAgICAgICAgDQogICAgICAgIHNlbGYuaHduZCA9IENyZWF0ZVdpbmRvdyggc2VsZi5jbGFz c0F0b20sIG15V2luZG93VGl0bGUsIHN0eWxlLCBcDQogICAgICAgICAgICAgICAgICAgICAgICB4 LCB5LCBjeCwgY3ksIFwNCiAgICAgICAgICAgICAgICAgICAgICAgIDAsIDAsIHNlbGYuaGluc3Qs IE5vbmUpDQoNCiAgICAgICAgbGVmdCwgdG9wLCByaWdodCwgYm90dG9tID0gR2V0Q2xpZW50UmVj dChzZWxmLmh3bmQpDQoNCiMgICAgICAgcHJpbnQgc3lzLnBsYXRmb3JtLCB0eXBlKHN5cy5wbGF0 Zm9ybSkNCiAgICAgICAgaWYgc3lzLnBsYXRmb3JtPT0id2luY2UiOg0KICAgICAgICAgICAgc2Vs Zi5oQ21kQmFyID0gQ29tbWFuZEJhcl9DcmVhdGUoc2VsZi5oaW5zdCwgc2VsZi5od25kLCAxKQ0K ICAgICAgICAgICAgQ29tbWFuZEJhcl9JbnNlcnRNZW51YmFyKHNlbGYuaENtZEJhciwgc2VsZi5o aW5zdCwgSURSX01FTlUsIDApDQogICAgICAgICAgICBDb21tYW5kQmFyX0FkZEFkb3JubWVudHMo c2VsZi5oQ21kQmFyLCAwLCAwKQ0KICAgICAgICAgICAgdG9wID0gQ29tbWFuZEJhcl9IZWlnaHQo c2VsZi5oQ21kQmFyKQ0KICAgICAgICBlbGlmIGlzUG9ja2V0UEM6DQogICAgICAgICAgICAjIHNl dHVwIFBQQyBtZW51IGhlcmUNCiAgICAgICAgICAgIHNobWIgPSBTSE1FTlVCQVJJTkZPKCkNCiAg ICAgICAgICAgIHNobWIuaHduZFBhcmVudCA9IHNlbGYuaHduZA0KICAgICAgICAgICAgc2htYi5u VG9vbEJhcklkID0gSURSX01FTlUNCiAgICAgICAgICAgIHNobWIuaEluc3RSZXMgPSBzZWxmLmhp bnN0DQogICAgICAgICAgICBpZiBTSENyZWF0ZU1lbnVCYXIoc2htYik6DQogICAgICAgICAgICAg ICAgc2VsZi5od25kTUIgPSBzaG1iLmh3bmRNQg0KICAgICAgICAgICAgZWxzZToNCiAgICAgICAg ICAgICAgICBPdXRwdXREZWJ1Z1N0cmluZygnaW5pdCBtZW51IGJhciBmYWlsZWQnKQ0KICAgICAg ICAgICAgICAgIHNlbGYuaHduZE1CID0gTm9uZQ0KDQogICAgICAgIE91dHB1dERlYnVnU3RyaW5n KCdwbGF0IGlzICcrc3lzLnBsYXRmb3JtKQ0KDQogICAgICAgIHN0eWxlID0gV1NfQ0hJTER8V1Nf VklTSUJMRXxXU19WU0NST0xMfFdTX0hTQ1JPTEx8RVNfTEVGVHxFU19NVUxUSUxJTkV8RVNfV0FO VFJFVFVSTnxFU19BVVRPSFNDUk9MTA0KICAgICAgICBzZWxmLmh3bmRFZGl0PUNyZWF0ZVdpbmRv dygiRURJVCIsIE5vbmUsIHN0eWxlLCBcDQogICAgICAgICAgICAgICAgICAgICAgbGVmdCwgdG9w LCAocmlnaHQtbGVmdCksIChib3R0b20tdG9wKSwgXA0KICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgc2VsZi5od25kLCAwLCBzZWxmLmhpbnN0LCBOb25lKSAgICANCiAgICANCiAgICAgICAg c2VsZi5vbGRFZGl0V25kUHJvYyA9IFNldFdpbmRvd0xvbmcoc2VsZi5od25kRWRpdCwgR1dMX1dO RFBST0MsIHNlbGYuR2V0RWRpdE1lc3NhZ2VNYXAoKSkjIHNlbGYuRWRpdFduZFByb2MpDQoNCiAg ICAgICAgaWYgc3lzLnBsYXRmb3JtICE9ICJ3aW5jZSIgYW5kIG5vdCBpc1BvY2tldFBDOg0KICAg ICAgICAgICAgU2VuZE1lc3NhZ2Uoc2VsZi5od25kRWRpdCwgV01fU0VURk9OVCwgR2V0U3RvY2tP YmplY3QoQU5TSV9GSVhFRF9GT05UKSwgMCkNCg0KICAgICAgICBTaG93V2luZG93KHNlbGYuaHdu ZCwgU1dfU0hPVykNCiAgICAgICAgVXBkYXRlV2luZG93KHNlbGYuaHduZCkNCg0KICAgICAgICBF bmFibGVXaW5kb3coc2VsZi5od25kRWRpdCwgMSkNCiAgICANCiAgICAgICAgU2V0Rm9jdXMoc2Vs Zi5od25kRWRpdCkNCiAgICAgICAgU2V0Q3Vyc29yKExvYWRDdXJzb3IoMCwwKSkNCg0KICAgIGRl ZiBUZXJtKHNlbGYpOg0KICAgICAgICB0cnk6DQogICAgICAgICAgICBQb3N0TWVzc2FnZShzZWxm Lmh3bmQsIFdNX1FVSVQsIDAsIDApDQogICAgICAgIGV4Y2VwdDoNCiAgICAgICAgICAgIHBhc3MN CiAgICAgICAgVW5yZWdpc3RlckNsYXNzKHNlbGYuY2xhc3NBdG9tLCBzZWxmLmhpbnN0KQ0KICAg IA0KICAgIGRlZiBPbkVkaXRDaGFyKHNlbGYsaFduZCwgbXNnLCB3cGFyYW0sIGxwYXJhbSk6DQog ICAgICAgIGlmIHNlbGYuYkludGVyYWN0IGFuZCB3cGFyYW09PTB4MEQ6ICMgcmV0dXJuIGtleQ0K ICAgICAgICAgICAgdHJ5Og0KICAgICAgICAgICAgICAgIEhpZGVDYXJldChoV25kKTsNCiAgICAg ICAgICAgIGV4Y2VwdDoNCiAgICAgICAgICAgICAgICBwYXNzDQogICAgICAgICAgICBjQ2hhcj1T ZW5kTWVzc2FnZShoV25kLCBFTV9MSU5FSU5ERVgsIC0xKQ0KICAgICAgICAgICAgY0xpbmU9U2Vu ZE1lc3NhZ2UoaFduZCwgRU1fTElORUZST01DSEFSLCBjQ2hhcikNCiAgICAgICAgICAgICMgRmlu ZCB0aGUgc3RhcnQgb2YgdGhlIGJsb2NrDQogICAgICAgICAgICBudW1MaW5lcyA9IFNlbmRNZXNz YWdlKGhXbmQsIEVNX0dFVExJTkVDT1VOVCwgMCwgMCkNCiAgICAgICAgICAgICMgR2V0TGluZSBm YWlscyBhcyB0aGUgc2l6ZSBpcyB3cm9uZz8/DQogICAgICAgICAgICBtYXhMaW5lU2l6ZT01MTIN CiAgICAgICAgICAgIGJsb2NrU3RhcnQgPSAtMQ0KICAgICAgICAgICAgd2hpbGUgY0xpbmUgPj0g MDoNCiAgICAgICAgICAgICAgICBsaW5lID0gc3RyKEVkaXRfR2V0TGluZShoV25kLCBjTGluZSwg bWF4TGluZVNpemUpKQ0KICAgICAgICAgICAgICAgIGlmIGxpbmVbOjRdPT1zeXMucHMxOg0KICAg ICAgICAgICAgICAgICAgICBibG9ja1N0YXJ0ID0gY0xpbmUNCiAgICAgICAgICAgICAgICAgICAg YnJlYWsNCiAgICAgICAgICAgICAgICBlbGlmIGxpbmVbOjRdIT1zeXMucHMyOg0KICAgICAgICAg ICAgICAgICAgICBicmVhaw0KICAgICAgICAgICAgICAgIGNMaW5lID0gY0xpbmUgLTENCg0KICAg ICAgICAgICAgaWYgYmxvY2tTdGFydD49MDoNCiAgICAgICAgICAgICAgICAjIEZpbmQgdGhlIGVu ZCBvZiB0aGUgYmxvY2suDQogICAgICAgICAgICAgICAgd2hpbGUgMToNCiAgICAgICAgICAgICAg ICAgICAgY0xpbmUgPSBjTGluZSArIDENCiAgICAgICAgICAgICAgICAgICAgbGluZSA9IHN0cihF ZGl0X0dldExpbmUoaFduZCwgY0xpbmUsIG1heExpbmVTaXplKSkNCiAgICAgICAgICAgICAgICAg ICAgaWYgbGluZSBpcyBOb25lIG9yIGxpbmVbOjRdIT1zeXMucHMyOg0KICAgICAgICAgICAgICAg ICAgICAgICAgYnJlYWsNCiAgICAgICAgICAgICAgICBibG9ja0VuZCA9IGNMaW5lDQogICAgICAg ICAgICAgICAgIyBibG9ja1N0YXJ0IGlzIHRoZSBmaXJzdCBsaW5lDQogICAgICAgICAgICAgICAg IyBibG9ja0VuZCBpcyBvbmUgcGFzdCB0aGUgYmxvY2sgZW5kLg0KICAgICAgICAgICAgICAgIGZp cnN0TGluZT1zdHIoRWRpdF9HZXRMaW5lKGhXbmQsIGJsb2NrU3RhcnQsIG1heExpbmVTaXplKSlb bGVuKHN5cy5wczEpOl0NCiAgICAgICAgICAgICAgICAjIFNwZWNpYWwgY2FzZSBmb3IgYW4gZW1w dHkgY29tbWFuZCAtIG1pbWljIFB5dGhvbiBiZXR0ZXIgYnkgd3JpdGluZyBhbm90aGVyICI+Pj4i DQogICAgICAgICAgICAgICAgaWYgbGVuKGZpcnN0TGluZSk9PTAgYW5kIGJsb2NrU3RhcnQrMT09 YmxvY2tFbmQ6DQogICAgICAgICAgICAgICAgICAgICMgRW1wdHkgcHJvbXB0IC0gd3JpdGUgYSBu ZXcgb25lLg0KICAgICAgICAgICAgICAgICAgICBzZWxmLndyaXRlKCJcbiIrc3lzLnBzMSkNCiAg ICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAgICAgICBpdGVtcyA9IFtmaXJzdExp bmVdDQogICAgICAgICAgICAgICAgICAgIGZvciBjTGluZSBpbiByYW5nZShibG9ja1N0YXJ0KzEs IGJsb2NrRW5kKToNCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLmFwcGVuZCggc3RyKEVk aXRfR2V0TGluZShoV25kLCBjTGluZSwgbWF4TGluZVNpemUpKVtsZW4oc3lzLnBzMik6XSApDQoN CiAgICAgICAgICAgICAgICAgICAgIyBJZiB0aGUgYmxvY2sgaXMgbm90IGF0IHRoZSBlbmQgb2Yg dGhlIGNvbnRyb2wsIGNvcHkgaXQgdGhlcmUuLi4NCiAgICAgICAgICAgICAgICAgICAgaWYgYmxv Y2tFbmQgIT0gbnVtTGluZXM6DQogICAgICAgICAgICAgICAgICAgICAgICBzZWxmLndyaXRlKCJc biVzJXMiICUgKHN5cy5wczEsIGl0ZW1zWzBdKSkNCiAgICAgICAgICAgICAgICAgICAgICAgIGZv ciBpdGVtIGluIGl0ZW1zWzE6XToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLndy aXRlKCJcbiVzJXMiICUgKHN5cy5wczIsIGl0ZW1zWzBdKSkNCiAgICAgICAgICAgICAgICAgICAg ZWxzZToNCiAgICAgICAgICAgICAgICAgICAgICAgICMgUmVhZHkgdG8gZXhlY3V0ZS4NCiAgICAg ICAgICAgICAgICAgICAgICAgIHNlbGYuY3VycmVudEJsb2NrSXRlbXMgPSBpdGVtcw0KICAgICAg ICAgICAgICAgICAgICAgICAgU2V0RXZlbnQoc2VsZi5ldmVudEludGVyYWN0aXZlSW5wdXRBdmFp bGFibGUpDQoNCiAgICAgICAgICAgIGVsc2U6DQogICAgICAgICAgICAgICAgIyBOb3QgaW4gYSBi bG9jayAtIHdyaXRlIGEgbmV3IHByb21wdC4NCiAgICAgICAgICAgICAgICBzZWxmLndyaXRlKCJc biIrc3lzLnBzMSkNCg0KICAgICAgICAgICAgdHJ5Og0KICAgICAgICAgICAgICAgIFNob3dDYXJl dChoV25kKQ0KICAgICAgICAgICAgZXhjZXB0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wg aHduZCwgbXNnLCB3cGFyYW0sIGxwYXJhbSk6DQogICAgICAgICIiIkNyZWF0ZSB3aW5kb3cgIiIi DQogICAgICAgIE91dHB1dERlYnVnU3RyaW5nKCdXTV9DUkVBVEUnKQ0KICAgICAgICBpZiBpc1Bv Y2tldFBDOg0KICAgICAgICAgICAgIyBzZXR1cCBQUEMgbWVudSBoZXJlDQogICAgICAgICAgICBz aG1iID0gU0hNRU5VQkFSSU5GTygpDQogICAgICAgICAgICBzaG1iLmh3bmRQYXJlbnQgPSBzZWxm Lmh3bmQNCiAgICAgICAgICAgIHNobWIublRvb2xCYXJJZCA9IDQwMA0KICAgICAgICAgICAgc2ht Yi5oSW5zdFJlcyA9IHNlbGYuaGluc3QNCiAgICAgICAgICAgIGlmIFNIQ3JlYXRlTWVudUJhcihz aG1iKToNCiAgICAgICAgICAgICAgICBzZWxmLmh3bmRNQiA9IHNobWIuaHduZE1CDQogICAgICAg ICAgICBlbHNlOg0KICAgICAgICAgICAgICAgIE91dHB1dERlYnVnU3RyaW5nKCdpbml0IG1lbnUg YmFyIGZhaWxlZCcpDQogICAgICAgICAgICAgICAgc2VsZi5od25kTUIgPSBOb25lDQoNCiAgICAg ICAgDQogICAgZGVmIE9uUGFyZW50U2l6ZShzZWxmLCBod25kLCBtc2csIHdwYXJhbSwgbHBhcmFt KToNCiAgICAgICAgbGVmdCwgdG9wLCByaWdodCwgYm90dG9tID0gR2V0Q2xpZW50UmVjdChod25k KQ0KICAgICAgICBpZiBub3QgaXNQb2NrZXRQQzoNCiAgICAgICAgICAgIHRyeToNCiAgICAgICAg ICAgICAgICB0b3A9Q29tbWFuZEJhcl9IZWlnaHQoc2VsZi5oQ21kQmFyKTsNCiAgICAgICAgICAg IGV4Y2VwdCBOYW1lRXJyb3I6ICMgT25seSBvbiBDRQ0KICAgICAgICAgICAgICAgIHBhc3MNCiAg ICAgICAgaWYgc2VsZi5od25kRWRpdCBpcyBub3QgTm9uZToNCiAgICAgICAgICAgIFNldFdp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lKCkNCiAgICAgICAgICAgIFNlbmRNZXNzYWdlKHNlbGYuaHdu ZEVkaXQsIEVNX1NFVFNFTCwgLTIsIC0yKQ0KICAgICAgICAgICAgIyBOb3cgY2hlY2sgdGhhdCB3 ZSB3b250IGZpbGwgdGhlIGNvbnRyb2wuDQogICAgICAgICAgICAjIElmIHNvLCByZW1vdmUgdGhl IGZpcnN0IGxpbmVzIHVudGlsIHdlIGFyZSBPSy4NCiAgICAgICAgICAgIHNlbEluZm8gPSBTZW5k TWVzc2FnZShzZWxmLmh3bmRFZGl0LCBFTV9HRVRTRUwsIDAsIDApDQogICAgICAgICAgICBlbmRQ b3MgPSBISVdPUkQoc2VsSW5mbykNCiAgICAgICAgICAgIGxpbmVMb29rSW5kZXggPSAwDQogICAg ICAgICAgICBsaW5lTG9va0xlbmd0aCA9IDANCiAgICAgICAgICAgIHdoaWxlIGVuZFBvcyArIGxl bih0ZXh0KSAtIGxpbmVMb29rTGVuZ3RoID4gMjkwMDA6DQogICAgICAgICAgICAgICAgbGluZUxv b2tJbmRleCA9IGxpbmVMb29rSW5kZXggKyAxDQogICAgICAgICAgICAgICAgbGluZUxvb2tMZW5n dGggPSBTZW5kTWVzc2FnZShzZWxmLmh3bmRFZGl0LCBFTV9MSU5FSU5ERVgsIGxpbmVMb29rSW5k ZXgsIDApDQogICAgICAgICAgICBpZiBsaW5lTG9va0luZGV4ID4gMDoNCiAgICAgICAgICAgICAg ICAjIFRoZSBTRVRSRURSQVcgaGFzIG5vIGVmZmVjdCBvbiBDRS4gIElmIHdlIHJlYWxseSB3YW50 IHRoaXMNCiAgICAgICAgICAgICAgICAjIEkgdGhpbmsgd2UgbXVzdCByZXNwb25kIHRvIFdNX1BB SU5ULCBhbmQgaWdub3JlIGl0IGZvciB0aGUgZHVyYXRpb24NCiAgICAgICAgICAgICAgICAjIHRo ZSByZWRyYXcgaXMgdHVybmVkIG9mZi4NCiAgICAgICAgICAgICAgICBTZW5kTWVzc2FnZShzZWxm Lmh3bmR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vciBwPT1JRENBTkNFTDoN CiAgICAgICAgICAgIEVuZERpYWxvZyhod25kLCAxKQ0KICAgICAgICByZXR1cm4gMQ0KICAgIGVs aWYgbXNnPT1XTV9JTklURElBTE9HOg0KICAgICAgICBpZiBpc1BvY2tldFBDOg0KICAgICAgICAg ICAgc2hpZGkgPSBTSElOSVRETEdJTkZPKCkNCiAgICAgICAgICAgIHNoaWRpLmR3TWFzayA9IFNI SURJTV9GTEFHUw0KICAgICAgICAgICAgc2hpZGkuZHdGbGFncyA9IFNISURJRl9ET05FQlVUVE9O IHwgU0hJRElGX1NJWkVETEdGVUxMU0NSRUVOIHwgU0hJRElGX1NJUERPV04NCiAgICAgICAgICAg IHNoaWRpLmhEbGcgPSBod25kDQogICAgICAgICAgICBTSEluaXREaWFsb2coc2hpZGkpDQogICAg ICAgIA0KICAgIHJldHVybiAwDQoNCmRlZiBJbnRlcmFjdChzaGVsbCk6DQogICAgc2hlbGwuYklu dGVyYWN0ID0gMQ0KICAgIGxvY2FscyA9IHt9DQogICAgc3lzLnN0ZG91dC53cml0ZSgiUHl0aG9u ICVzIG9uICVzXG4lcyIgJSAoc3lzLnZlcnNpb24sIHN5cy5wbGF0Zm9ybSwgc3lzLnBzMSkpDQog ICAgDQogICAgd2hpbGUgMToNCiAgICAgICAgcmMgPSBXYWl0Rm9yTXVsdGlwbGVPYmplY3RzKCAo c2hlbGwuZXZlbnRJbnRlcmFjdGl2ZUlucHV0QXZhaWxhYmxlLCBzaGVsbC5ldmVudENsb3NlZCks IDAsIElORklOSVRFKQ0KICAgICAgICBpZiByYyA9PSBXQUlUX09CSkVDVF8wOg0KICAgICAgICAg ICAgY29kZVRleHQgPSBzdHJpbmcuam9pbihzaGVsbC5jdXJyZW50QmxvY2tJdGVtcywgJ1xuJykN CiAgICAgICAgICAgIHRyeToNCiAgICAgICAgICAgICAgICBjb2RlT2IgPSBjb2RlLmNvbXBpbGVf Y29tbWFuZChjb2RlVGV4dCkNCiAgICAgICAgICAgIGV4Y2VwdCBTeW50YXhFcnJvcjoNCiAgICAg ICAgICAgICAgICBzeXMuc3Rkb3V0LndyaXRlKCJcbiIpDQogICAgICAgICAgICAgICAgbGlzdCA9 IHRyYWNlYmFjay5wcmludF9leGMoMCkNCiAgICAgICAgICAgICAgICBzeXMuc3Rkb3V0LndyaXRl KHN5cy5wczEpDQogICAgICAgICAgICAgICAgY29udGludWUNCiAgICAgICAgICAgIGV4Y2VwdDoN CiAgICAgICAgICAgICAgICB0cmFjZWJhY2sucHJpbnRfZXhjKCkNCiAgICAgICAgICAgICAgICBj b250aW51ZQ0KDQogICAgICAgICAgICBpZiBjb2RlT2IgaXMgTm9uZToNCiAgICAgICAgICAgICAg ICBzeXMuc3Rkb3V0LndyaXRlKCJcbiVzIiAlIHN5cy5wczIpDQogICAgICAgICAgICAgICAgY29u dGludWUNCiAgICAgICAgICAgIHN5cy5zdGRvdXQud3JpdGUoIlxuIikNCg0KICAgICAgICAgICAg U2V0Q3Vyc29yKExvYWRDdXJzb3IoMCwgSURDX1dBSVQpKQ0KICAgICAgICAgICAgdHJ5Og0KICAg ICAgICAgICAgICAgIHRyeToNCiAgICAgICAgICAgICAgICAgICAgZXhlYyBjb2RlT2IgaW4gbG9j YWxzDQogICAgICAgICAgICAgICAgZXhjZXB0IFN5c3RlbUV4aXQ6DQogICAgICAgICAgICAgICAg ICAgIHJhaXNlDQogICAgICAgICAgICAgICAgZXhjZXB0Og0KICAgICAgICAgICAgICAgICAgICBl eGNfdHlwZSwgZXhjX3ZhbHVlLCBleGNfdHJhY2ViYWNrID0gc3lzLmV4Y19pbmZvKCkNCiAgICAg ICAgICAgICAgICAgICAgbCA9IGxlbih0cmFjZWJhY2suZXh0cmFjdF90YihzeXMuZXhjX3RyYWNl YmFjaykpDQogICAgICAgICAgICAgICAgICAgIHRyeTogMS8wDQogICAgICAgICAgICAgICAgICAg IGV4Y2VwdDoNCiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBsZW4odHJhY2ViYWNrLmV4dHJh Y3RfdGIoc3lzLmV4Y190cmFjZWJhY2spKQ0KICAgICAgICAgICAgICAgICAgICB0cmFjZWJhY2su cHJpbnRfZXhjZXB0aW9uKGV4Y190eXBlLA0KICAgICAgICAgICAgICAgICAgICAgICAgZXhjX3Zh bHVlLCBleGNfdHJhY2ViYWNrLCBsLW0pDQogICAgICAgICAgICAgICAgICAgIGV4Y190cmFjZWJh Y2sgPSBOb25lICMgUHJldmVudCBhIGN5Y2xlDQogICAgICAgICAgICBmaW5hbGx5Og0KICAgICAg ICAgICAgICAgIFNldEN1cnNvcihMb2FkQ3Vyc29yKDAsIDApKQ0KICAgICAgICAgICAgICAgIA0K ICAgICAgICAgICAgc3lzLnN0ZG91dC53cml0ZShzeXMucHMxKQ0KICAgICAgICBlbHNlOg0KICAg ICAgICAgICAgYnJlYWsNCg0KZGVmIFJ1bkNvZGUoc2hlbGwpOg0KICAgIHRyeToNCiAgICAgICAg IyBjb3B5IHN5cy5hcmd2IGJlZm9yZSB3ZSBzdG9tcCBvbiBpdCENCiAgICAgICAgc3lzLmFwcGFy Z3YgPSBzeXMuYXJndls6XQ0KICAgICAgICBiS2VlcE9wZW4gPSAwDQogICAgICAgIGJJbnRlcmFj dCA9IDENCiAgICAgICAgY21kVG9FeGVjdXRlID0gTm9uZQ0KICAgICAgICAjIFByb2Nlc3Mgc3lz LmFyZ3YsIHJlbW92aW5nIGFyZ3MgYXMgd2UgcHJvY2VzcyB0aGVtIHNvIGFueSBzY3JpcHRzDQog ICAgICAgICMgc2VlIF90aGVpcl8gYXJndiENCiAgICAgICAgZGVsIHN5cy5hcmd2WzBdDQogICAg ICAgICMgUmVtb3ZlIHNvbWUgcGFyYW1zIHRoZSBXQ0UgZGVidWdnZXIgc29tZXRpbWVzIGFkZHM6 DQogICAgICAgIHN5cy5hcmd2PWZpbHRlcihsYW1iZGEgYXJnOiBhcmdbOjRdIT0iL1dDRSIsIHN5 cy5hcmd2KQ0KICAgICAgICBpPTANCiAgICAgICAgd2hpbGUgaSA8IGxlbihzeXMuYXJndik6DQog ICAgICAgICAgICBpZiBub3Qgc3lzLmFyZ3ZbaV0gb3Igc3lzLmFyZ3ZbaV1bMF0hPSctJzoNCiAg ICAgICAgICAgICAgICBicmVhaw0KICAgICAgICAgICAgaWYgc3lzLmFyZ3ZbaV09PSctaSc6DQog ICAgICAgICAgICAgICAgYkludGVyYWN0ID0gMQ0KICAgICAgICAgICAgICAgIGRlbCBzeXMuYXJn dltpXQ0KICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogICAgICAgICAgICBlbGlmIHN5cy5hcmd2 W2ldPT0nLW8nIG9yIHN5cy5hcmd2W2ldPT0nLW9hJzoNCiAgICAgICAgICAgICAgICAjIGNvcHkg b3V0cHV0IHRvIGZpbGUNCiAgICAgICAgICAgICAgICBpZiBzeXMuYXJndltpXSA9PSAiLW9hIjoN CiAgICAgICAgICAgICAgICAgICAgc2hlbGwub3V0cHV0RmlsZSA9IG9wZW4oc3lzLmFyZ3ZbaSsx XSwnYXQnKQ0KICAgICAgICAgICAgICAgIGVsc2U6DQogICAgICAgICAgICAgICAgICAgIHNoZWxs Lm91dHB1dEZpbGUgPSBvcGVuKHN5cy5hcmd2W2krMV0sJ3d0JykNCiAgICAgICAgICAgICAgICBk ZWwgc3lzLmFyZ3ZbaV0NCiAgICAgICAgICAgICAgICBkZWwgc3lzLmFyZ3ZbaV0NCiAgICAgICAg ICAgICAgICBpID0gaSArIDENCiAgICAgICAgICAgIGVsaWYgc3lzLmFyZ3ZbaV09PSctYyc6DQog ICAgICAgICAgICAgICAgY21kVG9FeGVjdXRlID0gc3RyaW5nLmpvaW4oc3lzLmFyZ3ZbaSsxOl0s ICcgJykNCiAgICAgICAgICAgICAgICBzeXMuYXJndiA9IHN5cy5hcmd2WzppLTFdDQogICAgICAg ICAgICAgICAgYnJlYWsNCiAgICAgICAgICAgIGkgPSBpICsgMQ0KICAgICAgICANCiAgICAgICAg aWYgbm90IHN5cy5hcmd2OiBzeXMuYXJndj1bJyddDQoNCiAgICAgICAgaWYgY21kVG9FeGVjdXRl IGlzIG5vdCBOb25lOg0KICAgICAgICAgICAgdHJ5Og0KICAgICAgICAgICAgICAgIGV4ZWMgY21k VG9FeGVjdXRlDQogICAgICAgICAgICBleGNlcHQ6DQogICAgICAgICAgICAgICAgdHJhY2ViYWNr LnByaW50X2V4YygpDQogICAgICAgICAgICAgICAgYktlZXBPcGVuID0gMQ0KICAgICAgICBlbGlm IGxlbihzeXMuYXJndik+MCBhbmQgc3lzLmFyZ3ZbMF06DQogICAgICAgICAgICAjIFNoaWZ0IHRo ZSBhcmdzIGJhY2sgdG8gaXQgc2VlcyBpdHNlbGYgYXMgc3lzLmFyZ3ZbMF0NCiAgICAgICAgICAg ICMgRXhlY3V0ZSB0aGUgbmFtZWQgc2NyaXB0DQogICAgICAgICAgICBmbmFtZSA9IHN5cy5hcmd2 WzBdDQogICAgICAgICAgICBzeXMucGF0aCA9IFtvcy5wYXRoLmRpcm5hbWUoZm5hbWUpXSArIHN5 cy5wYXRoDQogICAgICAgICAgICBPdXRwdXREZWJ1Z1N0cmluZygnYXJndjAgJXNcbicgJSBzeXMu YXJndlswXSkNCiAgICAgICAgICAgIGV4dCA9IG9zLnBhdGguc3BsaXRleHQoZm5hbWUpWzFdDQog ICAgICAgICAgICBpZiBleHQ9PScucHljJzoNCiAgICAgICAgICAgICAgICBtb2RlPSJyYiINCiAg ICAgICAgICAgICAgICBpbXBfcGFyYW1zPSgicHljIiwgbW9kZSwgaW1wLlBZX0NPTVBJTEVEKQ0K ICAgICAgICAgICAgZWxzZToNCiAgICAgICAgICAgICAgICBtb2RlPSJyIg0KICAgICAgICAgICAg ICAgIGltcF9wYXJhbXM9KCJweSIsIG1vZGUsIGltcC5QWV9TT1VSQ0UpDQoNCiAgICAgICAgICAg IHRyeToNCiAgICAgICAgICAgICAgICBmaWxlID0gb3BlbihmbmFtZSwgbW9kZSkNCiAgICAgICAg ICAgIGV4Y2VwdCBJT0Vycm9yLCAoY29kZSwgd2h5KToNCiAgICAgICAgICAgICAgICBwcmludCAi cHl0aG9uOiBjYW4ndCBvcGVuICVzOiAlc1xuIiAlIChmbmFtZSwgd2h5KQ0KICAgICAgICAgICAg ICAgIGJLZWVwT3BlbiA9IDENCiAgICAgICAgICAgICAgICBmaWxlID0gTm9uZQ0KICAgICAgICAg ICAgaWYgZmlsZToNCiAgICAgICAgICAgICAgICB0cnk6DQogICAgICAgICAgICAgICAgICAgIHRy eToNCiAgICAgICAgICAgICAgICAgICAgICAgIGltcC5sb2FkX21vZHVsZSgiX19tYWluX18iLCBm aWxlLCBmbmFtZSwgaW1wX3BhcmFtcykNCiAgICAgICAgICAgICAgICAgICAgZXhjZXB0Og0KICAg ICAgICAgICAgICAgICAgICAgICAgdHJhY2ViYWNrLnByaW50X2V4YygpDQogICAgICAgICAgICAg ICAgICAgICAgICBiS2VlcE9wZW4gPSAxDQogICAgICAgICAgICAgICAgZmluYWxseToNCiAgICAg ICAgICAgICAgICAgICAgZmlsZS5jbG9zZSgpDQogICAgICAgIGVsc2U6DQogICAgICAgICAgICBi SW50ZXJhY3QgPSAxDQogICAgICAgIA0KICAgICAgICBpZiBiSW50ZXJhY3Q6DQogICAgICAgICAg ICB0cnk6DQogICAgICAgICAgICAgICAgSW50ZXJhY3Qoc2hlbGwpDQogICAgICAgICAgICBleGNl cHQgU3lzdGVtRXhpdDoNCiAgICAgICAgICAgICAgICBiS2VlcE9wZW4gPSAwDQogICAgICAgICAg ICBleGNlcHQ6DQogICAgICAgICAgICAgICAgdHJhY2ViYWNrLnByaW50X2V4YygpDQogICAgICAg ICAgICAgICAgYktlZXBPcGVuID0gMQ0KICAgIA0KICAgICAgICBpZiBub3QgYktlZXBPcGVuOg0K ICAgICAgICAgICAgU2VuZE1lc3NhZ2Uoc2hlbGwuaHduZCwgV01fQ09NTUFORCwgSURNX0VYSVQs IDApDQogICAgZXhjZXB0Og0KICAgICAgICB0cmFjZWJhY2sucHJpbnRfZXhjKCkNCg0KDQpkZWYg bWFpbigpOg0KICAgICMgV2UgcnVuIHRoZSBzaGVsbCBpbiB0aGUgbWFpbiB0aHJlYWQsIHNvIHRo YXQgd2hlbiBpdCB0ZXJtaW5hdGVzDQogICAgIyAoYWNjaWRlbnRseSBvciBvdGhlcndpc2UpIHRo ZSBhcHBsaWNhdGlvbiB0ZXJtaW5hdGVzLg0KICAgICMgQSBzZXBlcmF0ZSB0aHJlYWQgaXMgdXNl ZCB0byBleGVjdXRlIHRoZSBQeXRob24gY29kZS4NCg0KICAgICMgc2ltcGxlIHRlc3QgZm9yIG5v dywgZ2V0IHNtYXJ0ZXIgbGF0ZXINCiAgICBnbG9iYWwgdGhlT3RoZXJXaW5kb3cNCiAgICBnbG9i YWwgd2luTGlzdA0KICAgIHRoZU90aGVyV2luZG93ID0gTm9uZQ0KICAgIHdpbkxpc3QgPSBbXQ0K DQogICAgZGVmIGVudW1Qcm9jKGh3bmQsbCk6DQogICAgICAgIGdsb2JhbCB0aGVPdGhlcldpbmRv dw0KICAgICAgICBnbG9iYWwgd2luTGlzdA0KICAgICAgICB0ID0gR2V0V2luZG93VGV4dChod25k KQ0KICAgICAgICB3aW5MaXN0LmFwcGVuZCh0KQ0KICAgICAgICBpZiB0ID09IG15V2luZG93VGl0 bGU6DQogICAgICAgICAgICB0aGVPdGhlcldpbmRvdyA9IGh3bmQNCiAgICAgICAgICAgIHJldHVy biAwDQogICAgICAgIHJldHVybiAxDQogICAgICAgIA0KICAgIHRyeToNCiAgICAgICAgRW51bVdp bmRvd3MoZW51bVByb2MsMCkNCiAgICBleGNlcHQ6DQogICAgICAgIHBhc3MNCiAgICBpZiB0aGVP dGhlcldpbmRvdzoNCiAgICAgICAgU2V0Rm9yZWdyb3VuZFdpbmRvdyh0aGVPdGhlcldpbmRvdykN CiAgICAgICAgcmV0dXJuIDANCiAgICAgICAgDQogICAgX19uYW1lX18gPSBzeXMuYXJndlswXQ0K DQogICAgIyBNYWtlICJzaGVsbCIgZ2xvYmFsIGp1c3Qg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F9fbmFtZV9fPT0nX19tYWlu X18nOg0KICAgIG1haW4oKQ0K ----__JNP_000_2baa.1370.0780-- ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Fri Oct 4 15:20:47 2002 From: telionce@yahoo.com (Telion) Date: Fri, 4 Oct 2002 07:20:47 -0700 (PDT) Subject: [PythonCE] PythonCE Wiki Page is up! Message-ID: <20021004142047.50278.qmail@web21102.mail.yahoo.com> Hi everyone, Brad has kindly created Wiki page for us. As I was the guy who was asking for it, I spent time to make initial skelton and some proposed pages for startup. I hope that someone who has better artistic sense would improve cosmetics, and other users and developers would join in the effort to make things easier for us all. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/FrontPage ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From jbauer@rubic.com Fri Oct 4 16:12:16 2002 From: jbauer@rubic.com (Jeff Bauer) Date: Fri, 04 Oct 2002 10:12:16 -0500 Subject: [PythonCE] PythonCE Wiki Page is up! References: <20021004142047.50278.qmail@web21102.mail.yahoo.com> Message-ID: <3D9DAFD0.1C60BCA8@rubic.com> Very nice, Telion. Also many thanks to Brad for hosting this Wiki. Jeff Bauer > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/FrontPage From kennethjohnsen@msn.com Mon Oct 7 13:28:58 2002 From: kennethjohnsen@msn.com (Kenneth Johnsen) Date: Mon, 07 Oct 2002 14:28:58 +0200 Subject: [PythonCE] Installing Pocket PC Python on storage card. Message-ID: Is it possible to install PocketPC Python some place else than main memory? It takes up a bit too much space on my iPaq 3630, and I have a 64MB compact flash card with loads of space left. _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From telionce@yahoo.com Mon Oct 7 14:30:19 2002 From: telionce@yahoo.com (Telion) Date: Mon, 7 Oct 2002 06:30:19 -0700 (PDT) Subject: [PythonCE] Installing Pocket PC Python on storage card. In-Reply-To: Message-ID: <20021007133019.50821.qmail@web21108.mail.yahoo.com> --- Kenneth Johnsen wrote: > Is it possible to install PocketPC Python some place else than main memory? > It takes up a bit too much space on my iPaq 3630, and I have a 64MB compact > flash card with loads of space left. > Probably you can, although I can't say for sure because I don't have PPC. PythonCE for HPC runs anywhere. Why don't you try? Just create a directory (Python22) in CF card. Copy all .exe .dll .pyd there. Copy Lib and other directory in it. Rename the Python (Python directory, PocketPCPython.exe, and .dll in you main memory for testing. Try the Python in CF card. If "import site failed" error occurs, copy site.py or site.pyc from Lib directory to Python22 directory. If it doesn't go, you may want to try site.py I have uploaded to Wiki. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/StartingPython http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/site.py.mbcs_and_getcwd Tell me if you experience other problems. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From gollem@chatway.nl Mon Oct 7 14:58:09 2002 From: gollem@chatway.nl (gollem) Date: Mon, 7 Oct 2002 06:58:09 -0700 (PDT) Subject: [PythonCE] Installing Pocket PC Python on storage card. Message-ID: <20021007135810.201743BB7@sitemail.everyone.net> Search the archives, it has been asked and answered before. It is possible, check previous months, I think about 6 months ago. --- "Kenneth Johnsen" wrote: >Is it possible to install PocketPC Python some place else than main memory? >It takes up a bit too much space on my iPaq 3630, and I have a 64MB compact >flash card with loads of space left. > > > >_________________________________________________________________ >MSN Photos is the easiest way to share and print your photos: >http://photos.msn.com/support/worldwide.aspx > > >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce _____________________________________________________________ Sign up for FREE email Chatway.nl at http://www.chatway.nl _____________________________________________________________ Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag From jim@burtcom.com Mon Oct 7 15:07:55 2002 From: jim@burtcom.com (Jim Burton) Date: Mon, 7 Oct 2002 08:07:55 -0600 Subject: [PythonCE] Installing Pocket PC Python on storage card. In-Reply-To: Message-ID: <2CEAE1BC-D9FE-11D6-B8CA-00039398E6D8@burtcom.com> It is possible -- but when installed on a storage card, you can't seem to launch a python program by clicking on a code file. I've set up the registry to associate the file type with Python, but when a source file is clicked Python complains that it can't find the needed files on "Storage" It looks to me like python is not interpreting the space in "Storage Card" correctly. On Monday, October 7, 2002, at 06:28 AM, Kenneth Johnsen wrote: > Is it possible to install PocketPC Python some place else than main > memory? > It takes up a bit too much space on my iPaq 3630, and I have a 64MB > compact flash card with loads of space left. > > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > From jbauer@rubic.com Mon Oct 7 14:56:12 2002 From: jbauer@rubic.com (Jeff Bauer) Date: Mon, 07 Oct 2002 08:56:12 -0500 Subject: [PythonCE] code examples for the Wiki Message-ID: <3DA1927C.14726BE9@rubic.com> Kudos to Telion for setting up a CE Wiki page. I offered him a link to a demonstration I did at IPC-7 in Houston. It was a CE device running a web server using Python and Bobo. I no longer have the code available and Bobo's since morphed into Zope long ago. Furthermore, I'm no longer running anything on a CE device, but I do like to see efforts continue to move in this direction. I offered Telion to post some quickie examples of CE Python code. I'd like to encourage other members of this list to do the same. I think our example code should be posted onto the Wiki, which might eventually become the foundation for a set of cookbook recipes (with due acknowledgement to ActiveState for sponsoring the original idea). Anyhow, here are some trivial examples from my notes: 1. Send a quick popup message to the user: >>> import win32sys >>> win32sys.MessageBox(0, "My Message", "My Title", 1) >>> win32sys.MessageBeep() 2. Launch another CE application from Python: >>> import win32sh >>> win32sh.ShellExecuteEx(0, 0, "", "\\Windows\\calc.exe", "", "\\Windows", 1) 3. Launch a shortcut from Python: >>> import win32sh >>> win32sh.SHGetShortcutTarget("\\tmp\\Expenses.lnk") >>> win32sh.ShellExecuteEx(0,0,"","\\tmp\\Expenses.lnk","","",1) 4. Obtaining the IP address from a connected CE device: >>> import socket >>> hostname = socket.gethostname() >>> ip = socket.gethostbyname(hostname) >>> print ip 192.168.55.101 Since I don't have a CE environment to work on, someone should test these before posting these to the Wiki. Please consider adding your own code examples. Jeff Bauer Rubicon Research From kennethjohnsen@msn.com Mon Oct 7 15:38:30 2002 From: kennethjohnsen@msn.com (Kenneth Johnsen) Date: Mon, 07 Oct 2002 16:38:30 +0200 Subject: [PythonCE] Installing Pocket PC Python on storage card. Message-ID: Thanks man, it works nicely. I've sent this to pythonce as well, since I had some trouble finding it in the archive. Here's the procedure: The "Python" folder from "Program Files" in the distribution goes into \Storage Card, so on the PPC it should be \Storage card\Python I've left the stuff from the "Windows" folder in \Windows, since it's only 1 meg, but as I understood from the posts, these files can be moved as well. Oh, and I left the EXE in \Windows\Start Menu as well, that way, I didn't have to make a new shortcut. Thanks again. >From: gollem >Reply-To: gollem@chatway.nl >To: "Kenneth Johnsen" >CC: pythonce@python.org >Subject: Re: [PythonCE] Installing Pocket PC Python on storage card. >Date: Mon, 7 Oct 2002 06:58:09 -0700 (PDT) > >Search the archives, it has been asked and answered before. It is possible, >check previous months, I think about 6 months ago. > >--- "Kenneth Johnsen" wrote: > >Is it possible to install PocketPC Python some place else than main >memory? > >It takes up a bit too much space on my iPaq 3630, and I have a 64MB >compact > >flash card with loads of space left. > > > > > > > >_________________________________________________________________ > >MSN Photos is the easiest way to share and print your photos: > >http://photos.msn.com/support/worldwide.aspx > > > > > >_______________________________________________ > >PythonCE mailing list > >PythonCE@python.org > >http://mail.python.org/mailman/listinfo/pythonce > >_____________________________________________________________ >Sign up for FREE email Chatway.nl at http://www.chatway.nl > >_____________________________________________________________ >Select your own custom email address for FREE! Get you@yourchoice.com w/No >Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag > >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From telionce@yahoo.com Mon Oct 7 16:35:54 2002 From: telionce@yahoo.com (Telion) Date: Mon, 7 Oct 2002 08:35:54 -0700 (PDT) Subject: [PythonCE] code examples for the Wiki Message-ID: <20021007153554.17777.qmail@web21109.mail.yahoo.com> Thank you Jeff. > 1. Send a quick popup message to the user: > > >>> import win32sys > >>> win32sys.MessageBox(0, "My Message", "My Title", 1) > >>> win32sys.MessageBeep() I think (probably Mark?) moved MessageBeep() to win32gui. So, it worked well just by changing win32sys to win32gui. >>> import win32gui >>> win32gui.MessageBox(0, "My Message", "My Title", 1) But, it goes into TaskBar on my HPC2000. It seems that I have to give hwnd. (We can use sys.stdout.hwnd) >>> win32gui.MessageBeep() MessageBeep() does not work on my machine... Does it work on iPaq, Jordana? I tested other types of MessageBox. >>> from win32gui import MessageBox >>> import sys >>> hw = sys.stdout.hwnd MessageBox(hw, "Test Message", "Test caption",0) #0 ok only. always 1 MessageBox(hw, "Test Message", "Test caption",1) #1 No bottun ok,enter=1 Esc,close=2 MessageBox(hw, "Test Message", "Test caption",0 |2) #2 quit=3 retry=4 cancel=5 MessageBox(hw, "Test Message", "Test caption",1| 2) #3 yes=6 no=7 cancel,Esx,close=2 MessageBox(hw, "Test Message", "Test caption",0|0|4) #4 yes=6 no=7 MessageBox(hw, "Test Message", "Test caption",1|0|4) #5 quit=4 retry=2 MessageBox(hw, "Test Message", "Test caption",0|2|4) #6 Nothing always 1 # 12 <== 1 button without test on it # 16 = X icon, 32 = ? icon, 48 = ! icon, 64 = i icon, 80 = blank icon? # 512 <== focus on the last item # 256 <== focus on the second bottun # 1024 <== No focus on the bottun MessageBox(hw, "Test Message", "Test caption",1| 2|32|256) MessageBox(0, "Test Message", "Test caption",0|2|4) #6 It Go to Taskbar! (HPC only?) MessageBox(hw, "Do you get it?", "Python CE 2.2 ",3+32) > 2. Launch another CE application from Python: > > >>> import win32sh > >>> win32sh.ShellExecuteEx(0, 0, "", "\\Windows\\calc.exe", > "", "\\Windows", 1) > > 3. Launch a shortcut from Python: > > >>> import win32sh > >>> win32sh.SHGetShortcutTarget("\\tmp\\Expenses.lnk") > >>> win32sh.ShellExecuteEx(0,0,"","\\tmp\\Expenses.lnk","","",1) These one didn't go. I think we have to verify the win32sh module. I compiled it but I didn't have time to test. Maybe we have to modify source code for unicode. Yet another TO-DO items. Meanwhile we may use win32process.CreateProcess for launching. > 4. Obtaining the IP address from a connected CE device: > > >>> import socket > >>> hostname = socket.gethostname() > >>> ip = socket.gethostbyname(hostname) > >>> print ip > 192.168.55.101 This one went without any problem Do they work on PPC Python? ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From goodey27@juno.com Mon Oct 7 20:02:45 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Mon, 7 Oct 2002 15:02:45 -0400 Subject: [PythonCE] Run script Message-ID: <20021007.150246.1660.1.goodey27@juno.com> Is there a way to automaqttcly run a script by tapping on it. I have understood that that should be possible froma post. But I tryed, it dosnt work. Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Mon Oct 7 21:04:50 2002 From: telionce@yahoo.com (Telion) Date: Mon, 7 Oct 2002 13:04:50 -0700 (PDT) Subject: [PythonCE] Run script In-Reply-To: <20021007.150246.1660.1.goodey27@juno.com> Message-ID: <20021007200450.77007.qmail@web21109.mail.yahoo.com> --- goodey27@juno.com wrote: > Is there a way to automaqttcly run a script by tapping on it. > I have understood that that should be possible froma post. > But I tryed, it dosnt work. > > Isr You should associate Python with .py and .pyc file. Use PocketTweak, SmallTweak, or other utility for that. There are other ways, but it's easier with these Free softwares. Take a look at the FAQ. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/FAQ It seems to be a common problem. http://mail.python.org/pipermail/pythonce/2002-June/000081.html Maybe %1 should be placed inside quotes if you do it with registry editor. But we don't have to worry about these details when we use PocketTweak, SmallTweak. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From jim@burtcom.com Tue Oct 8 02:10:33 2002 From: jim@burtcom.com (Jim Burton) Date: Mon, 7 Oct 2002 19:10:33 -0600 Subject: [PythonCE] Run script In-Reply-To: <20021007200450.77007.qmail@web21109.mail.yahoo.com> Message-ID: I did this using the tweek, and I still get the error when Python is installed on the storage card. I checked the registry and it does have quotes around "Storage Card" so I don't understand why it's not working. Has anyone using a Jornada 720 gotten this to work? On Monday, October 7, 2002, at 02:04 PM, Telion wrote: > > > > --- goodey27@juno.com wrote: >> Is there a way to automaqttcly run a script by tapping on it. >> I have understood that that should be possible froma post. >> But I tryed, it dosnt work. >> >> Isr > > You should associate Python with .py and .pyc file. > Use PocketTweak, SmallTweak, or other utility for that. > There are other ways, but it's easier with these Free softwares. > > Take a look at the FAQ. > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/FAQ > > > It seems to be a common problem. > http://mail.python.org/pipermail/pythonce/2002-June/000081.html > > Maybe %1 should be placed inside quotes if you do it with registry > editor. > But we don't have to worry about these details when we use PocketTweak, > SmallTweak. > > > > > ===== > Telion > - telionce@yahoo.com - > http://pages.ccapcable.com/lac/PythonCE.html > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > From telionce@yahoo.com Tue Oct 8 02:41:11 2002 From: telionce@yahoo.com (Telion) Date: Mon, 7 Oct 2002 18:41:11 -0700 (PDT) Subject: [PythonCE] Run script In-Reply-To: Message-ID: <20021008014111.16575.qmail@web21107.mail.yahoo.com> --- Jim Burton wrote: > I did this using the tweek, and I still get the error when Python is > installed on the storage card. I checked the registry and it does have > quotes around "Storage Card" so I don't understand why it's not > working. Has anyone using a Jornada 720 gotten this to work? I think you have to change the registry manually. I tried with SmallTweak, and it could not change the registry. It seems that if the file association is created by other program, SmallTweak may fail to change. I even deleted the association, but it didn't work. When I did it manually, I got it without problem. I renamed Python22 directory to "xxPy thon22" and it started from there. So, space should not be problem either. Do you have regedit from MS, or Tascal regedit? This is what I have tested. (And it works) REGEDIT4 [HKEY_CLASSES_ROOT\.py] @="pyfile" [HKEY_CLASSES_ROOT\pyfile] @="pyfile" [HKEY_CLASSES_ROOT\pyfile\DefaultIcon] @="\\MemCard2\\xxPyt hon22\\PythonCE22.exe,0" [HKEY_CLASSES_ROOT\pyfile\Shell] [HKEY_CLASSES_ROOT\pyfile\Shell\Open] [HKEY_CLASSES_ROOT\pyfile\Shell\Open\Command] @="\"\\MemCard2\\xxPyt hon22\\PythonCE22.exe\" \"%1\"" Last line shows what you have to do with quotes, I guess. If you delete (after haveing saved) .py and associated file typees with regedit, and start brand new association with SmallTweak, it may work. I think it should work on Jordana as much as my Sharp machine. Good luck! ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Tue Oct 8 03:19:02 2002 From: telionce@yahoo.com (Telion) Date: Mon, 7 Oct 2002 19:19:02 -0700 (PDT) Subject: [PythonCE] Open File dialog example Message-ID: <20021008021902.79286.qmail@web21103.mail.yahoo.com> I've followed the example of Jeff, and written a small class that enables easy interface with external C functions. (especially for win32apis that require struct) I made this because I wanted to use GetOpenFileName() included in win32gui. _test() shows how to use this class and the common file dialog function. Please improve it, and let me know. Telion ------------------------------ # # This class creates "struct" for external C functions # It takes list or tuple of (name, format_string, initial_value) for # each struct member. # If the struct has padding byte(s), you have to provide dummy member for it. # # See the _test() for example # # 02/10/07 22:08 # Telion # import struct class cStruct(object): def __init__(self, sd): #print "cStruct" self.sd=list(sd) self.nlst = [i[0] for i in sd] self.fs = "".join([i[1] for i in sd]) t = [i[2] for i in sd] self.data = struct.pack(self.fs, *t) self.ptr = str2ptr(self.data) def __setattr__(self, name, v): if name in ['sd', 'nlst', 'fs', 'data', 'ptr']: object.__setattr__(self, name, v) return t = list(struct.unpack(self.fs, self.data)) i = self.nlst.index(name) if i > -1: t[i] = v self.data = struct.pack(self.fs, *t) def __getattr__(self, name): t = struct.unpack(self.fs, self.data) i = self.nlst.index(name) if i > -1: return t[i] else: raise AttributeError def __str__(self): return self.data def dump(self): # use this to see the data t = struct.unpack(self.fs, self.data) ii = 0 for i in self.nlst: print i, "=", t[ii] ii += 1 print "fs = ", self.fs print "ptr = ", self.ptr return # # a few helper functions # # try to get the pointer for the string data def str2ptr(s): try: import calldll # use calldll...if you have try: return calldll.strptr(s) # not all calldll has strptr except: pass except: pass return id(s)+20 # This can be different...Check! # make NULL terminated C unicode string ( without BOM ) def stru16(s): return unicode(s).encode('utf-16')[2:]+"\0\0" # returns 'mbcs' Python string from C unicode string (NULL terminated, wittout BOM) def u16str(u): ss = u[:u.index('\0\0')+1] # Get up to double null byte. if len(ss) < 2: return "" return unicode(''.encode('utf-16')+ss, 'utf-16').encode('mbcs') # Add BOM def _test(title="", inidir=""): # cStruct class uses following struct information. # (name, fs, initial_value) # # "name" is used for accessing value # "fs" is format string for that value (see struct module doc) # For lpstr, lpcstr, lpxxx, use 'l'. # "initial_value" default value # # In this test, we create OPNEFILENAME struct for GetOpenFineName(). # And retrieve filenname specified by user. # # File dialog access is easy. # # >>> import cs # >>> fn = cs._test() # >>> print fn # >>> fn = cs._test(r'DialogTitle',r'\storage card') # import sys tt = ( \ ('lStructSize', 'l', 76 ) , # always 76 for CE? ('hwndOwner', 'l', sys.stdout.hwnd ) , # shell.hwnd ('hInstance', 'l', sys.hinst) , ('lpstrFilter', 'l', 0 ), # File type filter ('lpstrCustomFilter', 'l', 0 ), ('nMaxCustFilter', 'l', 0 ) , # Not supported in CE ('nFilterIndex', 'l', 0 ) , # ('lpstrFile', 'l', 0 ) , # Initial File name and file name buffer. ('nMaxFile', 'l', 256 ) , # BufferSize of file name string 256 or more ('lpstrFileTitle', 'l', 0 ) , # (optional) base name recievinbg buffer ('nMaxFileTitle', 'l', 0 ) , # max size of above ('lpstrInitialDir', 'l', 0 ) , # (optional) initial directory ('lpstrTitle', 'l', 0 ) , # TitileBar of Dialog ('Flags', 'l', 0 ) , # ('nFileOffset', 'H', 0 ) , # offset to basa name ) , #) , #) , # WORD ('nFileExtension', 'H', 0 ) , # offset to extension ) , #) , #) , # WORD ('lpstrDefExt', 'l', 0 ) , # default extension ('lCustData', 'l', 0 ) , # Not supported in CE ('lpfnHook', 'l', 0 ) , # Not supported in CE ('lpTemplateName', 'l', 0 ) # Not supported in CE ) #print tt cs1 = cStruct(tt) filename = "\0"*580 # initialize filename buffer with NULL cs1.lpstrFile = str2ptr(filename) if not title: title = r'Choose a file' # Set a string for testing dialogtitle = stru16(title) cs1.lpstrTitle = str2ptr(dialogtitle) if not inidir: inidir = r'\Program Files' # Set initial directory for testing inidir = stru16(inidir) cs1.lpstrInitialDir = str2ptr(inidir) # str2ptr is not good enough import win32gui win32gui.GetOpenFileName(cs1.data) ss = u16str(filename) return ss # return the filename # debug code print ss # This works ascii file name only. mbcs filename needs more effort? print "="*10 cs1.dump() # dump information about struct return ss # return the filename ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From reic0024@d.umn.edu Tue Oct 8 04:47:06 2002 From: reic0024@d.umn.edu (Aaron J Reichow) Date: Mon, 7 Oct 2002 22:47:06 -0500 (CDT) Subject: [PythonCE] Open File dialog example In-Reply-To: <20021008021902.79286.qmail@web21103.mail.yahoo.com> Message-ID: On Mon, 7 Oct 2002, Telion wrote: > I've followed the example of Jeff, and written a small class > that enables easy interface with external C functions. > (especially for win32apis that require struct) > > I made this because I wanted to use GetOpenFileName() > included in win32gui. Seeing the GUI stuff talked about on here, it makes me wonder- isn't there an easier way to do this? That is, Win32/CE GUIs? Are there not already libraries that sit ontop of the win32gui/win32api that provide something more usable that writing Win32 API directly? I've no experience with Python on Windows (my J720 is my only Win-runnin machine), but surely, there must be something? does anygui wrap win32gui/api? I realize we may have to do some editing (how different is the WinCE subset from the original Win32 API?), but there's got to be a better way. Luckily, in the meantime, I have Dynapad (http://dynapad.swiki.net/1) for more managable rapid app dev and scripting for when I'm on the road and in the wilderness. :) Regards, Aaron Aaron Reichow :: UMD ACM Pres :: http://www.d.umn.edu/~reic0024/ "the question is no longer between violence and non-violence; It is between non-violence and non-existence." :: martin luther king junior From telionce@yahoo.com Tue Oct 8 13:54:51 2002 From: telionce@yahoo.com (Telion) Date: Tue, 8 Oct 2002 05:54:51 -0700 (PDT) Subject: [PythonCE] Open File dialog example In-Reply-To: Message-ID: <20021008125451.90367.qmail@web21102.mail.yahoo.com> --- Aaron J Reichow wrote: > On Mon, 7 Oct 2002, Telion wrote: > > Seeing the GUI stuff talked about on here, it makes me wonder- isn't there > an easier way to do this? That is, Win32/CE GUIs? Are there not already > libraries that sit ontop of the win32gui/win32api that provide something > more usable that writing Win32 API directly? I've no experience with > Python on Windows (my J720 is my only Win-runnin machine), but surely, > there must be something? does anygui wrap win32gui/api? I realize we may > have to do some editing (how different is the WinCE subset from the > original Win32 API?), but there's got to be a better way. > > Luckily, in the meantime, I have Dynapad (http://dynapad.swiki.net/1) for > more managable rapid app dev and scripting for when I'm on the road and in > the wilderness. :) > > Regards, > Aaron > > Aaron Reichow :: UMD ACM Pres :: http://www.d.umn.edu/~reic0024/ > "the question is no longer between violence and non-violence; It is > between non-violence and non-existence." :: martin luther king junior Hi Aaron, I am a lazy person. And IF I knew easier way, I didn't bother win32 API. Win9x/NT/2K/XP/XXX has nice and easy GUI stuff, except CE. Precisely that is why everyone is talking about that. PythonCE does not have very easy GUI. But Why? It's simply because NOBODY ported them to CE, yet. And to port them, you have to know about Win32 API, the difference between other win32 and winCE, and maybe python internal. Nice GUI on CE will not come unless someone invests his/her time and/or money. So if you really want to use nice and easy GUI, please contribute something toward it. Trying systematically GUI elements written for win32 could be a good starting point. We will know what is already usable and what we need to work on. Also, there are numbers of other GUI alternatives I can think of. --- 1. You can run Python as a http server (easy things to do), and use PIE or other Browser or UserInterface. (Similar to Jeff has demonstrated in IPC) Advantage of this approach is evident. You can use this for local, as well as remote solution. Designing UI is as easy as making a web page. You should think about security stuff, though. (eg. Don't allow connection from other than 127.0.0.1, etc...) 2. Similar to Number One, but use Telenet Interface. In DEMO section of Pyrhon distribution for BIG computers, there is a script called PySvr. Compared to Number one, it's not really GUI, (other than VTxxx compatible escape sequences..) but this script may run right now, without any effort. (I didn't have time to test it, yet) 3. Using GUI components that is already ported to CE. Calling MFC functions or other external DLL functions from Python is relatively easy. You can use many common dialogs or IE components, too If you use IE components, writing GUI is pretty much similar to making a web page with forms. (XML, javascript can be used, if you like) If there is a GUI stuff made for PocketScheme or other software, maybe Python can just make a call to the DLL. THere are a few Game Libraries out there, too. Most probably, Python can call their functions. Searching Google with "Game library WindowsCE" shows lots of things. http://www.google.com/search?num=100&safe=off&q=Game+library+WindowsCE&btnG=Google+%8C%9F%8D%F5&lr= http://www.pocketpcdn.com/libraries/ (STHtmlDialog looks interesting) 4. Someone may start porting tkinter, soon. I don't know his time table, though... --- Anyway, if you want easy GUI, please make a effort and share it with us. Or use Perl/tk, SmallSqeuak, Dialect, etc...as you do. By the way, at least OpenFile Dialog is now usable, and easy. (SaveSa Dialog can be realized in similar manner, too.) >>> import cs >>> yourfilename = cs._test(r"Dialog Title",r"\InitialDir") (For PPC, using tGetFile.dll maybe better) ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From reic0024@d.umn.edu Tue Oct 8 19:50:02 2002 From: reic0024@d.umn.edu (Aaron J Reichow) Date: Tue, 8 Oct 2002 13:50:02 -0500 (CDT) Subject: [PythonCE] Open File dialog example In-Reply-To: <20021008125451.90367.qmail@web21102.mail.yahoo.com> Message-ID: On Tue, 8 Oct 2002, Telion wrote: > PythonCE does not have very easy GUI. But Why? > It's simply because NOBODY ported them to CE, yet. I'm not talking about doing a port of an *extra* toolkit, like Tk or Fltk. That would be a lot of work and result in huge slow libs. Anyone looked into Anygui (http://anygui.sf.net) or PythonWin (http://starship.python.net/crew/mhammond/win32)? WinCE is a *SUBSET* of the regular Windows Win32 API. PythonWin should be adaptable to it. But as I've said, I'm not Windoze or Python guru. > So if you really want to use nice and easy GUI, > please contribute something toward it. I already have a way to create nice and easy GUIs for WinCE using Squeak Smalltalk, as I mentioned. But with options available like PythonWin that wrap the win32gui/api module (does it?) it should be pretty doable to do a little (non-trvial) editing, without having it be a huge ordeal. > If there is a GUI stuff made for PocketScheme or other software, > maybe Python can just make a call to the DLL. PocketScheme has an interface to the Win32 API like Python does, no easier to use, other than the aspects of the Scheme languge that are easier. Regards, Aaron Aaron Reichow :: UMD ACM Pres :: http://www.d.umn.edu/~reic0024/ "one has a moral responsibility to disobey unjust laws" :: m. l. king jr. From brian@ablelinktech.com Tue Oct 8 20:08:21 2002 From: brian@ablelinktech.com (Brian Brown) Date: Tue, 8 Oct 2002 13:08:21 -0600 Subject: [PythonCE] GUI fun Message-ID: <500D8E58-DAF1-11D6-9447-003065F89450@ablelinktech.com> Greetings! I've been playing with modifying ceshell.py to try out different GUI elements with the intention of building a wrapper for the win32gui lib as learn more about CE and the win32 gui api. I have successfully put a big button on the screen in place of the Edit box.. (my win32gui skills are VERY rudimentary at this point... :)) Woohoo... and I want the button press to exit the program. I can't seem to get this done. My OnButtonPress method is getting called and I have tried PostMessage, SendMessage, PostQuitMessage to the main window and my button window, but it ignores all that. Any ideas as to what I should tell to go bye-bye? Thanks! Brian From telionce@yahoo.com Tue Oct 8 21:42:20 2002 From: telionce@yahoo.com (Telion) Date: Tue, 8 Oct 2002 13:42:20 -0700 (PDT) Subject: [PythonCE] GUI fun In-Reply-To: <500D8E58-DAF1-11D6-9447-003065F89450@ablelinktech.com> Message-ID: <20021008204220.81619.qmail@web21104.mail.yahoo.com> --- Brian Brown wrote: > Greetings! > I've been playing with modifying ceshell.py to try out different GUI > elements with the intention of building a wrapper for the win32gui lib > as learn more about CE and the win32 gui api. I have successfully put a > big button on the screen in place of the Edit box.. (my win32gui skills > are VERY rudimentary at this point... :)) Woohoo... and I want the > button press to exit the program. I can't seem to get this done. My > OnButtonPress method is getting called and I have tried PostMessage, > SendMessage, PostQuitMessage to the main window and my button window, > but it ignores all that. Any ideas as to what I should tell to go > bye-bye? > > > Thanks! > > Brian > Hi Brian, Maybe you will find the answer in pcceshell.py Search pcceshell.py with, "Term"and "destroy". If you are interested in learning, I think Mark's work for Win9x/NT contains many thing we can use. (pcceshell.py is made by Mark, I think) http://starship.python.net/crew/mhammond/win32/ CVS Browsing http://www.pythonpros.com/cgi-bin/cvsweb.cgi/PyWin32/ There are many example for win32 api, or MFC in eVT. eVT3.0 is available from MS virtually free of charge (just S & H) The helpfile of eVT is really useful. Also, we can learn from many examples available on the net, (CodeGuru, etc) ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From bkc@murkworks.com Tue Oct 8 22:24:58 2002 From: bkc@murkworks.com (Brad Clements) Date: Tue, 08 Oct 2002 17:24:58 -0400 Subject: [PythonCE] Open File dialog example In-Reply-To: References: <20021008125451.90367.qmail@web21102.mail.yahoo.com> Message-ID: <3DA314AB.12954.64835D6@localhost> On 8 Oct 2002 at 13:50, Aaron J Reichow wrote: > Anyone looked into Anygui (http://anygui.sf.net) or > PythonWin (http://starship.python.net/crew/mhammond/win32)? WinCE is a > *SUBSET* of the regular Windows Win32 API. PythonWin should be adaptable > to it. But as I've said, I'm not Windoze or Python guru. Pythonwin requires win32ui which has not been ported. I tried it, but there are differences with rich text control and some other stuff. I ran out of time. I think getting wxWindows/wxPython on there is the best bet, and wxWindows folks claim to be working on a CE port but I see little progress since march 2002. Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From jbauer@rubic.com Tue Oct 8 22:10:30 2002 From: jbauer@rubic.com (Jeff Bauer) Date: Tue, 08 Oct 2002 16:10:30 -0500 Subject: [PythonCE] Open File dialog example References: <20021008125451.90367.qmail@web21102.mail.yahoo.com> <3DA314AB.12954.64835D6@localhost> Message-ID: <3DA349C6.77A4736D@rubic.com> Brad Clements wrote: > I think getting wxWindows/wxPython on there is the > best bet, and wxWindows folks claim to be working on > a CE port but I see little progress since march 2002. I've seen little progress on that front since 1999. :-( Jeff Bauer Rubicon Research From telionce@yahoo.com Wed Oct 9 16:39:15 2002 From: telionce@yahoo.com (Telion) Date: Wed, 9 Oct 2002 08:39:15 -0700 (PDT) Subject: [PythonCE] Cabfile distribution for HPC2000 Message-ID: <20021009153915.57440.qmail@web21104.mail.yahoo.com> I made Cabfile distribution for HPC2000. You can download directly to your HPC and install, if you like. What it does: It will allow you to install in the directory of your choice. (But we can't install to an existing direcotry) It will set fileassociation with Python and .py, .pyc. It will create a shortcut and place it in the start menu. Most of optional features are integrated. (See readme file for detail) What it doesn't: It will not uninstall totally. (This is mostly due to .pyc files created by compilation) It does not include Documents, test suites, DEMO, and other script/module directories. Depending on how you feel about the size, I'll make zipped version of Cabfile. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/HPC2000_3aMIPS_26ARM Please try out and tell me if there is any problem. PS. I made this Cabfile with the installer utility created by Javier. Although I used lower level interface, it has nice wxWindow GUI interface, as well. This utility saved me a lot. of time. Thank you, Javier. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From gouaich@lirmm.fr Thu Oct 10 11:34:43 2002 From: gouaich@lirmm.fr (GOUAICH Abdelkader) Date: Thu, 10 Oct 2002 12:34:43 +0200 Subject: [PythonCE] Socket Module for python CE. Message-ID: Hi there, I have downloaded and correctly installed the python for ce interpreter. However the _socket module seems to be not included in the distribution! Could you please give me more information about this. I want to use communication facilities between the Pocket PC and the network. Thanks. GOUAICH Abdelkader, Phd Student. From jim@burtcom.com Thu Oct 10 14:20:30 2002 From: jim@burtcom.com (Jim Burton) Date: Thu, 10 Oct 2002 07:20:30 -0600 Subject: [PythonCE] Cabfile distribution for HPC2000 In-Reply-To: <20021009153915.57440.qmail@web21104.mail.yahoo.com> Message-ID: <0C96F990-DC53-11D6-9786-00039398E6D8@burtcom.com> On Wednesday, October 9, 2002, at 09:39 AM, Telion wrote: > > I made Cabfile distribution for HPC2000. > > [snip]. > > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/ > HPC2000_3aMIPS_26ARM > > This worked well -- and it successfully registered .py so it opens script files properly from a Storage Card too. Thanks! From degs@giantblob.com Thu Oct 10 14:42:27 2002 From: degs@giantblob.com (degs) Date: Thu, 10 Oct 2002 14:42:27 +0100 Subject: [PythonCE] Installing Python 2.2R2 on IPAQ 3950/Pocket PC 2002 Message-ID: <009901c27062$df7afb40$0301a8c0@development> Hi, I'm trying to get Python (PPCPythonR2.zip) running on an IPAQ 3950. This is a Pocket PC 2002 machine. I've followed the instructions in the release notes at http://www.murkworks.com/Research/Python/PocketPCPython/PPCPythonR2Notes but I get an error trying to start Python. Although my hardware is different, the error itself looks identical to a problem mentioned previously on this list: http://mail.python.org/pipermail/pythonce/2002-February/000006.html I've looked through the list archive it doesn't look like this problem was resolved at the time. I would appriciate any suggestions as to how to get Python running on this machine under. In particular: - Should I expect this configuration to work - Is there a more recent version of Python for Windows CE that I should be using? (I have MS eMbedded Visual C so I guess I could build from source if I needed to) Thanks, -- degs From bkc@murkworks.com Thu Oct 10 14:56:44 2002 From: bkc@murkworks.com (Brad Clements) Date: Thu, 10 Oct 2002 09:56:44 -0400 Subject: [PythonCE] Socket Module for python CE. In-Reply-To: Message-ID: <3DA54E94.31289.EFA92CC@localhost> which platform and where did you download it from? On 10 Oct 2002 at 12:34, GOUAICH Abdelkader wrote: From: "GOUAICH Abdelkader" To: Copies to: Subject: [PythonCE] Socket Module for python CE. Date sent: Thu, 10 Oct 2002 12:34:43 +0200 > > > Hi there, > > I have downloaded and correctly installed the python for ce interpreter. > However the _socket module seems to be not included in the distribution! > Could you please give me more information about this. I want to use > communication facilities between the Pocket PC and the network. > > Thanks. > > GOUAICH Abdelkader, > Phd Student. > > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From telionce@yahoo.com Thu Oct 10 21:04:42 2002 From: telionce@yahoo.com (Telion) Date: Thu, 10 Oct 2002 13:04:42 -0700 (PDT) Subject: [PythonCE] Cabfile distribution for HPC2000 Message-ID: <20021010200442.9114.qmail@web21109.mail.yahoo.com> --- Jim Burton wrote: > > On Wednesday, October 9, 2002, at 09:39 AM, Telion wrote: > > > > > I made Cabfile distribution for HPC2000. > > > > [snip]. > > > > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/ > > HPC2000_3aMIPS_26ARM > > > > > > This worked well -- and it successfully registered .py so it opens > script files properly from a Storage Card too. Thanks! > Thank you for reporting. I'm very glad to hear that it works and it solved your problem. Tell me if you find something that ccould be improved. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Thu Oct 10 21:07:23 2002 From: telionce@yahoo.com (Telion) Date: Thu, 10 Oct 2002 13:07:23 -0700 (PDT) Subject: [PythonCE] Installing Python 2.2R2 on IPAQ 3950/Pocket PC 2002 Message-ID: <20021010200723.10203.qmail@web21109.mail.yahoo.com> --- degs wrote: > Hi, > > I'm trying to get Python (PPCPythonR2.zip) running on an IPAQ 3950. This > is a Pocket PC 2002 machine. I've followed the instructions in the > release notes at > http://www.murkworks.com/Research/Python/PocketPCPython/PPCPythonR2Notes > but I get an error trying to start Python. > > Although my hardware is different, the error itself looks identical to a > problem mentioned previously on this list: > http://mail.python.org/pipermail/pythonce/2002-February/000006.html > > I've looked through the list archive it doesn't look like this problem > was resolved at the time. > > I would appriciate any suggestions as to how to get Python running on > this machine under. In particular: > - Should I expect this configuration to work > - Is there a more recent version of Python for Windows CE that I > should be using? (I have MS eMbedded Visual C so I guess I could build > from source if I needed to) > > Thanks, > -- degs > Hi degs, I can't say for sure (since I don't have PPC), but PPC2002 may require a little bit of modification on source file. (Does anyone knows about the differnce between PPC and PPC2002, as well as new CPU?) If you can setup eVC for building Python, and make it work for PPC2002, that would help lots of people. Please take a look at troubleshooting section of PythonCE wiki, too. I added a few lines on Startup problems. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/StartingPython If you find the cause of problem, please tell us. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From lists@giantblob.com Thu Oct 10 23:14:02 2002 From: lists@giantblob.com (degs) Date: Thu, 10 Oct 2002 23:14:02 +0100 Subject: [PythonCE] Installing Python 2.2R2 on IPAQ 3950/Pocket PC 2002 In-Reply-To: <20021010200723.10203.qmail@web21109.mail.yahoo.com> Message-ID: <010101c270aa$5786d2c0$0301a8c0@development> Hi, To be honest I've no idea what the differences between PPC2002 and previous versions - some older stuff I've downloaded seems to build OK other stuff not - I've only been playing about with it for a couple of days. I'll have a go tommorow. Is there an anon CVS server I can get the current source from or what? -- degs > -----Original Message----- > From: pythonce-admin@python.org > [mailto:pythonce-admin@python.org] On Behalf Of Telion > Sent: 10 October 2002 21:07 > To: pythonce@python.org > Subject: [PythonCE] Installing Python 2.2R2 on IPAQ > 3950/Pocket PC 2002 > > > --- degs wrote: > > Hi, > > > > I'm trying to get Python (PPCPythonR2.zip) running on an IPAQ 3950. > This > > is a Pocket PC 2002 machine. I've followed the instructions in the > > release notes at > > > http://www.murkworks.com/Research/Python/PocketPCPython/PPCPyt > honR2Notes > > but I get an error trying to start Python. > > > > Although my hardware is different, the error itself looks identical > to a > > problem mentioned previously on this list: > > http://mail.python.org/pipermail/pythonce/2002-February/000006.html > > > > I've looked through the list archive it doesn't look like this > problem > > was resolved at the time. > > > > I would appriciate any suggestions as to how to get Python > running on > > this machine under. In particular: > > - Should I expect this configuration to work > > - Is there a more recent version of Python for Windows > CE that I > > should be using? (I have MS eMbedded Visual C so I guess I could > build > > from source if I needed to) > > > > Thanks, > > -- degs > > > > Hi degs, > > I can't say for sure (since I don't have PPC), but PPC2002 > may require a little bit of modification on source file. > > (Does anyone knows about the differnce between PPC and > PPC2002, as well as new CPU?) > > If you can setup eVC for building Python, and make it work > for PPC2002, that would help lots of people. > > Please take a look at troubleshooting section of PythonCE > wiki, too. I added a few lines on Startup problems. > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/StartingP ython If you find the cause of problem, please tell us. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce From bkc@murkworks.com Thu Oct 10 23:45:12 2002 From: bkc@murkworks.com (Brad Clements) Date: Thu, 10 Oct 2002 18:45:12 -0400 Subject: [PythonCE] Socket Module for python CE. In-Reply-To: References: <3DA54E94.31289.EFA92CC@localhost> Message-ID: <3DA5CA6E.13328.10DE67B6@localhost> (please lets keep all of this on the pythonce list for the archives and benefit of others) Try downloading: ftp://ftp.murkworks.com/pub/beta/pycearmcore4.zip On 10 Oct 2002 at 16:00, GOUAICH Abdelkader wrote: From: "GOUAICH Abdelkader" To: Subject: RE: [PythonCE] Socket Module for python CE. Date sent: Thu, 10 Oct 2002 16:00:09 +0200 > > > Here is the ny config: > > IPAQ 3600 Pocket PC > CE 3.0 > > I've dowloaded the PPCPython Release 2 from : > http://www.murkworks.com/Research/Python/PocketPCPython/PPCPythonR2Notes > > ... > > -----Original Message----- > From: pythonce-admin@python.org [mailto:pythonce-admin@python.org]On > Behalf Of Brad Clements > Sent: jeudi 10 octobre 2002 15:57 > To: pythonce@python.org > Subject: Re: [PythonCE] Socket Module for python CE. > > > which platform and where did you download it from? > > On 10 Oct 2002 at 12:34, GOUAICH Abdelkader wrote: > > From: "GOUAICH Abdelkader" > To: > Copies to: > Subject: [PythonCE] Socket Module for python CE. > Date sent: Thu, 10 Oct 2002 12:34:43 +0200 > > > > > > > Hi there, > > > > I have downloaded and correctly installed the python for ce interpreter. > > However the _socket module seems to be not included in the distribution! > > Could you please give me more information about this. I want to use > > communication facilities between the Pocket PC and the network. > > > > Thanks. > > > > GOUAICH Abdelkader, > > Phd Student. > > > > > > _______________________________________________ > > PythonCE mailing list > > PythonCE@python.org > > http://mail.python.org/mailman/listinfo/pythonce > > > Brad Clements, bkc@murkworks.com (315)268-1000 > http://www.murkworks.com (315)268-9812 Fax > AOL-IM: BKClements > > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From goodey27@juno.com Thu Oct 10 19:55:42 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Thu, 10 Oct 2002 14:55:42 -0400 Subject: [PythonCE] input(...) and more Message-ID: <20021010.145543.1848.0.goodey27@juno.com> 1) I previously posted about the Hourglass coming up when using the input(...) & raw_input(...) functions. I just want too mention. That when I run a script by double clicking it , I don't have this problem. 2) Another question, I'm looking for a way to get the path of the script, inside the script. Is there any way to do this. Greetings Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From bkc@murkworks.com Fri Oct 11 14:20:40 2002 From: bkc@murkworks.com (Brad Clements) Date: Fri, 11 Oct 2002 09:20:40 -0400 Subject: [PythonCE] Socket Module for python CE. In-Reply-To: References: <3DA5CA6E.13328.10DE67B6@localhost> Message-ID: <3DA6979C.20843.13FFF061@localhost> Again, please reply to the list, not to me directly. Sorry, wrong url, try: ftp://ftp.murkworks.com/beta/pycearmcore4.zip On 11 Oct 2002 at 12:52, GOUAICH Abdelkader wrote: From: "GOUAICH Abdelkader" To: Subject: RE: [PythonCE] Socket Module for python CE. Date sent: Fri, 11 Oct 2002 12:52:24 +0200 > > > I m sorry but the ftp site seems to not contain the beta folder and zip file > ,( > Can i have the file from another location? > > -----Original Message----- > From: pythonce-admin@python.org [mailto:pythonce-admin@python.org]On > Behalf Of Brad Clements > Sent: vendredi 11 octobre 2002 00:45 > To: pythonce@python.org > Subject: RE: [PythonCE] Socket Module for python CE. > > > (please lets keep all of this on the pythonce list for the archives and > benefit of others) > > > Try downloading: > > ftp://ftp.murkworks.com/pub/beta/pycearmcore4.zip > > > > On 10 Oct 2002 at 16:00, GOUAICH Abdelkader wrote: > > From: "GOUAICH Abdelkader" > To: > Subject: RE: [PythonCE] Socket Module for python CE. > Date sent: Thu, 10 Oct 2002 16:00:09 +0200 > > > > > > > Here is the ny config: > > > > IPAQ 3600 Pocket PC > > CE 3.0 > > > > I've dowloaded the PPCPython Release 2 from : > > http://www.murkworks.com/Research/Python/PocketPCPython/PPCPythonR2Notes > > > > ... > > > > -----Original Message----- > > From: pythonce-admin@python.org [mailto:pythonce-admin@python.org]On > > Behalf Of Brad Clements > > Sent: jeudi 10 octobre 2002 15:57 > > To: pythonce@python.org > > Subject: Re: [PythonCE] Socket Module for python CE. > > > > > > which platform and where did you download it from? > > > > On 10 Oct 2002 at 12:34, GOUAICH Abdelkader wrote: > > > > From: "GOUAICH Abdelkader" > > To: > > Copies to: > > Subject: [PythonCE] Socket Module for python CE. > > Date sent: Thu, 10 Oct 2002 12:34:43 +0200 > > > > > > > > > > > Hi there, > > > > > > I have downloaded and correctly installed the python for ce interpreter. > > > However the _socket module seems to be not included in the > distribution! > > > Could you please give me more information about this. I want to use > > > communication facilities between the Pocket PC and the network. > > > > > > Thanks. > > > > > > GOUAICH Abdelkader, > > > Phd Student. > > > > > > > > > _______________________________________________ > > > PythonCE mailing list > > > PythonCE@python.org > > > http://mail.python.org/mailman/listinfo/pythonce > > > > > > Brad Clements, bkc@murkworks.com (315)268-1000 > > http://www.murkworks.com (315)268-9812 Fax > > AOL-IM: BKClements > > > > > > _______________________________________________ > > PythonCE mailing list > > PythonCE@python.org > > http://mail.python.org/mailman/listinfo/pythonce > > > > > Brad Clements, bkc@murkworks.com (315)268-1000 > http://www.murkworks.com (315)268-9812 Fax > AOL-IM: BKClements > > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements From telionce@yahoo.com Fri Oct 11 20:10:53 2002 From: telionce@yahoo.com (Telion) Date: Fri, 11 Oct 2002 12:10:53 -0700 (PDT) Subject: [PythonCE] input(...) and more In-Reply-To: <20021010.145543.1848.0.goodey27@juno.com> Message-ID: <20021011191053.73176.qmail@web21102.mail.yahoo.com> --- goodey27@juno.com wrote: > 1) I previously posted about the Hourglass coming up when using the > input(...) & raw_input(...) functions. > > I just want too mention. That when I run a script by double clicking it , > I don't have this problem. I guees it has to do something with thread related issue. Maybe sending a message to somewhere will eeliminate. But I don't know. Let's see if someone who knows better than me can come up with solution. > > 2) Another question, I'm looking for a way to get the path of the script, > inside the script. Is there any way to do this. > > Greetings > Isr > Do you mean samething as when you do this? >>> import re >>> re >>>dir(re) ['DOTALL', 'I', 'IGNORECASE', 'L', 'LOCALE', 'M', 'MULTILINE', 'S', 'U', 'UNICODE', 'VERBOSE', 'X', '__all__', '__builtins__', '__doc__', '__file__', '__name__', 'compile', 'engine', 'error', 'escape', 'findall', 'match', 'purge', 'search', 'split', 'sub', 'subn', 'template'] >>> re.__name__ 're' >>> re.__file__ '\\MemCard2\\zzPython22\\lib\\re.pyc' So, __file__ would give you the path for the script. To test, create a file with something like this, print locals().keys() print globals().keys() print __name__ print __file__ and put it under within sys.path. import that module and you can see that works. If you are interested in "Know yourself" type of thing, frame object gives you many informations. >>> dir(sys._getframe(0)) ['__class__', '__delattr__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__repr__', '__setattr__', '__str__', 'f_back', 'f_builtins', 'f_code', 'f_exc_traceback', 'f_exc_type', 'f_exc_value', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_restricted', 'f_trace'] >>> >>> sys._getframe(2).f_code >>> sys._getframe(2).f_locals {'cmdToExecute': None, 'i': 0, 'shell': , 'bKeepOpen': 0, 'bInteract': 1} >>> dir(sys._getframe(2).f_code) ['__class__', '__cmp__', '__delattr__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__repr__', '__setattr__', '__str__', 'co_argcount', 'co_cellvars', 'co_code', 'co_consts', 'co_filename', 'co_firstlineno', 'co_flags', 'co_freevars', 'co_lnotab', 'co_name', 'co_names', 'co_nlocals', 'co_stacksize', 'co_varnames'] >>> sys._getframe(2).f_code.co_names ('sys', 'argv', 'appargv', 'bKeepOpen', 'bInteract', 'None', 'cmdToExecute', 'filter', 'i', 'len', 'string', 'join', 'traceback', 'print_exc', 'fname', 'os', 'path', 'splitext', 'ext', 'mode', 'imp', 'PY_COMPILED', 'imp_params', 'PY_SOURCE', 'open', 'file', 'IOError', 'code', 'why', 'load_module', 'close', 'Interact', 'shell', 'PostThreadMessage', 'shellThreadId', 'WM_QUIT') >>> sys._getframe(2).f_code.co_varnames ('shell', 'imp_params', 'code', 'file', 'why', 'bInteract', 'i', 'cmdToExecute', 'ext', 'bKeepOpen', 'mode', 'fname') >>> >>> sys._getframe(2).f_code.co_filename '\\MemCard2\\zzPython22\\pcceshell.py' >>> >>> sys._getframe(1).f_code.co_filename '\\MemCard2\\zzPython22\\pcceshell.py' >>> >>> sys._getframe(0).f_code.co_filename '' By inpecting frame object, you can know the file name, too. File name of caller script, as well. Each frame belongs to module, function, class, methods, etc... And it makes its own namespace universe, I guess. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Fri Oct 11 20:13:33 2002 From: telionce@yahoo.com (Telion) Date: Fri, 11 Oct 2002 12:13:33 -0700 (PDT) Subject: [PythonCE] Installing Python 2.2R2 on IPAQ 3950/Pocket PC 2002 In-Reply-To: <010101c270aa$5786d2c0$0301a8c0@development> Message-ID: <20021011191333.83304.qmail@web21110.mail.yahoo.com> --- degs wrote: > Hi, > > To be honest I've no idea what the differences between PPC2002 and > previous versions - some older stuff I've downloaded seems to build OK > other stuff not - I've only been playing about with it for a couple of > days. > > I'll have a go tommorow. Is there an anon CVS server I can get the > current source from or what? > > -- degs For the source, please go to Wiki Release page. I put information there. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/Releases ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Fri Oct 11 20:36:03 2002 From: telionce@yahoo.com (Telion) Date: Fri, 11 Oct 2002 12:36:03 -0700 (PDT) Subject: [PythonCE] input(...) and more In-Reply-To: <20021011191053.73176.qmail@web21102.mail.yahoo.com> Message-ID: <20021011193603.95417.qmail@web21104.mail.yahoo.com> I forgto to say that help() is extremely usefull. It will take time for first time (maybe a minute or so), but it gives you lots of infomation about module, function, class, etc. Just type help(some_object) at prompt. Also, you may go into interactive help mode by calling without arguments. >>> help() This help() is provided by pydoc module. It means, by studying pydoc module, we eill know how to gather information about python objects. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Sat Oct 12 01:33:23 2002 From: telionce@yahoo.com (Telion) Date: Fri, 11 Oct 2002 17:33:23 -0700 (PDT) Subject: [PythonCE] input(...) and more In-Reply-To: <20021010.145543.1848.0.goodey27@juno.com> Message-ID: <20021012003323.10156.qmail@web21103.mail.yahoo.com> I think the cause was this found in pcceshell.py around line:508 or so. SetCursor(LoadCursor(0, IDC_WAIT)) If so, solution is simple. Just issue this in the readline() method of SimpleShell class, and the annoying HourGlass should disappear. SetCursor(LoadCursor(0, 0)) You can try it by yourself with a text editor or notepad. If you are not sure, I will upload it later. Right now, I am updatating pdb.py pydoc.py and a few other things, so that help() function and pdb works better. I am thinking about automatic update script that will rename and keep old file,and then download new files from server. Only thing you have to do is, >>> import ceupdate >>> ceupdate.check() 2 modules to update ['pdb.py', 'pydoc.py'] Total of xxxxKB Do you want to proceed (y/n)? y Renaming old pdb.py to pdb.py-0 Downloading new pdb.py Renaming old pydoc.py to pydoc.py-0 Downloading new pydoc.py Update completed. Quit and restart PythonCE now! ============ Something like this. Anyone intersted in writing it? Telion --- goodey27@juno.com wrote: > 1) I previously posted about the Hourglass coming up when using the > input(...) & raw_input(...) functions. > > I just want too mention. That when I run a script by double clicking it , > I don't have this problem. > > Greetings > Isr > ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From dr.mnagel@t-online.de Sat Oct 12 10:35:00 2002 From: dr.mnagel@t-online.de (Matthias) Date: Sat, 12 Oct 2002 11:35:00 +0200 Subject: [PythonCE] Toshoba e330 Python fpr Pocket PC with Xscale Message-ID: <000001c271d2$a33dc380$0701a8c0@matthias> This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C271E3.66C69380 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I have a Toshiba PPC e330. Exist a binary for Xscale? Thanks in Advance. Matthias Nagel ------=_NextPart_000_0001_01C271E3.66C69380 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have a Toshiba PPC = e330.

Exist a binary for = Xscale?

 

Thanks in = Advance.

 

Matthias = Nagel

------=_NextPart_000_0001_01C271E3.66C69380-- From telionce@yahoo.com Sat Oct 12 13:34:05 2002 From: telionce@yahoo.com (Telion) Date: Sat, 12 Oct 2002 05:34:05 -0700 (PDT) Subject: [PythonCE] Toshoba e330 Python fpr Pocket PC with Xscale In-Reply-To: <000001c271d2$a33dc380$0701a8c0@matthias> Message-ID: <20021012123405.32241.qmail@web21107.mail.yahoo.com> --- Matthias wrote: > I have a Toshiba PPC e330. > Exist a binary for Xscale? > > Thanks in Advance. > > Matthias Nagel > Hi Mattias, I don't know if somebody has already build PythonCE for PPC2002 or xscale. Right now, I don't have PPC2002 SDK on my eVT, and I can't build. I don't even know the exact difference and what we should do, yet. I have already too many things to learn. I think it's better if the owner of XScale device do the work. Any volunteer? Developement environment eVT3.0 is availablbe virtually FREE form MS. (I appreciate MS for this, and for source code of CE3.0) I was a brand new novice for Python and Win32 programming when I started last year. So, it's not that difficult. (It may not be easy, either) I'm wondering why these MS people who showed up here are not building and sending patch for PPC2002. It should be a piece of cake for these guys. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From ppcquicksoft@iespana.es Sat Oct 12 17:06:42 2002 From: ppcquicksoft@iespana.es (Javier) Date: Sat, 12 Oct 2002 18:06:42 +0200 Subject: [PythonCE] Toshoba e330 Python fpr Pocket PC with Xscale In-Reply-To: <20021012123405.32241.qmail@web21107.mail.yahoo.com> References: <000001c271d2$a33dc380$0701a8c0@matthias> Message-ID: <5.1.0.14.0.20021012180340.00ba3c28@pop.iespana.es> All, XScale is binary compatible with ARM. So any application targetted at ARM=20 machines will run on XScale ones. There is little difference beyond cosmetics between PPC 2002 and PPC 2000.= =20 Again, any application targetted at PPC 2000 will run surely under PPC=20 2002. The way around may present some issues, specially on mail related=20 applications and applications accessing users databases via POOM. Cheers Javier P.S. The normal Python22.dll build runs perfectly under 2000 and 2002. I=20 use them both! At 05:34 12/10/2002 -0700, Telion wrote: >--- Matthias wrote: > > I have a Toshiba PPC e330. > > Exist a binary for Xscale? > > > > Thanks in Advance. > > > > Matthias Nagel > > > >Hi Mattias, > >I don't know if somebody has already build PythonCE for PPC2002 or xscale. >Right now, I don't have PPC2002 SDK on my eVT, and I can't build. > >I don't even know the exact difference and what we should do, yet. >I have already too many things to learn. >I think it's better if the owner of XScale device do the work. > >Any volunteer? >Developement environment eVT3.0 is availablbe virtually FREE form MS. >(I appreciate MS for this, and for source code of CE3.0) > >I was a brand new novice for Python and Win32 programming >when I started last year. >So, it's not that difficult. (It may not be easy, either) > >I'm wondering why these MS people who showed up here >are not building and sending patch for PPC2002. >It should be a piece of cake for these guys. > > > >=3D=3D=3D=3D=3D >Telion >- telionce@yahoo.com - >http://pages.ccapcable.com/lac/PythonCE.html > >__________________________________________________ >Do you Yahoo!? >Faith Hill - Exclusive Performances, Videos & More >http://faith.yahoo.com > >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce > >___________________________________________________________________________= _ >=BFBuscas amigos, gente con quien hablar? =DAnete a los miles de sin= pareja que >se registran cada d=EDa en Meetic...=A1te vas a enamorar! >http://www.iespana.es/_reloc/email.meetic ____________________________________________________________________________ Para recibir mejor tus mensajes, utiliza un PC más puntero! Aprovéchate de las mejores ofertas que Dell te propone en exclusiva en i (españa) http://www.iespana.es/_reloc/email.dell From telionce@yahoo.com Sat Oct 12 17:41:42 2002 From: telionce@yahoo.com (Telion) Date: Sat, 12 Oct 2002 09:41:42 -0700 (PDT) Subject: [PythonCE] Toshoba e330 Python fpr Pocket PC with Xscale In-Reply-To: <5.1.0.14.0.20021012180340.00ba3c28@pop.iespana.es> Message-ID: <20021012164142.10659.qmail@web21103.mail.yahoo.com> --- Javier wrote: > All, > > XScale is binary compatible with ARM. So any application targetted at ARM > machines will run on XScale ones. > > There is little difference beyond cosmetics between PPC 2002 and PPC 2000. > Again, any application targetted at PPC 2000 will run surely under PPC > 2002. The way around may present some issues, specially on mail related > applications and applications accessing users databases via POOM. > > Cheers > > Javier > > P.S. The normal Python22.dll build runs perfectly under 2000 and 2002. I > use them both! > Thank you, Javier. It's good to know that we don't have to build for yet another platform. Then, maybe his case is not because of CPU or PPC2002. http://mail.python.org/pipermail/pythonce/2002-October/000215.html ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Sun Oct 13 19:14:26 2002 From: telionce@yahoo.com (Telion) Date: Sun, 13 Oct 2002 11:14:26 -0700 (PDT) Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 Message-ID: <20021013181426.75580.qmail@web21108.mail.yahoo.com> I made a patched pydoc.py and and pdb.py that will run better. Previously, pydoc.py crashed PythonCE2.2+ HPC2000 when you do help('if') or other topic in string form. It was due to possible bug in _sre module. If you had similar problem in PPC version of PythonCE2.2+, probably this will solve that, too. Small change in pdb.py is for pdb.help(). On PPC, lack of os.system would prevent you from using this function. On HPC, lack of ${PAGER-man} caused problem. Now, if os.system fails, pdb.help() will simply print everything on your interpreter console. Other than that, I added commented entries for os.environ setting in the site.py. You need this for a few things. example: If you downloaded and placed Python's Current documentation package somewhere other than sys.prefix\doc, you have to specify the path to os.environ['PYTHONDOCS'] for pydoc help(). pydoc's help() may take a few minutes to compile its component for the first start up, but it is very helpful. For more details and updated files, visit; http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/Update-02-10-12-HPC2000 Cabfile distribution are already updated with all of these changes. If you are not sure your PythonCE2.2+HPC2000 is new one or not, try this; >>> import sys >>> sys.cesite '02/10/12 10:04 modified site.py: mbcs + os.getcwd, os.chdir, env emu' If you get the same result, you have current distribution and you don't have to do anything. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From goodey27@juno.com Mon Oct 14 19:54:22 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Mon, 14 Oct 2002 14:54:22 -0400 Subject: [PythonCE] (no subject) Message-ID: <20021014.145423.1972.0.goodey27@juno.com> I'm looking to be able to start another .exe with Pythhon. I see there are some functions in the os module to do this. What I whant to know is whitch ones are implemented in WinCE. It seems none of the spawn*(...) funcs are available and when I tried os.execl(...) I got this error: "Traceback (most recent call last): File "\Program Files\Python\lib\pcceshell.py", line 524, in Interact exec codeOb in locals File "", line 1, in ? NameError: global name 'execv' is not definedq" Please help Thanks Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From carl@orangeimagineering.com Mon Oct 14 20:13:17 2002 From: carl@orangeimagineering.com (Carl Shimer) Date: Mon, 14 Oct 2002 15:13:17 -0400 Subject: [PythonCE] (no subject) Message-ID: Our good friends at Microsoft decided that in their infinite wisdom it was not necessary to include certain standard functions in the PocketPC C runtime (spawn, system, exec, etc). Therefore, certain functions are not supported by pythonCE because they would require writing the missing portions of the C runtime. =20 Fortunately, you have a couple options: * use the shell API's to launch an application. I think these are exposed through the win32gui module. I haven't tried this approach myself. * Write a C based extension that mimics your required functionality by wrapping the CreateProcess Win32 API. This is the approach that I followed to implement the system() call. I have implemented a simple module called pyce_exec that provides this functionality although it is not yet production quality code :) Obviously, this support for system() should be rolled into the pythonCE code base. I would be happy to mail you this extension. Regards, Carl -----Original Message----- From: goodey27@juno.com [mailto:goodey27@juno.com]=20 Sent: Monday, October 14, 2002 2:54 PM To: pythonce@python.org Subject: [PythonCE] (no subject) I'm looking to be able to start another .exe with Pythhon. I see there are some functions in the os module to do this. What I whant to know is whitch ones are implemented in WinCE.=20 It seems none of the spawn*(...) funcs are available and when I tried os.execl(...) I got this error: "Traceback (most recent call last): File "\Program Files\Python\lib\pcceshell.py", line 524, in Interact exec codeOb in locals File "", line 1, in ? NameError: global name 'execv' is not definedq" Please help Thanks Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce From goodey27@juno.com Mon Oct 14 20:57:47 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Mon, 14 Oct 2002 15:57:47 -0400 Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 Message-ID: <20021014.161202.1972.2.goodey27@juno.com> Would these files and changes also work on PocketPC Isr On Sun, 13 Oct 2002 11:14:26 -0700 (PDT) Telion writes: > > I made a patched pydoc.py and and pdb.py > that will run better. > > Previously, pydoc.py crashed PythonCE2.2+ HPC2000 > when you do help('if') or other topic in string form. > It was due to possible bug in _sre module. > > If you had similar problem in PPC version of PythonCE2.2+, > probably this will solve that, too. > > Small change in pdb.py is for pdb.help(). > On PPC, lack of os.system would prevent you from using this > function. > On HPC, lack of ${PAGER-man} caused problem. > Now, if os.system fails, pdb.help() will simply print everything > on your interpreter console. > > Other than that, I added commented entries for os.environ setting > in the site.py. > You need this for a few things. > > example: > > If you downloaded and placed Python's Current documentation package > somewhere other than sys.prefix\doc, you have to specify the path > to > os.environ['PYTHONDOCS'] for pydoc help(). > > pydoc's help() may take a few minutes to compile its component > for the first start up, but it is very helpful. > > For more details and updated files, visit; > > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/Update-02- 10-12-HPC2000 > > Cabfile distribution are already updated with all of these changes. > If you are not sure your PythonCE2.2+HPC2000 is new one or not, > try this; > > >>> import sys > >>> sys.cesite > '02/10/12 10:04 modified site.py: mbcs + os.getcwd, os.chdir, env > emu' > > If you get the same result, you have current distribution and you > don't > have to do anything. > > > > ===== > Telion > - telionce@yahoo.com - > http://pages.ccapcable.com/lac/PythonCE.html > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Tue Oct 15 00:54:00 2002 From: telionce@yahoo.com (Telion) Date: Mon, 14 Oct 2002 16:54:00 -0700 (PDT) Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 In-Reply-To: <20021014.161202.1972.2.goodey27@juno.com> Message-ID: <20021014235400.15053.qmail@web21103.mail.yahoo.com> --- goodey27@juno.com wrote: > Would these files and changes also work on PocketPC > > Isr > > On Sun, 13 Oct 2002 11:14:26 -0700 (PDT) Telion > writes: > > > > I made a patched pydoc.py and and pdb.py > > that will run better. I think pydoc.py and pdb.py should run on PPC, too. Try them a try. For os.execX and os.system, I don't know if the distribution you use has these functions or not. You may be able to use win32process, patched os.py and osce.py from HPC2000 distribution for twhat you want. I will upload them later tonight. Most probably, you can use all components from HPC2000 distribution on PPC, except pcceshell.py, PocketPythonCE.exe, win32gui.pyd. Maybe I'll make a trial Cabdistribution for PPC by using samething as HPC2000 and replacing a few PPC specific files. HPC and PPC distribution could be almost entirely identical, and that will make maintenance easier. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Tue Oct 15 02:43:08 2002 From: telionce@yahoo.com (Telion) Date: Mon, 14 Oct 2002 18:43:08 -0700 (PDT) Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 In-Reply-To: <20021014235400.15053.qmail@web21103.mail.yahoo.com> Message-ID: <20021015014308.87515.qmail@web21101.mail.yahoo.com> Hi lsr, I made a zip that contain win32process, os.py osce.py, and calldll.pyd, edll.py. Rename old os.py and keep it as usual. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/osSystem-arm.zip You can use os.system(), os.execv() clone. They don't wait child process to finish because I used CreateProcess for imitating. I think they would work on PPC, but I'm not 100% sure about that. Try and tell me what you see. I also made a new pcceshell.py for PPC that should fix HourGlass problem. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/pcceshell.py.ppc_with_input.txt ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From goodey27@juno.com Mon Oct 14 21:11:13 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Mon, 14 Oct 2002 16:11:13 -0400 Subject: [PythonCE] Win32* files Message-ID: <20021014.161202.1972.3.goodey27@juno.com> Where can I get the win32GUI.py and win32event.py files for WinCE. And also where are the >py files for all the library files for CE Thanks Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From carl@orangeimagineering.com Tue Oct 15 15:56:11 2002 From: carl@orangeimagineering.com (Carl Shimer) Date: Tue, 15 Oct 2002 10:56:11 -0400 Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 Message-ID: In order to properly simulate os.system() you simply need to add a WaitForSingleProcess(handle) after createProcess. if(CreateProcess( wideexecName, // name of executable module,not necessary wideargs, // command line string NULL, // SID NULL, // SID FALSE, // handle inheritance option 0, // creation flags NULL, // environment NULL, // lpCurrentDirectory #ifndef UNDER_CE &startInfo, // not supported on windows CE #else NULL, #endif &procInfo)) { =09 WaitForSingleObject(procInfo.hProcess,INFINITE); CloseHandle(procInfo.hThread); CloseHandle(procInfo.hProcess); } -----Original Message----- From: Telion [mailto:telionce@yahoo.com]=20 Sent: Monday, October 14, 2002 9:43 PM To: PythonCE@python.org Subject: Re: [PythonCE] Minor update for PythonCE2.2+ HPC2000 Hi lsr, I made a zip that contain win32process, os.py osce.py, and calldll.pyd, edll.py. Rename old os.py and keep it as usual. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/o sSystem-arm.zip You can use os.system(), os.execv() clone.=20 They don't wait child process to finish because I used CreateProcess for imitating. I think they would work on PPC, but I'm not 100% sure about that. Try and tell me what you see. I also made a new pcceshell.py for PPC that should fix HourGlass problem. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/p cceshell.py.ppc_with_input.txt =3D=3D=3D=3D=3D Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce From telionce@yahoo.com Tue Oct 15 18:30:07 2002 From: telionce@yahoo.com (Telion) Date: Tue, 15 Oct 2002 10:30:07 -0700 (PDT) Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 In-Reply-To: Message-ID: <20021015173007.76910.qmail@web21109.mail.yahoo.com> --- Carl Shimer wrote: > > In order to properly simulate os.system() you simply need to add a > WaitForSingleProcess(handle) after createProcess. > > if(CreateProcess( > wideexecName, // name of executable module,not necessary > wideargs, // command line string > NULL, // SID > NULL, // SID > FALSE, // handle inheritance option > 0, // creation flags > NULL, // environment > NULL, // lpCurrentDirectory > #ifndef UNDER_CE > &startInfo, // not supported on windows CE > #else > NULL, > #endif > &procInfo)) { > > WaitForSingleObject(procInfo.hProcess,INFINITE); > > CloseHandle(procInfo.hThread); > CloseHandle(procInfo.hProcess); > } > I applied this to osce.py. os.system will wait until command returns. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/osce.py Thank you Carl! Now, PythonCE acts a little closer to standard Python. PS. I added GetExitCodeProcess to see if I can get exit status. But so far I'm getting always 0 ... ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From goodey27@juno.com Tue Oct 15 20:17:44 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Tue, 15 Oct 2002 15:17:44 -0400 Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 Message-ID: <20021015.153825.440.1.goodey27@juno.com> I put in the line of code you mentioned and it helped. If the new pcceshell.py has any other changes let me know . I ment the .py version of win32* files. I didnt try yet win32process.pyd, os.py, osce.py. Gotto wait when I have time Thanks for all the help Telion Isr On Mon, 14 Oct 2002 18:43:08 -0700 (PDT) Telion writes: > > Hi lsr, > > I made a zip that contain win32process, os.py osce.py, and > calldll.pyd, > edll.py. > Rename old os.py and keep it as usual. > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/os System-arm.zip > > You can use os.system(), os.execv() clone. > They don't wait child process to finish because I used CreateProcess > for > imitating. > > I think they would work on PPC, but I'm not 100% sure about that. > Try and tell me what you see. > > > I also made a new pcceshell.py for PPC that should fix HourGlass > problem. > http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/pc ceshell.py.ppc_with_input.txt > > ===== > Telion > - telionce@yahoo.com - > http://pages.ccapcable.com/lac/PythonCE.html > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > _______________________________________________ > PythonCE mailing list > PythonCE@python.org > http://mail.python.org/mailman/listinfo/pythonce > ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Tue Oct 15 23:32:40 2002 From: telionce@yahoo.com (Telion) Date: Tue, 15 Oct 2002 15:32:40 -0700 (PDT) Subject: [PythonCE] Minor update for PythonCE2.2+ HPC2000 In-Reply-To: <20021015.153825.440.1.goodey27@juno.com> Message-ID: <20021015223240.39964.qmail@web21103.mail.yahoo.com> --- goodey27@juno.com wrote: > I put in the line of code you mentioned and it helped. > > If the new pcceshell.py has any other changes let me know . No other modification, yet. Later I will put easy history, and command log that could be replayed. > > I ment the .py version of win32* files. Ahhh, there is no win32***.py file. These are extension modules written in C (or C++) and compiled. They come as .pyd. >From the point of view of user, .py, .pyc, and .pyd is not much different. You just import, and use them. I include .py in HPC2000 distribution because that may help some user to understand and learn Python. For .pyd files, if you want to see the source code, you have to get source tree distribution. (It's big, because it ontains the surce for all Python families including MAC and other OS specific code) To learn how to use these win32*** modules, I think best way is to buy the book written by Mark, who ported 1.52+ and created win32 extension. Other than that, ActivePython for desktop machine contain WinHelp for these win32*** modules, and eVC Help files tell the detail. Another very good way is to learn from the example like pcceshell.py. If you care to see the source code for win32gui.pyd, I uploaded it yesterday. It is called win32gui.i and SWIG (wrapper generator) will produuce c++ source code from it. And then, C++ compiler and linker will produce dll file. (.pyd is a dll file) > I didnt try yet win32process.pyd, os.py, osce.py. Gotto wait when I have > time I updated osce.py with the info given by Carl. So, get new one before to use. > > Thanks for all the help Telion > Isr > Your very welcome, and you are actually helping me to find out many things. Your feedback is helpful in correcting problems, too. Many others will benefit from your input. Let me know when you try os.system and ther stuff. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From telionce@yahoo.com Thu Oct 17 04:03:12 2002 From: telionce@yahoo.com (Telion) Date: Wed, 16 Oct 2002 20:03:12 -0700 (PDT) Subject: [PythonCE] HPC:pcceshell.py update Message-ID: <20021017030312.62301.qmail@web21102.mail.yahoo.com> I made a few changes in pcceshell.py for HPC. These are the features I wanted for myself. # Command history by Ctrl-B, Ctrl-N By pressing Ctrl-B, previous command will come up. You can repeat this until you get first command you typed, or maximum of 30 commands. This makes using Python much easier. Instead of tapping screen or going up with arrow key, Just CTRL-B will bring previously typed commands back, ready for execution or re-editing. By pressing Ctrl-N, you can return to newer commands, too. It works for multiple line command, too. (Not perfect, though) # Clear Screen by Alt-L When you have many lines in Screen, things get slow. So, I created shortcut key for Clearing Screen, Alt-L. It slows down because WM_SETREDRAW does not work (according the comments by Mark?), and EM_SETSEL, EM_REPLACESEL are done with screen refresh. I tried some experiments to remedy this, but I was not successful, so far... # Command logging: shell.log() for detail This version of pcceshell.py takes log of every command you executed. It is stored in sys.prefix+"\\cmdlog.txt" If you don't want this feature, please comment out Line 142. self.cmdlogname = sys.prefix+r"\cmdlog.txt" You can change the name and/or location of logfile. If you name it cmdlog.py, you can import that file as a script. Type this for more detail. >>> shell.log() # Half of Multiple line re-editing bug fixed There was a bug that caused first line of multiple line command to be repeated when re-editing. I fixed that part of problem. Yet another convenience feature. os, sys, win32gui, win32event, and some other modules will be available without importing them. This does not affect performance because these modules were already loaded during PythonCE startup, anyway. This can be disabled by commenting out line 618. slocals.update(sys.modules) # You can use all modules that has been loaded if you want Unless I get negative comments, other than log feature and pre-importation will be turned on by default in next release of HPC2000 version. I will make PPC version of pcceshell.py with these feature later. Most probably, I will merge PPC and HPC version together because I don't want to work twice. You can down load it from here. http://www.murkworks.com/Research/Python/PythonCE/PythonCEWiki/uploads/pcceshell.py.HPC_history_etc.02-10-16 ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From goodey27@juno.com Thu Oct 17 19:51:52 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Thu, 17 Oct 2002 14:51:52 -0400 Subject: [PythonCE] (no subject) Message-ID: <20021017.145153.1876.0.goodey27@juno.com> Telion: I tried your osce.py to use exec* funcs it worked wondefully. I was just wondering. 1) In the help files it states something about replacing the current process and that they do not return. I dont realy understand what that means. 2) This may be a stupid question, but I took a look at osce.py and I see that for every func youlimport again some modules and then delete them. Why dont you just import it at the begining of the module and then delete it at the end. (It would seem to me that importing them every time takes longer no run.) ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Fri Oct 18 14:24:47 2002 From: telionce@yahoo.com (Telion) Date: Fri, 18 Oct 2002 06:24:47 -0700 (PDT) Subject: [PythonCE] (no subject) In-Reply-To: <20021017.145153.1876.0.goodey27@juno.com> Message-ID: <20021018132447.38422.qmail@web21105.mail.yahoo.com> --- goodey27@juno.com wrote: > Telion: > I tried your osce.py to use exec* funcs it worked wondefully. Great. Thank you for the report. It means that most of HPC2000 distribution components can be used by PPC without any modification. > I was just wondering. > 1) In the help files it states something about replacing the current > process and that they do not return. I dont realy understand what that > means. For the os.system, I think it is same as Standard Python, now. exec* clones act differently. Compare the os.execv of Python on desktop and PythonCE, then you will see. > 2) This may be a stupid question, but I took a look at osce.py and I see > that for every func youlimport again some modules and then delete them. > Why dont you just import it at the begining of the module and then delete > it at the end. (It would seem to me that importing them every time takes > longer no run.) No, it's not stupid question. I took that way because I saw that in other modules. I think the reason behind that is not to import these modules into the name space of "os" module. If I do "import win32process" at the begining of osce.py, it saves bit of typing, and maybe a little bit of execution itme. But when you do >>> dir(os) you will see win32process and other modules in the list. And that may considerd as namespace contamination. Maybe I can remove "del"... I don't know if it is needed for 2.2. Speed-wise, I'm not sure if it makes big difference. If you write somthing you need speed, call win32process.CreateProcess directly. Also, you can remove lots of code in many modules if you want to create lean CE-only library. That may save a little more memory and time. But I'm not sure at all aboout benefit of it, compared to the labor needed. (Starting up of PythonCE could be shorter) Maybe someone who knows better about Python can tell us correct way to do. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From goodey27@juno.com Mon Oct 21 20:30:53 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Mon, 21 Oct 2002 15:30:53 -0400 Subject: [PythonCE] exec* Funcs Message-ID: <20021021.153053.1688.0.goodey27@juno.com> When using exec* functions the documentation states to put the name of the func. used as argument to args list. But when using it on Win CE with Telion's osce module, 'DON'T' do that. Just put the parameters you want to send to the program. Telion: 1) Is there a way on WinCE to have Python wait till the other program returns? 2) Is there a way to have a script run, by double tapping, even when Python is already running. Thanks Isr ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. From telionce@yahoo.com Mon Oct 21 21:42:26 2002 From: telionce@yahoo.com (Telion) Date: Mon, 21 Oct 2002 13:42:26 -0700 (PDT) Subject: [PythonCE] exec* Funcs In-Reply-To: <20021021.153053.1688.0.goodey27@juno.com> Message-ID: <20021021204226.73409.qmail@web21106.mail.yahoo.com> --0-323568573-1035232946=:71914 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --- goodey27@juno.com wrote: > When using exec* functions the documentation states to put the name of > the func. > used as argument to args list. But when using it on Win CE with Telion's > osce module, 'DON'T' do that. > Just put the parameters you want to send to the program. Although it is not real execv at all, the way you should give arguments is the same. What are the examples you tried? > > Telion: > 1) Is there a way on WinCE to have Python wait till the other program > returns? Actually, execv* should not wait. They are supposed to invoke other process, and let python die at that moment. Current execv imitation is acting more like spawn(), I guess. If you want Python to wait, use os.system. If os.system is giving you problem because of spaces in the pathname, use "os.systema" contained in updated osce.py attached on this mail. (I made that function because os.system does not handle pathnames with spaces in it. And it is the same on desktop Python... ) >>> os.systema('windows/cmd','/k dir *.txt') # invoke command console of HPC >>> os.systema('/program files/zzz/yyy.exe','arg1 arg2 arg3') # invoke what ever you want > 2) Is there a way to have a script run, by double tapping, even when > Python is already running. That may not be possible with the distribution you have. I think Brad has changed the code so that only one copy of Python should run, when he updated (Pythoncore4.zip). So, either you can use older python22.dll that may not contain _socket, or you can try to use HPC2000 distribution with PPC specific files from the distribution Brad has made (Pocket PC Python.exe, win32gui, pcceshell.py). Later this week or next week, I will make trial Cab distribution with above configuration. Now, I'm working so that command line parameter can be used. Someone has sent me a patch for it, and I'm compiling and testing. When I finish that and some other stuffs I wanted to improve, I'll make new release for HPC2000, and trial distribution for PPC. New release will include; improved pcceshell.py with clear screen, command logging, simple command history, slightly better imitation for os.system and os.execv, multi-byte pathname, filename support for os.listdir, os.mkdir, etc. and commandline parameter support. Most probably, PPC trial distribution will be able to run multiple copy of Python. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ --0-323568573-1035232946=:71914 Content-Type: application/octet-stream; name="osce.py" Content-Transfer-Encoding: base64 Content-Description: osce.py Content-Disposition: attachment; filename="osce.py" IyBNb2R1bGUgb3NjZS5weQ0KIyBUaGlzIGZpbGUgaXMgcmVhZCBhbmQgaW50 ZWdyYXRlZCBieSBvcy5weQ0KIyBDYWxsIHRoZXNlIGZ1bmNzIGZyb20gb3MN CiMNCiMgVGVsaW9uDQoNCiMgQ0UgcGF0Y2ggZm9yIGV4ZWN2IGV0Yy4uDQoN CiNpbXBvcnQgd2luMzJwcm9jZXNzDQojaW1wb3J0IHN0cmluZw0KI2ltcG9y dCB3aW4zMmV2ZW50DQoNCmRlZiBleGVjdiAocGF0aCwgYXJncyk6DQoJaW1w b3J0IG9zDQoJaWYgbm90IHR5cGUoYXJncykgaW4gKHR1cGxlLCBsaXN0KToN CgkJcmFpc2UgVHlwZUVycm9yLCAiZXhlY3YoKSBhcmcgMiBtdXN0IGJlIGEg dHVwbGUgb3IgbGlzdCINCglwPW9zLnBhdGguYWJzcGF0aChwYXRoKQ0KCSNp ZiBvcy5wYXRoLmV4aXN0cyhwKToNCglpbXBvcnQgd2luMzJwcm9jZXNzDQoJ aW1wb3J0IHN0cmluZw0KCWhQcm8saFRocixkd1Bybyxkd1Rocj13aW4zMnBy b2Nlc3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aXQgYWZ0ZXIgcmV0dXJu DQoJIyBQeXRob24gZG9lcyBub3Qgd2FpdCBmb3IgdGhlIGNvbW1hbmQgdW5l c3MgIndhaXQiIGlzIFRydWUuDQoJaW1wb3J0IHdpbjMycHJvY2Vzcw0KCWlt cG9ydCB3aW4zMmV2ZW50DQoJaFBybyxoVGhyLGR3UHJvLGR3VGhyPXdpbjMy cHJvY2Vzcy5DcmVhdGVQcm9jZXNzKCdcXHdpbmRvd3NcXGNtZCcsJy9jICcr aWNtZCxOb25lLE5vbmUsMCwwLE5vbmUsTm9uZSxOb25lKQ0KCWlmIHdhaXQg YW5kIGhQcm8gYW5kIGhUaHI6DQoJCXdpbjMyZXZlbnQuV2FpdEZvclNpbmds ZU9iamVjdChoUHJvLHdpbjMyZXZlbnQuSU5GSU5JVEUpDQoJI2RlbCB3aW4z MmV2ZW50DQoJI2RlbCB3aW4zMnByb2Nlc3MNCg0K --0-323568573-1035232946=:71914-- From goodey27@juno.com Tue Oct 29 21:07:59 2002 From: goodey27@juno.com (goodey27@juno.com) Date: Tue, 29 Oct 2002 16:07:59 -0500 Subject: [PythonCE] Python for Mips CE ver 2.11 Message-ID: <20021029.160800.1212.0.goodey27@juno.com> My ipaq (arm processor) died on me so I was forced to go back to my old Win Ce 2.11 device. Know I'm looking to find Python for this device. I remmember seeing something about it on this mailing. any help would be greatly appriceated. Thanks Isr ________________________________________________________________ Sign Up for Juno Platinum Internet Access Today Only $9.95 per month! Visit www.juno.com From telionce@yahoo.com Wed Oct 30 02:45:17 2002 From: telionce@yahoo.com (Telion) Date: Tue, 29 Oct 2002 18:45:17 -0800 (PST) Subject: [PythonCE] Python for Mips CE ver 2.11 In-Reply-To: <20021029.160800.1212.0.goodey27@juno.com> Message-ID: <20021030024517.88794.qmail@web21107.mail.yahoo.com> --- goodey27@juno.com wrote: > My ipaq (arm processor) died on me so I was forced to go back to my old > Win Ce 2.11 device. > Know I'm looking to find Python for this device. I remmember seeing > something about it on this mailing. > any help would be greatly appriceated. > > Thanks > Isr I'm planning to restart working on CE2.11 version next week if I finish the new release for CE3.0 as planned. So far, it looks good. I'm making progress slowly, one by one. Now, I have a python.exe with commandline options enabled, and it supports both pcceshell.py and CMD.EXE console (for HPC). If you can't wait for another several weeks (more or less), get Python 1.52+. You can find it in Mark's page, which you can go from PythonCE Wiki page, release section. ===== Telion - telionce@yahoo.com - http://pages.ccapcable.com/lac/PythonCE.html __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/