# -*- coding: utf-8 -*-
#!/usr/bin/python

import os
import sys

def myDir(dir):
   try:
      files = os.listdir(dir)
      for f in files:
         fullPath = os.path.join(dir, f)
         if os.path.isfile(fullPath):
            print("檔案：", f)
         elif os.path.isdir(fullPath):
            print("目錄：", f)
            myDir(fullPath)
   except NotADirectoryError:
      print(dir, '不是資料夾')

# main
print(os.path.dirname(__file__))
print(sys.path)
print(os.getcwd())

path = os.getcwd()
#myDir(path)

input('Press enter to continue......')
