if line[-1] == '\n':
line = line[:-1] # Chop
- l = string.split(line, self.key_sep, 1) # Just split to key and reminder
+ l = line.split(self.key_sep, 1) # Just split to key and reminder
return tuple(l)
from __future__ import print_function
-import os, string
+import os
mkhier_error = "m_shutil.mkhier_error"
if os.path.exists(path):
raise mkhier_error("`%s' is file" % path)
- list_dirs = string.split(path, os.sep)
+ list_dirs = path.split(os.sep)
#print(list_dirs)
for i in range(0, len(list_dirs)):
- new_path = string.join(list_dirs[0:i+1], os.sep)
+ new_path = os.sep.join(list_dirs[0:i+1])
if (new_path != '') and (not os.path.exists(new_path)):
#print("Making", new_path)
os.mkdir(new_path)
pwd_file.close()
print("Password file written")
- import string
pwd_file = open("test.pwd", 'r')
- username, encrypted = string.split(pwd_file.readline()[:-1], ':')
+ username, encrypted = pwd_file.readline()[:-1].split(':')
pwd_file.close()
if crypt.crypt(encrypted, encrypted):