From isrgish at fusemail.com Sat Feb 7 21:50:35 2004 From: isrgish at fusemail.com (Isr Gish) Date: Sat Feb 7 21:50:36 2004 Subject: [PythonCE] Problems with Version 2.3 Message-ID: 1) I find that the Traceback report in ver. 2.3 isn't what it was in Ver. 2.2 for example: When I try opening a file that doesn't exist. In ver. 2.2 this is the traceback I got: >>> f = file('\\test.pc') Traceback (most recent call last): File "\Program Files\Python 2.2\pcceshell\interact.py", line 58, in Interact exec codeOb in locals IOError: [Errno 2] The system cannot find the file specified: '\\test.pc' Which tells me exactly what the problem is. While in ver. 2.3 I get: >>> f = file('\\test.pc') Traceback (most recent call last): File "\Program Files\Python\pcceshell\interact.py", line 58, in Interact exec codeOb in locals IOError: invalid mode: r Which really doesn't tell me athing. 2) I tried using the _winreg module but couldn't get anything to work there also I couldn't understand the error messages. Here is what I tried and the results: >>> k = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, None) worked fine >>> testkey = _winreg.OpenKey(k, "Test") Traceback (most recent call last): File "\Program Files\Python\pcceshell\interact.py", line 58, in Interact exec codeOb in locals WindowsError: [Errno 2] T There is a subkey named Test but I cant figure ootswhat the problem is and the error message doesn't help much. See below >>> newkey = _winreg.CreateKey(k, "Test") This seemed to work but when I looked in the registry I found a key with for boxes (????). >>> enumkeys = _winreg.EnumKey(k, 0) Traceback (most recent call last): File "\Program Files\Python\pcceshell\interact.py", line 58, in Interact exec codeOb in locals WindowsError: [Errno 87] T >>> enumkeys = _winreg.EnumKey(k, 1) Traceback (most recent call last): File "\Program Files\Python\pcceshell\interact.py", line 58, in Interact exec codeOb in locals WindowsError: [Errno 87] T Here again I cant figure out from the error what is wrong. Conclusion, it seems that the error reporting in Ver. 2.3 isn't working correctly (this seems only on WinCE), and the _winreg isn't either working, here it seems that the interface talking to the device isn't understanding the commands. Please help, any and all help wold be greatly appreciated. All the best, Isr Gish From dev-pythonce at smartology.nl Tue Feb 10 04:02:56 2004 From: dev-pythonce at smartology.nl (Remi Cool) Date: Tue Feb 10 04:03:01 2004 Subject: [PythonCE] BaseHTTPSever failes import In-Reply-To: References: Message-ID: <200402101002.56969.dev-pythonce@smartology.nl> Hello, I'm experimenting with the pythonce 2.3 package and ran into a problem. Importing BaseHTTPServer goes wrong and results in a traceback on import tempfile with the message: Attribute error 'module' object has no attribute 'O_RDWR' (os.O_RDWR) When you import tempfile in the shell, it get's imported correctly as does BaseHTTPSever after you manualy imported tempfile. I did not test BaseHTTPSever (yet), so I don't know if it works after importing. I'll look into os.py for a solution, but if anyone already has a modified os.py and want's to share it, it will save me the time :) My goal is to get a XMLRPC server running that serves HTML pages/forms to the PocketExplorer and enables the workstation to synchronize the data either via bluetooth or WiFi. A small database as Metakit with python bindings would be a welcome addition. Any one with metakit experience? Or SQLite for that matter? Remi From isrgish at fusemail.com Tue Feb 10 09:54:33 2004 From: isrgish at fusemail.com (Isr Gish) Date: Tue Feb 10 09:54:21 2004 Subject: [PythonCE] BaseHTTPSever failes import Message-ID: -----Original Message----- >From: "Remi Cool" >Sent: 2/10/04 4:02:56 AM >To: "pythonce@python.org" >Subject: [PythonCE] BaseHTTPSever failes import > >Hello, > >I'm experimenting with the pythonce 2.3 package and ran into a >problem. Importing BaseHTTPServer goes wrong and results in a >traceback on import tempfile with the message: > >Attribute error 'module' object has no attribute 'O_RDWR' (os.O_RDWR) I think that in CE version none of the os flags are assigned I do remmember tempfile working in ver. 2.2. but there I onwy had the *.pyc files so cant check if something was done about the os flags (in ver 2.2 there wasn't either the flags). >When you import tempfile in the shell, it get's imported correctly as >does BaseHTTPSever after you manualy imported tempfile. Actually it doesn't impoet fully and if you close down python and open again and try to import tempfile you'll get the same traceback. It seems that python starts binding the name and doesn't unbind it even when there was an error. (maybe its only PythonCE?) >I'll look into os.py for a solution, but if anyone already has a >modified os.py and want's to share it, it will save me the time :) > >My goal is to get a XMLRPC server running that serves HTML pages/forms >to the PocketExplorer and enables the workstation to synchronize the >data either via bluetooth or WiFi. > >A small database as Metakit with python bindings would be a welcome >addition. Any one with metakit experience? Or SQLite for that matter? > >Remi > All the best, Isr From chronowarper at netscape.net Wed Feb 11 13:23:31 2004 From: chronowarper at netscape.net (Jeffrey Nix) Date: Wed Feb 11 13:23:38 2004 Subject: [PythonCE] Sorry it took so long.... Message-ID: <0FC1ED61.4181156E.6D297EDE@netscape.net> Alright _winreg doesn't work right for some reason I can only get it to spit out 1 character for the keyname and I haven't tested anything else. Pyexpat appears to be broken as well and I'm not sure why... __________________________________________________________________ New! Unlimited Netscape Internet Service. Only $9.95 a month -- Sign up today at http://isp.netscape.com/register Act now to get a personalized email address! Netscape. Just the Net You Need. From isrgish at fusemail.com Wed Feb 11 23:36:21 2004 From: isrgish at fusemail.com (Isr Gish) Date: Wed Feb 11 23:36:05 2004 Subject: [PythonCE] Sorry it took so long.... Message-ID: Thanks for the reply. Hope it can be fixed. If I would now anything about all this compiling etc. I would offer to help, but all this is like mumble jumble to me All the best, Isr P.S. I tried using the datetime and time modules. The datetime doesn't seem to be in the CE distrib at all. The time module seems to be still from an old version. All the new features since 2.2 don't work. I may have mentioned it before in a post, but don't remember getting a reply. Thanks again. -----Original Message----- >From: "Jeffrey Nix" >Sent: 2/11/04 1:23:31 PM >To: "pythonce@python.org" >Subject: [PythonCE] Sorry it took so long.... > >Alright _winreg doesn't work right for some reason I can only get it to spit out 1 character for the keyname and I haven't tested anything else. Pyexpat appears to be broken as well and I'm not sure why... > >__________________________________________________________________ >New! Unlimited Netscape Internet Service. >Only $9.95 a month -- Sign up today at http://isp.netscape.com/register >Act now to get a personalized email address! > >Netscape. Just the Net You Need. > >_______________________________________________ >PythonCE mailing list >PythonCE@python.org >http://mail.python.org/mailman/listinfo/pythonce > From mchangsp at hotmail.com Wed Feb 18 13:02:59 2004 From: mchangsp at hotmail.com (M C) Date: Wed Feb 18 13:03:04 2004 Subject: [PythonCE] Installing Python on CF card Message-ID: Can someone tell me what the minimum set of files is to run Python on Windows Mobile 2003/HP iPAQ2210. Also, I want to run Python from compact flash, so it does not use up my main memory. Which files must be in \windows, and which files can reside on compact flash? Please supply instructions for the Pyhron version on http://www.murkworks.com/Research/Python/PocketPCPython/Overview _________________________________________________________________ MSN Zoeken helpt je om de gekste dingen te vinden! http://search.msn.nl From r_deeley at yahoo.com Thu Feb 19 16:49:46 2004 From: r_deeley at yahoo.com (Richard Deeley) Date: Thu Feb 19 16:59:06 2004 Subject: [PythonCE] Command line options and running without the shell Message-ID: <20040219214946.22039.qmail@web10107.mail.yahoo.com> wrt mail posted below, maybe this addresses it: 'exec' and '-c' are common enough in UNIX/C world. Python has a very different notion of these (for exec anyway, I have yet to find any documentation on command line arguments). I suspect the short answer to the issue raised in the prior mail below (admittedly from a while back) is don't use '-c' on the command line. What it does is very python specific and it DOESN'T run scripts or programs. Anyway, I ran into the same problem when I was trying to find a way to run a python script WITHOUT the shell. Or at least, closing it after the script completes. At the time '-c' seemed a reasonable bet. I was wrong. In looking through the pcceshell , there doesn't seem to be an option to turn bInteract off. It starts off as 0, but as soon as you get to run anything, it becomes a 1. You can set it to a 1 using -i, but I don't see a way to unset it and run a program. I can understand why it is done this way, but it wasn't what I wanted. OK, so I modified this and I now have a python script running without leaving a shell window running. The next part is how to make the output appear on the terminal I am using. So I nuked the bits that set sys.stdout to the shell. OK. That works. I got output from my program to go to the terminal and the shell now closes immediately the program is done. Now, did I just duplicate efforts already done and/or miss a step somewhere ? (wouldn't be the first time, alas) Or is there another way entirely of doing all this that doesn't require tweaking pcceshell ? I am assuming that pcceshell is embedded into the program that starts this stuff up. Although I haven't actually looked into that. As to revisions etc, Loaded the latest cab's from murk area as of yesterday and its an IPAQ 2215. btw: pythonce is a really cool product. (Wonder if PIL will run there ?. May give it a try if I have some time to port my other stuff) http://mail.python.org/pipermail/pythonce/2002-August/000125.html > Sorry I have taken so long to respond but I have done a number of installed > and tried other things to get this to work. No luck yet. The following is > an example of what I type in and the results: > > >>> My Documents\pyscripts\testpython.py > Traceback (most recent call last): > File ":,line 1 > My Documents\pyscripts\testpython.py > ^ > SyntaxError:invalid syntax > >>>> > __________________________________ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools From chronowarper at netscape.net Thu Feb 26 11:04:58 2004 From: chronowarper at netscape.net (Jeffrey Nix) Date: Thu Feb 26 11:05:04 2004 Subject: [PythonCE] About datetime and time Message-ID: <77BFEADF.3F16C4DD.6D297EDE@netscape.net> Yes datetime is definetly not there and the time module probably is recycled from an older version. If I get around to it I will try to get them in but don't count on it... __________________________________________________________________ Introducing the New Netscape Internet Service. Only $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. From s3010096 at kmitl.ac.th Fri Feb 27 17:54:35 2004 From: s3010096 at kmitl.ac.th (s3010096@kmitl.ac.th) Date: Fri Feb 27 03:40:38 2004 Subject: [PythonCE] error in function time.mktime Message-ID: <2945.161.246.5.87.1077872075.squirrel@webmail.kmitl.ac.th> >Yes datetime is definetly not there and the time module probably is recycled from an >older version. If I get around to it I will try to get them in but don't count on it... ----------------------------------- I found an error in function time.mktime() Python 2.3.2 (#0, Dec 11 2003, 12:46:49) [MSC v.1200 32 bit (Unknown)] on Pocket PC >>> import time >>> clock=time.clock() >>> local=time.localtime(clock) >>> local (2004, 2, 27, 10, 14, 41, 4, -1, -1) >>> mktime=time.mktime(local) Traceback (most recent call last): File "\Program Files\Python\lib\pcceshell.py", line 480, in Interact exec codeOb in locals OverflowError: mktime argument out of range >>>