time.sleep(3)
print('\n' + " "*len("Testing...") + '\n', end=' ')
-need_clock = time.clock() <> 3
+need_clock = time.clock() != 3
outfile = open("clock.py", 'w')
flush_record = 0 # Do not close record on 1st loop
- if self.comment <> '':
+ if self.comment != '':
outfile.write(self.comment)
for record in self:
db = self.__make_db()
db.load_file(f)
- if len(db) <> 1:
+ if len(db) != 1:
raise error, "incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db))
self.data = db[0]
db = self.__make_db()
db.load_from_file(f)
- if len(db) <> 1:
+ if len(db) != 1:
raise error, "incorrect number of records in config file `%s'; expected 1, got %d" % (str(f), len(db))
self.data = db[0]
return match.group(1) # Signal to stop filling the record (section) and start a new one
if self.first_section:
- if string.strip(line) <> '':
+ if string.strip(line) != '':
raise error, "non-empty line before 1st section"
elif (string.strip(line) == '') or (string.lstrip(line)[0] == ';') : # Empty line or comment
self.section = section
else:
- if self.first_section and (string.strip(line) <> ''):
+ if self.first_section and (string.strip(line) != ''):
raise error, "non-empty line before 1st section"
# else: line had been appended to section in __parse_line()
#print(list_dirs)
for i in range(0, len(list_dirs)):
new_path = string.join(list_dirs[0:i+1], os.sep)
- if (new_path <> '') and (not os.path.exists(new_path)):
+ if (new_path != '') and (not os.path.exists(new_path)):
#print("Making", new_path)
os.mkdir(new_path)
ftp = ReconnectingFTPWrapperClass(ftp, ftp_server, ftp_port, login, password, ftp_dir, tree)
ftp.connect(ftp_server, ftp_port)
ftp.login(login, password)
- if ftp_dir <> '/':
+ if ftp_dir != '/':
ftp.cwd(ftp_dir)
_traverse_ftp(ftp, tree, ftp_dir)
ftp.set_pasv(passive)
ftp.connect(ftp_server, ftp_port)
ftp.login(login, password)
- if ftp_dir <> '/':
+ if ftp_dir != '/':
ftp.cwd(ftp_dir)
lines = []
tree.append((current_dir, files))
if line[:2] == "./":
line = line[1:] # remove leading dot
- elif line[0] <> '/':
+ elif line[0] != '/':
line = '/' + line
current_dir = line[:-1]
files = []
#
def IsLeapYear(Year):
- if ( (Year % 4 == 0) and (Year % 4000 <> 0) and ((Year % 100 <> 0) or (Year % 400 == 0)) ):
+ if ( (Year % 4 == 0) and (Year % 4000 != 0) and ((Year % 100 != 0) or (Year % 400 == 0)) ):
return True
return False
Year = Year + 1
Julian = DMYtoDate(Day, Month, Year)
- if Julian <> BadDate:
+ if Julian != BadDate:
Julian = Julian + Days + Day28Delta
return Julian
Year = Year + 1
Julian = DMYtoDate(Day, Month, Year)
- if Julian <> BadDate:
+ if Julian != BadDate:
MaxDay = DaysInMonth(Month, Year)
if Day+Day28Delta > MaxDay:
Julian = Julian + MaxDay-Day
flush = False
- if self.lng <> lng:
+ if self.lng != lng:
self.lng = lng
self.out.write(ttyProgressBar.back_c*(self.width1+self.width2))
self.out.write(ttyProgressBar.left_c*lng)
self.percent = -1 # force to redraw percentage; the bug was fixed by William McVey
flush = True
- elif self.percent <> percent:
+ elif self.percent != percent:
self.out.write(ttyProgressBar.back_c * (self.width2-1))
flush = True
- if self.percent <> percent:
+ if self.percent != percent:
self.percent = percent
self.out.write(str(percent).rjust(3) + '%')
flush = True