Skip to content

Instantly share code, notes, and snippets.

@sebleblanc
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebleblanc/8540408cab6b30d098b8 to your computer and use it in GitHub Desktop.
Save sebleblanc/8540408cab6b30d098b8 to your computer and use it in GitHub Desktop.
Convert a Python script to a module
def print_a(a=1):
print("The value of a is", a)
print("Done!")
# Here I am
import the_module
if __name__ == "__main__":
the_module.print_a(a=5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment