I am new to python and am actually using python as a result of taking a computer science class in college. I am writing a program to fit a hypothetical scenario. Well I have ran into a problem..Please help me!
the traceback and snippet are below.
def high_Priority():
##
print''
import shelve
high_space = 3000
file_sizeh = file_size * week_selec
h_back = high_space - file_sizeh
db = shelve.open("netback.dat")
db['hremspace'] = h_back
db.close()
for h_back in hremspace != 3000 :
print'There are ',db['hremspace'],' Mb\'s left in High priority storage'
print'after your backup of ',file_sizeh,' Mb\'s'
db['hremspace'] = h_back
db['netback'] = back_name
db['Highprofile'] = file_sizeh
else:
for h_back in db['hremspace'] > 0:
print'There are ',db['hremspace'],' Mb\'s left in High priority storage'
print'after your backup of ',file_sizeh,' Mb\'s'
db['hremspace'] = h_back
db['netback'] = back_name
db['Highprofile'] = file_sizeh
else:
print'There is not enough space to save your backup.'
print'Please delete a backup and try again.'
Traceback:
File "C:\Users\-----------\Desktop\finalprojbac.py", line 112, in high_Priority
for h_back in hremspace != 3000 :
NameError: global name 'hremspace' is not defined
>>>