dropbox/pyston — pull request #141 by tjhance (2014-08-28 09:01:47+00:00)
Title: import os.path

I moved `import` to its own file, because I think that imports are going to end up being quite a beast. To progress, you really need to understand CPython's `import.c`, which is hard to read because it deals with all sorts of platform-specific code among all the "real logic".

I left `importFrom` and `importStart` in `objmodel.cpp` because they felt more like object manipulation and getattr'ing.

Anyway, the point of this commit was to import `os.path`. It turns out this is pretty simple. When you import `os.path`, you import and run `os` first. Then, `os` adds `os.path` to `sys.modules` (choosing the module dynamically in a platform-specific way). Finally, you try to import `os.path`, see that it is already in `sys.modules`, and use that.