#!/usr/bin/python
import os
path = raw_input("enter path: ")
state = os.path.isdir(path)
print state
if state == False:
print "there is no: ",path
check_size = raw_input("enter full path to file: ")
fo = os.path.getsize(check_size)
print fo
print "path2file"
print "select only file name"
only_file = os.path.split(check_size)
print only_file
print "get the extension of a file"
sufix = os.path.splitext(check_size)
print sufix
Brak komentarzy:
Prześlij komentarz