Skip to content

Commit

Permalink
Shebang not added in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodd committed Mar 8, 2016
1 parent a6fa903 commit cb7f93a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions spyderlib/plugins/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,14 @@ def __init__(self, parent, ignore_last_opened_files=False):

# Creating template if it doesn't already exist
if not osp.isfile(self.TEMPLATE_PATH):
header = ['#!/usr/bin/env python' + ('2' if PY2 else '3'),
'# -*- coding: utf-8 -*-',
'"""', 'Created on %(date)s', '',
'@author: %(username)s', '"""', '']
if os.name == "nt":
shebang = []
else:
shebang = ['#!/usr/bin/env python' + ('2' if PY2 else '3')]
header = shebang + [
'# -*- coding: utf-8 -*-',
'"""', 'Created on %(date)s', '',
'@author: %(username)s', '"""', '']
encoding.write(os.linesep.join(header), self.TEMPLATE_PATH, 'utf-8')

self.projectexplorer = None
Expand Down

0 comments on commit cb7f93a

Please sign in to comment.