Skip to content

Making what amounts to a main function an actual function

Ghost User requested to merge (removed):main-func into master

As per Issue #8 (closed) I am sending this merge request. I tried it with the following prototypical Python script:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: set autoindent smartindent softtabstop=4 tabstop=4 shiftwidth=4 expandtab:
from __future__ import print_function # abide by the rules reposurgeon sets!
import imp, os, sys

# Don't create .pyc or .pyo files
sys.dont_write_bytecode = True
# Import reposurgeon under its name from the main script file
reposurgeon = imp.load_source('reposurgeon', os.path.join(os.path.dirname(os.path.realpath(__file__)), 'reposurgeon'))

if __name__ == '__main__':
    print(dir(reposurgeon))
    # Import the class RepoSurgeon into this script's namespace
    from reposurgeon import RepoSurgeon

Merge request reports