A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-December/114992.html below:

[Python-Dev] Compiling the source without stat

[Python-Dev] Compiling the source without stat [Python-Dev] Compiling the source without statHrvoje Niksic hrvoje.niksic at avl.com
Thu Dec 15 11:00:06 CET 2011
On 12/14/2011 05:04 PM, Hossein wrote:
> If there is anything I should do

You can determine what the code that calls stat() is trying to do, and 
implement that with other primitives that your platform provides.  For 
example, you can determine whether a file exists by trying to open it in 
read-only mode and checking the error.  You can find whether a 
filesystem path names a directory by trying to chdir into it and 
checking the error.  You can find the size of a regular file by opening 
it and seeking to the end.  These substitutions would not be acceptable 
for a desktop system, but may be perfectly adequate for an embedded one 
that doesn't provide stat() in the first place.  Either way, I expect 
that you will need to modify the sources.

Finally, are you 100% sure that your platform doesn't provide another 
API similar to stat()?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4