[Tutor] how to simply run a .py file

Alan Gauld alan.gauld at blueyonder.co.uk
Thu Jul 22 00:32:13 CEST 2004


> I simply would like to run a .py program that I downloaded
> I do not find how to do it !
>
> (the program in question takes an Endnote bibliographic file, and
converts
> it to a format suitable for LatexBibtex (which is a pain in the ass
to type
> when the number of references is high))
>
> I have installed Python, and I have the .py file
> now what ?

Since you are using Latex I'll guess you are on Linux?
If so then check that the first line of the python script has a line
like this:

#! /bin/env python

If it has then you can run the python script byy simply double
clicking
in your favourite file manager or from a terminal prompt by typing its
name:

$ foo.py

It might need some command line arguments too but without knowledge
of the actual script I can't say...

If you are using Windows then the python file should be showing a
green
snake icon in Windows Explorer, in which case just double click to run
it.

HTH,

Alan G.



More information about the Tutor mailing list