micropython/micropython — pull request #886 by stinos (2014-10-01 14:08:18+00:00)
Title: unix: When specifying a file as argument pass absolute file path to lexe...

...r

This fixes an inconvenient inconsistency when passing a relative path as argument:
the argument was passed to the lexer as-is resulting in `__file__` being equal to
the original path passed in.
All other occurrences of `__file__` (when using import) however use the fully
resolved absolute path.

So when you have two files

```
# foo.py
import bar
print( __file__ )

# bar.py
print( __file__ )
```
and run e.g. `micropython ../foo.py` you now get this output
```
/path/to/bar.py
/path/to/foo.py
```
instead of
```
/path/to/bar.py
../foo.py
```
Also renamed basedir to filepath since that reflects what it is, and renamed p to basedir in turn.