글

python source dst file move date

import os import glob import time import sys       if len(sys.argv)>1:     dir = sys.argv[1] else:     #    dir = os.getcwd()     dir = "/home/jonglae/Pictures/2011-01-24"     print("working directory:", dir) postfix = "" #postfix = input("any postfix? ") filter = os.path.join(dir, "*") files = glob.glob(filter) #files = os.listdir(dir) for f in files:     # if f is dir, skip     if os.path.isdir(f)==True:         continue         # get modified date     stats = os.stat(f)     mt = time.gmtime(stats.st_mtime)     date = time.strftime("%Y-%m-%d", mt)     if len(postfix)>0:         date = date + " " + postfix     # mkdir if need     dst = "/homg/jonglae/temp/"     (dd, fn) = os.path.split(f)     datefolder = dst + os.path.jo...

python eclipse install

eclipse help software install http://update-production-pydev.s3.amazonaws.com/pydev/updates/site.xml

현재 폴더 명 가져 오기

# -*- coding:ms949 -*- import os curDir = os.getcwd() print format(curDir) print ('hello world.') print ('korean wording 안녕하십니까..') ===================output=======================   D:\Documents and Settings\jlpark\workspace\test\test hello world. korean wording 안녕하십니까..