[PythonCE] Problems with Version 2.3

Isr Gish isrgish at fusemail.com
Sat Feb 7 21:50:35 EST 2004


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




More information about the PythonCE mailing list