Code:
for root,dirs,files in os.walk(cwd):
for folder in glob.glob(root):
for file in glob.glob(folder + '/*.**'):
file_path = os.path.split(file)[1]
size = os.stat(file)
for root,dirs,files in os.walk(cwd):
for folder in glob.glob(root):
for file in glob.glob(folder + '/*.**'):
file_path = os.path.split(file)[1]
size = os.stat(file)
log_file = open('log_file.txt', 'w')
for root,dirs,files in os.walk(cwd):
for folder in glob.glob(root):
for file in glob.glob(folder + '/*.**'):
file_path = os.path.split(file)[1]
for word in words:
numbers = re.search('[0-9]+', word)
word = clearup(word)
if word in dictionary:
pass
else:
print word
def clearup(tor):
numbers = re.search('[0-9]+', tor)
return tor.replace('%s' % numbers, '')\
def clearup(tor):
tor = tor.replace('.', '')
words = fcheck.read().split()
for word in words:
clearup(word)
if word in dictionary: # dictionary is a tuple of words
pass
else:
print word
#!/usr/bin/python
# Filename: backup_zip.py
import os, zipfile, time, datetime, glob
from os.path import splitext, relpath, split
r = 1
cwd = os.getcwd()
today = datetime.date.today()
def backup():
for dirpath,dirs,files in os.walk(cwd):
for file in files:
z_path
for dirpath,dirs,files in os.walk(cwd): for file in files: global z_path z_path = os.path. # WHAT WOULD GO HERE # (dirpath) print z_path
#!/usr/bin/python
# Filename: backup_zip.py
import os, zipfile
r = 1
while r == 1:
print "This script when run backs up files in a directory by comressing them to zips. "
begin = raw_input("Do you wish to back up files in this directory
#!/usr/bin/python # Filename: backup_zip.py import os import zipfile import glob r = 1
<pre class="alt2" dir="ltr" style="border: 1px inset; margin:
<?php
include('includes/corefuncs.php');
if (function_exists('nukeMagicQuotes')) {
nukeMagicQuotes();
Leave a comment: