2
0

text.py 430 B

12345678910111213141516171819202122232425
  1. import os
  2. import time
  3. script_name1 = os.path.abspath(__file__)
  4. path = os.path.split(script_name1)[0]
  5. print(path)
  6. b = path.split('\\')
  7. c = b[0] + '/' + b[1] + '/' + b[2] + '/' + 'Desktop/'
  8. print(c)
  9. try:
  10. os.mkdir(c+'导入11')
  11. os.mkdir(c+'导出11')
  12. f = open(c+'/'+'11111111.txt',mode='w',encoding='utf-8')
  13. e = 'ok'
  14. except Exception as e:
  15. print(e)
  16. f.write('abc')
  17. a = input('请输入任意字符退出')