Having lots of fun passing parameters ... help!

DAC derekacolley at googlemail.com
Mon Jun 18 15:50:34 CEST 2007


I've defined a single method in Python using:

def funcAdjacents(inputWord, outputFile):
   ...
   lots of boring stuff
   ...


and then called it using:

funcAdjacents("SampleWord","outputFile.file")

Which works OK in Python - I get the results I want.  But what I'm
trying to do is get inputWord and outputFile to be parameters are
passed on the command line, e.g.

C:\Python\>  myScript.py "SampleWord" "outputFile.file"

And just to add to the fun, once I've reached this stage I would like
to either a) be able to execute this .py file from a HTML environment
or b) execute this file as a .exe and embed into HTML (which I can
do).

Has anyone got any ideas?

DAC.




More information about the Python-list mailing list