Skip to content

Commit 2f73171

Browse files
authored
Python 3 compatibility
1 parent 42ff90d commit 2f73171

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeSnippetsLog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
path = os.path.join(logDir, filename)
88

99
if text:
10-
with file(path,'a') as f:
10+
with open(path,'a') as f:
1111
f.write('#%% ' + '_'*25 + ' ' + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + ' ' + '_'*25 + '\n\n' + text.replace('\r','').strip() + '\n\n')
1212
n = len(text.splitlines())
1313
Npp.notepad.messageBox('%i lines logged to %s'%(n,filename))
1414
else:
1515
notepad.open(path)
16-
notepad.setLangType(Npp.LANGTYPE.PYTHON)
16+
notepad.setLangType(Npp.LANGTYPE.PYTHON)

0 commit comments

Comments
 (0)