- Original Message -
> From: eryksun
> To: Albert-Jan Roskam
> Cc: Python Mailing List
> Sent: Wednesday, October 10, 2012 1:40 PM
> Subject: Re: [Tutor] ctypes question
>
> On Wed, Oct 10, 2012 at 6:02 AM, Albert-Jan Roskam
> wrote:
>>
>> el
On Wed, Oct 10, 2012 at 6:02 AM, Albert-Jan Roskam wrote:
>
> elif pf.startswith("lin"):
> libc = ctypes.CDLL("libc.so.6")
> fopen = libc.fdopen
> fh = fopen(ctypes.c_char_p(fn), "rb")
> fhPtr = ctypes.byref(ctypes.c_int(fh))
> buff = ctypes.create_string_buffer(lines)
> ret = libc.fread(
On 10/10/12 11:02, Albert-Jan Roskam wrote:
I have a program that reads and writes files using ctypes.
Any particular reason why? That's not normally something I'd expect you
to need ctypes for. Unless you just want to play with ctypes...
When I want it to read AND write (e.g. read a file,
Albert-Jan Roskam wrote:
> I have a program that reads and writes files using ctypes. When I want it
> to read AND write (e.g. read a file, select some stuff and write that),
> the library returns a 'read-open' error. I think that the pointer to the
> file handle for read and write point to the sa
Hi,
I have a program that reads and writes files using ctypes. When I want it to
read AND write (e.g. read a file, select some stuff and write that), the
library returns a 'read-open' error. I think that the pointer to the file
handle for read and write point to the same address. To test that
From: Joel Goldstick
To: tutor@python.org
Sent: Tue, March 8, 2011 12:14:45 PM
Subject: Re: [Tutor] ctypes question
On Tue, Mar 8, 2011 at 4:09 AM, ALAN GAULD wrote:
> When I use os.chdir (by the way: why on earth isn't this called os.setcwd()??
>> That's consi
On Tue, Mar 8, 2011 at 4:09 AM, ALAN GAULD wrote:
> > When I use os.chdir (by the way: why on earth isn't this called
> os.setcwd()??
> > That's consistent with os.getcwd())
>
> History.
> They are Unix commands (and possibly Multics/PDP before that!).
> cd has been the command in almost every CLI
> When I use os.chdir (by the way: why on earth isn't this called os.setcwd()??
> That's consistent with os.getcwd())
History.
They are Unix commands (and possibly Multics/PDP before that!).
cd has been the command in almost every CLI OS I've ever used from
CP/M thru' OS/9, Unix, DOS, etc...
__',
'__weakref__', '_handle', '_name']
>>>
Cheers!!
Albert-Jan
~~
All right, but apart from the sanitation, the medicine, education, wine, public
order, irrigation, roads, a fresh water system, and public health, what have
the
Romans ever done for us?
~~~
"Pacific Morrowind" wrote
but that path doesn't actually exist... replace that path with
either
r"d:/temp/spssio32.dll" or with "d://temp//spssio32.dll"; otherwise
the
/t will be transformed into a tab.
You've got your / and \ mixed up.
Forward slashes (/) are fine in Windows paths. It's
On Mon, Mar 7, 2011 at 10:36 AM, Pacific Morrowind <
pacificmorrow...@gmail.com> wrote:
> Hi
>
>
> On 07/03/2011 7:02 AM, Albert-Jan Roskam wrote:
>
> Hi,
>
> I want to use a dll to read Spss data files. But when I use
> lib = ctypes.cdll.LoadLibary("d:/temp/spssio32.dll")
> I get a WindowsError
Hi
On 07/03/2011 7:02 AM, Albert-Jan Roskam wrote:
Hi,
I want to use a dll to read Spss data files. But when I use
lib = ctypes.cdll.LoadLibary("d:/temp/spssio32.dll")
I get a WindowsError (cannot find module), even though the path
exists. Why is that? Do I need to extend some environment varia
Hi,
I want to use a dll to read Spss data files. But when I use
lib = ctypes.cdll.LoadLibary("d:/temp/spssio32.dll")
I get a WindowsError (cannot find module), even though the path exists. Why is
that? Do I need to extend some environment variable (add another dir)? I am
using Python 2.5 on Win
13 matches
Mail list logo