Using self and parameters in a Python Script : <p>I'd like to use self (for global variables) and the parameters from the command-line in my Python Script but can't really get them to work.</p>

<pre><code>def otherFunction(self)
    print self.tecE

def main(argv,self):
    self.tecE = 'test'
    otherFunction()

if __name__ == "__main__":
   main(sys.argv[1:],self)
</code></pre>

<p>This gives me an error:</p>

<pre><code>    main(sys.argv[1:],self)
NameError: name 'self' is not defined
</code></pre>

<p>So how and where to define <code>self</code>? </p>
