metawilm / cl-python

An implementation of Python in Common Lisp
http://common-lisp.net/project/clpython/
Other
368 stars 34 forks source link

Importing 'library' causes 'library.py.lisp' to be generated #7

Closed futuro closed 11 years ago

futuro commented 12 years ago

If I want to import a library in the repl, it will try to generate a lisp file in the same directory as the library, which causes issues because I often don't have write permissions in those directories.

Example:

CL-USER> (clpython.app.repl:repl)
Welcome to CLPython, an implementation of Python in Common Lisp.
Running on: SBCL 1.0.57.55-80ad081
REPL shortcuts: `:q' = quit, `:h' = help.

;; Consider customizing variable *CLPYTHON-MODULE-SEARCH-PATHS*
;; to be a list of paths that are tried when locating a module in order to import it
;; (in addition to the current directory and `sys.path'). Typically it should at least
;; contain the path to the Python (2.5) standard libraries, as those are not
;; distributed with CLPython.
>>> import sys
#<module SYS (package "CLPYTHON.MODULE.SYS" with 38 external symbols) {10044AF373}>
>>> print sys.path
[.]
>>> sys.path = ['/usr/lib/python2.7/']
>>> print sys.path
['/usr/lib/python2.7/']
>>> import bdb
;; Parsing #P"/usr/lib/python2.7/bdb.py" into #P"/usr/lib/python2.7/bdb.py.lisp"

;; Error occured while reading input with the Python readtable:
;;   error opening #P"/usr/lib/python2.7/bdb.py.lisp": Permission denied
;; Standard IO syntax (*readtable* etc) has been activated to enable debugging.

>>>

CL-Python Version : clpython-20110730-git Installed from: Quicklisp

metawilm commented 11 years ago

Thanks for the report, and sorry for the delay. It should be fixed now (commit 4f9b0c47e0a87d3d8cfc50f65ffac2e156e830c0)