Tom Whittock wrote:
...
pyfile ctypes.py
...

Hi Tony.

Thanks for the reply, but ctypes is actually a binary module (dll
file) which needs to be installed into the python module path directly
- unless I miss my guess, pyfile will source a python script but will
not load a dll module.

yes, pyfile is for a python source module.


I replied to Aaron yesterday thanking him and saying that the solution
he gave sorted me out perfectly - I didn't realize that reply-to was
set to the poster and not the list, so here's essentially what I said
to him directly:

When replying to the Vim lists, it is better to use "Reply to List" if your mailer offers that option, or "Reply to All" otherwise. This allows you to use "Reply to Sender" when you intentionally _don't_ want all list subscribers to see your reply, for instance when spinning a private off-topic conversation off the list thread. Of course, "Reply to All" will usually send two copies of the reply to the author but that's not necessarily a bad thing: he gets a fast "express" reply directly then, bypassing all the list relays (and delays); and a few minutes later he gets the "list" copy the same as all list subscribers: that one gets to him the roundabout way, transiting through the routers of the math faculty at Berlin U. Both copies always have the same sender, subject and date, so it's usually easy to see in your Inbox (or, if you use message filters, in whatever subsidiary folder you filter Vim messages to) that two messages are actually duplicates of each other.


I was expecting vim to either use the latest version of python
installed (in my case 2.5) or to have its own set of python library
paths. Inspecting the sys.path variable (like I should have first
thing) showed that vim was actually using the 2.4 python installation,
which did not have ctypes installed.

Vim (when compiled with +python or +python/dyn) is always compiled against whichever version of python was found on the machine where it was compiled. If you compiled your own, of course there's no problem -- unless you upgraded to a different version of Python since the last time you compiled Vim. But those python libraries are not distributed with Vim (and, in most cases, they are not linked statically into the executable either), so if you installed a Vim compiled by someone else, you'll have to make sure the "right" version of Python is installed and "findable" (e.g. in the PATH) -- or you won't be able to use the Python interface in Vim, at the very least. You can see "which" version it was by looking at the bottom half of the output of the ":version" command (among the "Compilation" and/or "Link" command-line arguments). (The same applies, mutatis mutandis, to all other supported interpreted languages.)


I have now installed the necessary modules in the version of python
vim is actually using, and I have no problems whatsoever.

Cheers.
Tom.


So much the better then.


Best regards,
Tony.

Reply via email to