This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- coding: <utf-8> -*- | |
| from __future__ import print_function | |
| import argparse | |
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description='Description of what this does') | |
| parser.add_argument("-c", "--configfile", dest="conf", help="Config file for something") | |
| parser.add_argument("-f", "--flag", dest="bolFlag", action="store_true", help="Marks True if flag is used") | |
| args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| uni = u'some unicode' | |
| string = uni.encode("utf-8") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| try: | |
| import platform_specific_module | |
| except ImportError: | |
| platform_specific_module = None | |
| class NameOfClass(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| filepath = r("c:\temp") | |
| os.remove(filePath) # This just removes to recyclebin | |
| os.unlink(filePath) # This removes without recyclebin |
NewerOlder