#-*-Coding:utf-8-*-
Import Sys
Import time
Import OS #解决unicode和ASCII码转换的问题
Reload (SYS) #解决unicode和ASCII码转换的问题
Sys.setdefaultencoding (' UTF8 ') #解决unicode和ASCII码转换的问题
context = ' Hello World '
f = open ("Hello.txt", ' A + ')
F.write (context)
F.close ()
Date1 = Time.strftime ("%y%m%d", Time.localtime ())
Date2 = "+time.strftime" ("%u", Time.localtime ()) + "Week"
Date3 = "Week" + time.strftime ("%w", Time.localtime ())
Print Date1
Print Date2
Print Date3
Date1 = str (date1) +str (date2) +str (date3)
# date1 = Date1.encode (Unicode)
Path = u "d:\ working directory \ \"
# Print Date1
# path = path + path1 + date1
Path = str (path) + str (date1)
# Print Path
Os.mkdir (Path.encode (' GBK '))
#os. mkdir (Path.encode (' GBK '))
# Print Path.decode (' gb2312 ')
#path. Decode (' gb2312 ')
# path = path + date1
# Print Path
# Os.mkdir (R ' d:\ working directory \temp ')
# lll = R ' D:\Hello\Time ' +date1
# print LLL
# Os.mkdir (LLL)
# Print Path
# Os.mkdir (PATH)
Create folders and resolve issues with Unicode and ASCII conversion