From mark at IcanFixYourEmail.com Mon May 23 22:15:24 2011 From: mark at IcanFixYourEmail.com (Mark McWiggins) Date: Mon, 23 May 2011 15:15:24 -0700 Subject: [clpython-devel] Problem with Python 'open' Message-ID: Hi -- I have CLPython running on a small example with no I/O, but when I try opening a file I get: > Error: Incorrect keyword arguments in (NIL "r") . > While executing: OPEN, in process listener(1). > Type :POP to abort, :R for a list of available restarts. > Type :? for other options. for open(f,'r') or similar error: > Error: Incorrect keyword arguments in (NIL NIL) . > While executing: OPEN, in process listener(1). > Type :POP to abort, :R for a list of available restarts. > Type :? for other options. for open(f) Suggestions please! I'm not much of a Lisp hacker, just trying to get a Python script to run (much) faster. Thanks. -- Mark McWiggins 425-369-8286 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: From metawilm at gmail.com Wed May 25 08:08:17 2011 From: metawilm at gmail.com (Willem Broekema) Date: Wed, 25 May 2011 10:08:17 +0200 Subject: [clpython-devel] Problem with Python 'open' In-Reply-To: References: Message-ID: Hi Mark, On Tue, May 24, 2011 at 12:15 AM, Mark McWiggins wrote: > I have CLPython running on a small example with no I/O, but > when I try opening a file I get: > >> Error: Incorrect keyword arguments in (NIL "r") . >> While executing: OPEN, in process listener(1). There was a typo that resulted in a symbol clash with Lisp's "open" in implementations other than Allegro's "Modern" mode. If you have checked out from the git repo, just pull the fix I just committed, otherwise (e.g. when using Quicklisp) please manually apply this change: https://github.com/franzinc/cl-python/commit/84f0f775bf359ab60ba78e2f58587c316463a6d8 Also, the file handling in CLPython is not well-tested. From a quick test the basic open, read and close seem to work, but don't be surprised if other actions fail. > Suggestions please! I'm not much of a Lisp hacker, just trying to get a > Python script to run (much) faster. I'm glad you're trying out CLPython. I'm not sure you get the much faster speed though. Keep us updated. - Willem