Showing content from http://mail.python.org/pipermail/python-dev/attachments/20140802/daaa606e/attachment.html below:
Right.<br><br>On Saturday, August 2, 2014, Phil Thompson <<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/08/2014 7:36 pm, Guido van Rossum wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, Aug 2, 2014 at 12:53 AM, Phil Thompson <<a>phil@riverbankcomputing.com</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To me the issue is whether, for a particular value of sys.platform, the<br>
programmer can expect a particular Python stdlib API. If so then Android<br>
needs a different value for sys.platform.<br>
<br>
</blockquote>
<br>
sys.platform is for a broad indication of the OS kernel. It can be used to<br>
distinguish Windows, Mac and Linux (and BSD, Solaris etc.). Since Android<br>
is Linux it should have the same sys.platform as other Linux systems<br>
('linux2'). If you want to know whether a specific syscall is there, check<br>
for the presence of the method in the os module.<br>
</blockquote>
<br>
It's not just the os module - other modules contain code that would be affected, but there are plenty of other parts of the Python stdlib that aren't implemented on every platform. Using the approach you prefer then all that's needed is to update the documentation to say that certain things are not implemented on Android.<br>
<br>
Phil<br>
</blockquote><br><br>-- <br>--Guido van Rossum (on iPad)<br>
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