Question about file handles and windows handles @ Windows Operating Systems

E

eino

Very hard to find right function...

If I open file
fname="c:\\temp\\foobar.txt"
file_foobar = file(fname)
file_foobar.fileno() returns 3 becausee of unix like library used
in windows python....

If I'd like to get to known what windows handle it has

hfile=win32file.CreateFile( ff,win32con.GENERIC_READ|
win32con.GENERIC_WRITE,win32con.FILE_SHARE_READ|
win32con.FILE_SHARE_WRITE,None,
win32con.OPEN_ALWAYS,win32con.FILE_ATTRIBUTE_NORMAL , 0 )

hfile.handle returns 88

Are there any function to get windows handle of file which is already
opened with built-in file-function.

-Eino
 
?

=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?=

Are there any function to get windows handle of file which is already
opened with built-in file-function.

mscvrt.get_osfhandle

HTH,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top