473,769 Members | 3,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is os.lstat available on all platforms?

Hi there.
In a code of mine I'd like to use os.lstat whenever possible.
My only concern is if it's available on all platforms.
It could be safe using always os.lstat instead of:

try:
os.lstat
except AttributeError:
os.stat

....?
As far as I know where symlinks are not supported os.lstat should be
an alias for os.stat but I'm not 100% sure.
Nov 29 '07 #1
2 1385
Giampaolo Rodola' wrote:
As far as I know where symlinks are not supported os.lstat should be
an alias for os.stat but I'm not 100% sure.
You are right, it should be an alias. os.lstat is available on Windows, too.

Christian

Nov 29 '07 #2
I'd just want to be sure that even on a strange python implementation
I won't ever get an AttributeError exception because os.lstat is not
defined.
Nov 29 '07 #3

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

Similar topics

3
1766
by: Jake | last post by:
Hello, Is the GTK+ plaf available on the windows 1.4.2 SDK ? Is it available for use on a win32 platform? Jake
4
2421
by: Rick Thomas | last post by:
http://wingide.com/wingide
20
1495
by: Mark A | last post by:
Also, noticed there is now a separate fixpak 9 for Linux 2.6 Kernel in addition to the regular Linux fixpaks.
3
8706
by: noleander | last post by:
Hi. I'm doing some speed optimization on my Visual C++ program. I'm using timers throughout the program. I'm calling ftime() which works well, but only returns current time to a millisecond accuracy. I've gotten to the point where I now need even more precision in my timers. Many unix platforms have a function gettimeofday() which has microsecond accuracy, but this function is not available on Windows, apparently. Question: Is...
0
2080
by: Marc G. Fournier | last post by:
After 4 weeks of work, involving alot of bug fixes, and documentation improvements, to the source tree, we have just released our 4th Beta of 8.0.0. Most of the items on Bruce's Open Items list have been completed, but we still have a half dozen or so Windows related items still open. For a complete list of changes/improvement since Beta 1 was released, please see: ftp://ftp.postgresql.org/pub/source/v8.0.0beta/ChangeLog-Beta3-to-Beta4
0
1983
by: Marc G. Fournier | last post by:
Its been almost 4 weeks since Beta4, and alot of work, involving alot of bug fixes, and documentation improvements, to the source tree, we have just released our 5th Beta of 8.0.0. All of our major Open Items have now been completed, and we're slowly entering the final stages, involving alot of testing and documentation changes. For a complete list of changes/improvement since Beta 1 was released, please see:
1
2721
by: Jürgen Kahrs | last post by:
Hello, The beta alpha release (xgawk-3.1.5-beta.20060401) of the xmlgawk project is now available at SourceForge. http://sourceforge.net/projects/xmlgawk/ http://sourceforge.net/project/showfiles.php?group_id=133165 This release is based on Arnold Robbins' regular GNU Awk 3.1.5. Problem reports are supposed to go to xmlgawk-users@lists.sourceforge.net.
66
7475
by: Jon Skeet [C# MVP] | last post by:
I'm sure the net will be buzzing with this news fairly soon, but just in case anyone hasn't seen it yet: Microsoft are going to make the source code for the .NET framework (parts of it, including the BCL, ASP.NET and LINQ) available both for viewing and debugging into. I won't go into all the details here, as they're covered on Scott Guthrie's blog:
6
7109
by: onLINES | last post by:
I'm running into an issue. To my understanding, when lstat() returns -1 (FAILURE) it's because it hit a broken link? If that is not the case, then how can i retrieve information on either a broken link, or even a soft link?
0
9589
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9994
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7409
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3959
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
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.