Need help in Python Wrapper for EWFAPI from XPe

2006-03-02 Thread P Boy
I am trying to build a wrapper for the EWFAPI running on XPe. My first attempt was to use SWIG, but run to trouble with all these windows types such as WCHAR, DWORD, LPWSTR, ... I then searched further and found out about the ctypes module. However, some functions returns pointer to struct in ewfa

Re: newbie question

2006-03-03 Thread P Boy
Since you are a Windows user, I strongly recommend that you install activestate python instead of the one you download from python.org. The PythonWin from active state is much more user friendly. It's basically an IDE (integrated development environment), which includes interactive shell, editor, d

Re: Question

2006-03-03 Thread P Boy
You may want to read up on http://python.org/doc/faq/installed.html -- http://mail.python.org/mailman/listinfo/python-list

Re: string stripping issues

2006-03-03 Thread P Boy
This seems like a web page parsing question. Another approach can be as follows if you know the limiting token strings: a.split('')[1].split('\r\n')[0] -- http://mail.python.org/mailman/listinfo/python-list

Re: slicing the end of a string in a list

2006-03-03 Thread P Boy
One liners are cool. Personally however, I would not promote one liners in Python. Python code is meant to be read. Cryptic coding is in perl's world. Code below is intuitive and almost a three year old would understand. for line in open('C:\\switches.txt'): print line.rstrip() BTW, if t

Re: slicing the end of a string in a list

2006-03-03 Thread P Boy
I had some issues while ago trying to open a large binary file. Anyway, from file() man page: If mode is omitted, it defaults to 'r'. When opening a binary file, you should append 'b' to the mode value for improved portability. (It's useful even on systems which don't treat binary and text files

Re: python debugging question

2006-03-08 Thread P Boy
Install active python from http://activestate.com/Products/ActivePython/?mp=1 Run PythonWin for: coding, interactive commands, and debugging. Good luck. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and C

2006-03-10 Thread P Boy
I have written some C extension before but it was pretty tedious. I have recently found another approach by using ctypes (http://starship.python.net/crew/theller/ctypes/). Which you develop your C module in dynamic library (DLL in Windows world), the from Python, you can call the C functions in the

Re: Python and C

2006-03-10 Thread P Boy
I have written some C extension before but it was pretty tedious. I have recently found another approach by using ctypes (http://starship.python.net/crew/theller/ctypes/). Which you develop your C module in dynamic library (DLL in Windows world), the from Python, you can call the C functions in the

Re: Python and C

2006-03-10 Thread P Boy
> Has anyone yet written a program to grab C struct declaration from the .h > to produce code like > > # Overlay configuration > class OverlayStoreConfig(ctypes.Structure): > _fields_ = [('FormatVersion', ctypes.c_ulong), > ('VolumeSize', ctypes.c_longlong), >