zjm1126
zjm1126

Reputation: 66667

Model sys's python implementation

pypy

has many built-in function use python implementation.example:link

but,i can't find model 'sys' implementation.

how can i get it.

import sys
print help(sys)

Upvotes: 0

Views: 290

Answers (2)

whatnick
whatnick

Reputation: 5470

Abstraction can only be taken so far, Python strives to be a system/platform independent language and the sys module being what it is has to be platform specific and cannot be implemented in pure python.

Upvotes: 0

Andrew McGregor
Andrew McGregor

Reputation: 34612

The sys module is implemented in C: http://svn.python.org/view/python/trunk/Python/sysmodule.c?view=markup

There is no Python source for it, because it's entirely operating system interfaces that cannot be implemented in pure Python.

Upvotes: 2

Related Questions