n = 0
for item in old_List:
, , n += 1
, , s='|'+item
, , s=s.replace('\t',' ')
, , s=s.replace('| ','| . .')
, , s=s.replace(' ',' . .')
, , s = "{0:2d}{1:s}".format(n,s)
, , new_List.append(s)
fn2=os.path.join(path, base)+".txt"
new_file=open(fn2,'w')
for item in new_List:
, , new_file.write(item)
new_file.close()
print('Done')
while True:
work() # Exit => Ctrl + C
_my_zip.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Упаковка файлов fb2 в архивы zip
import sys, os
import zipfile
co = 0