Skip to content

Commit a43bb32

Browse files
committed
add option to run files with .pyw extension
1 parent ca5db65 commit a43bb32

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

spyder/plugins/debugger/plugin.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ def on_initialize(self):
122122
'requires_cwd': True,
123123
'priority': 10
124124
},
125+
{
126+
'input_extension': 'pyw',
127+
'context': {'name': 'File'},
128+
'output_formats': [],
129+
'configuration_widget': IPythonConfigOptions,
130+
'requires_cwd': True,
131+
'priority': 10
132+
},
125133
{
126134
'input_extension': 'py',
127135
'context': {'name': 'Cell'},
@@ -138,6 +146,14 @@ def on_initialize(self):
138146
'requires_cwd': True,
139147
'priority': 10
140148
},
149+
{
150+
'input_extension': 'pyw',
151+
'context': {'name': 'Cell'},
152+
'output_formats': [],
153+
'configuration_widget': None,
154+
'requires_cwd': True,
155+
'priority': 10
156+
},
141157
{
142158
'input_extension': 'py',
143159
'context': {'name': 'Selection'},
@@ -154,6 +170,14 @@ def on_initialize(self):
154170
'requires_cwd': True,
155171
'priority': 10
156172
},
173+
{
174+
'input_extension': 'pyw',
175+
'context': {'name': 'Selection'},
176+
'output_formats': [],
177+
'configuration_widget': None,
178+
'requires_cwd': True,
179+
'priority': 10
180+
},
157181
]
158182

159183
def on_mainwindow_visible(self):

spyder/plugins/ipythonconsole/plugin.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,14 @@ def on_initialize(self):
333333
'requires_cwd': True,
334334
'priority': 0
335335
},
336+
{
337+
'input_extension': 'pyw',
338+
'context': {'name': 'File'},
339+
'output_formats': [],
340+
'configuration_widget': IPythonConfigOptions,
341+
'requires_cwd': True,
342+
'priority': 0
343+
},
336344
{
337345
'input_extension': 'py',
338346
'context': {'name': 'Cell'},
@@ -349,6 +357,14 @@ def on_initialize(self):
349357
'requires_cwd': True,
350358
'priority': 0
351359
},
360+
{
361+
'input_extension': 'pyw',
362+
'context': {'name': 'Cell'},
363+
'output_formats': [],
364+
'configuration_widget': None,
365+
'requires_cwd': True,
366+
'priority': 0
367+
},
352368
{
353369
'input_extension': 'py',
354370
'context': {'name': 'Selection'},
@@ -365,6 +381,14 @@ def on_initialize(self):
365381
'requires_cwd': True,
366382
'priority': 0
367383
},
384+
{
385+
'input_extension': 'pyw',
386+
'context': {'name': 'Selection'},
387+
'output_formats': [],
388+
'configuration_widget': None,
389+
'requires_cwd': True,
390+
'priority': 0
391+
},
368392
{
369393
'input_extension': 'pyx',
370394
'context': {'name': 'File'},

spyder/plugins/profiler/plugin.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,23 @@ def on_initialize(self):
9797
'priority': 10
9898
},
9999
{
100-
'input_extension': ['py', 'ipy'],
100+
'input_extension': 'pyw',
101+
'context': {'name': 'File'},
102+
'output_formats': [],
103+
'configuration_widget': IPythonConfigOptions,
104+
'requires_cwd': True,
105+
'priority': 10
106+
},
107+
{
108+
'input_extension': ['py', 'ipy', 'pyw'],
101109
'context': {'name': 'Cell'},
102110
'output_formats': [],
103111
'configuration_widget': None,
104112
'requires_cwd': True,
105113
'priority': 10
106114
},
107115
{
108-
'input_extension': ['py', 'ipy'],
116+
'input_extension': ['py', 'ipy', 'pyw'],
109117
'context': {'name': 'Selection'},
110118
'output_formats': [],
111119
'configuration_widget': None,

0 commit comments

Comments
 (0)