Python file - Want to change it to a function or a class

Posted by curious2know on Stack Overflow See other posts from Stack Overflow or by curious2know
Published on 2010-04-14T11:13:09Z Indexed on 2010/04/14 11:23 UTC
Read the original article Hit count: 123

Filed under:
|

Hello,

I have a python program/file that I want to run repeatedly and calculate the averages of some variables over these runs. To do so, I thought it might be convenient to convert this program into a function or a class. One way I can think of is to add a

def Main():

line at the top and indent every line manually within it. Is there an easier way? I am using pydev on eclipse.

Thanks.

© Stack Overflow or respective owner

Related posts about python

Related posts about pydev