473,573 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fcntl and FCNTL

I followed discussion in the group about this problem:

ImportError: No module named fcntl

I found out there are two modules:
FCNTL
fcntl
the first one is obsolete and shouldn't be used.
But the second one is usable.

Unfortunately, there is no fcntl in my python installation (Python
2.3.3, I got it from python site for Windows). There is FCNTL.py which
is just a warning message and some imports.

Am I missing some files here. How could I have access to fcntl module.

Any help?

Thank you in advance.
Regards;
Jul 18 '05 #1
4 18294
Omid Fatemi wrote:
I followed discussion in the group about this problem:

ImportError: No module named fcntl

I found out there are two modules:
FCNTL
fcntl
the first one is obsolete and shouldn't be used.
But the second one is usable.

Unfortunately, there is no fcntl in my python installation (Python
2.3.3, I got it from python site for Windows). There is FCNTL.py which
is just a warning message and some imports.

Am I missing some files here. How could I have access to fcntl module.


From the docs in http://docs.python.org/lib/module-fcntl.html

"""Availability : Unix."""

I don't know if there's an alternative. Presumably the archives
for the list would answer this clearly, since as you say others
have asked the question before.

-Peter
Jul 18 '05 #2
Dear Peter;
thank you for your response.
Does this mean that in Windows I can't use fcntl module.
If yes, what functions do you suggest to use instead of fcntl funtions.

I could see the funtions in posixfile are using fcntl functions.
Do you have any alternative for posixfile module?

Regards;

Peter Hansen <pe***@engcorp. com> wrote in message news:<w4******* *************@p owergate.ca>...
Omid Fatemi wrote:
I followed discussion in the group about this problem:

ImportError: No module named fcntl

I found out there are two modules:
FCNTL
fcntl
the first one is obsolete and shouldn't be used.
But the second one is usable.

Unfortunately, there is no fcntl in my python installation (Python
2.3.3, I got it from python site for Windows). There is FCNTL.py which
is just a warning message and some imports.

Am I missing some files here. How could I have access to fcntl module.


From the docs in http://docs.python.org/lib/module-fcntl.html

"""Availability : Unix."""

I don't know if there's an alternative. Presumably the archives
for the list would answer this clearly, since as you say others
have asked the question before.

-Peter

Jul 18 '05 #3
> Does this mean that in Windows I can't use fcntl module.
If yes, what functions do you suggest to use instead of fcntl funtions.
I could see the funtions in posixfile are using fcntl functions.
Do you have any alternative for posixfile module?


I don't use windows, so I can't help here - but what might give the
windows-gurus out there a hint how to help you would be to say what you
actually want to achieve - then they might know how to do that with
windows.
--
Regards,

Diez B. Roggisch
Jul 18 '05 #4
Omid Fatemi wrote:
Dear Peter;
thank you for your response.
Does this mean that in Windows I can't use fcntl module.
If yes, what functions do you suggest to use instead of fcntl funtions.
What are you using for documentation? In my "Global Module Index" it
says (in the module list):
....
fcntl (Unix)
....
posixfile (Unix)
.... I could see the funtions in posixfile are using fcntl functions.
Do you have any alternative for posixfile module?

I think you can take this as an indication without reading the source
that the Python modules are tied pretty closely to the Unix
functionality they provide, and therefore won;t be available on Windows
any time soon.

regards
Steve
--
http://www.holdenweb.com
http://pydish.holdenweb.com
Holden Web LLC +1 800 494 3119
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2525
by: Meyer, Tony | last post by:
(I did try to google for an answer to this, but couldn't find anything, although plenty of instances of the warning). I don't understand this warning: >>> import fcntl C:\Program Files\Python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL module is deprecated; please use fcntl DeprecationWarning) >>>
6
3813
by: Pierre Rouleau | last post by:
Hi all! I am using Python 2.3.1 on Win32 (NT, 2000). Whenever a file imports the standard tempfile module, Python 2.3.1 issues the following warning: C:\Python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL module is Deprecated; please use fcntl DeprecationWarning).
0
1543
by: Ryan Grow | last post by:
Hi, I'm trying to use fcntl to set an existing file descriptor to be nonblocking. This contrived example exhibits the behavior of python that is preventing me from doing this: import os, fcntl, FCNTL file = open("/tmp/testfd.txt", 'w')
11
2601
by: Chris Green | last post by:
Hey folks, Is there anyway for a signal handler in python to get the information from a 3 argument signal handler rather than just the signal number and stack frame? I've got an application where I have to check for F_SETLEASE on a file in python on Linux 2.4. What this does is tells the kernel to notify the current process with SIGIO...
3
6571
by: thakadu | last post by:
The following code works as expected when run in the main body of a python script (ver 2.3.5) on OpenBSD v3.8. but when it is in the body of a function definition it does not work. It does not raise any errors but it simply does not block as expected. I have repeated this in both a cgi envirnoment and a non-cgi environment. I also have...
5
12269
by: marcello | last post by:
Hello I need to do this: 1 opening a file for writing/appending 2 to lock the file as for writing (i mean: the program that lock can keep writing, all others programs can't ) 3 wtite and close/unlock Even better would be changing the order of steps 1 and 2 (that is,first locking than writing, but it seems to me that in order to block i...
0
1789
by: Mitko Haralanov | last post by:
I am trying to use the advisory locking with fcntl over NFS (thus, me choosing fcntl instead of flock and friends). I have the following code: lockdata = struct.pack ("hhllhh", fcntl.F_RDLCK, 0, 0, 0, 0, 0) print self.fd, type (self.fd), len (lockdata), type (lockdata) ret = fcntl.fcntl (self.fd, fcntl.F_GETLK, lockdata) when this code...
9
5375
by: mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post by:
I'm having a number of problems with the fcntl module. First off, my system info: Mac OS X Darwin igskcicglthearn.cr.usgs.gov 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386 Python 2.5.1 (built from source) OK, the weirdness:
2
3638
by: xucs007 | last post by:
I ran following 2 programs (lock1, lock2) at almost same time, to write either "123456", or "222" to file "aaa" at the same time. But I often just got "222456" in "aaa" . Is this a bug of python fcntl module ? See 2 programs I ran: #!/usr/bin/env python import fcntl, time
0
7746
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7668
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8179
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5556
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5258
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3701
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2167
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.