Add a mechanism by which Spyder would detect a file's type
See original GitHub issueIs there a way to help spyder understand that a file (script) is in fact a python script, even if it doesn’t use the usual ‘.py’ extension and neither has the ‘#!’ shebang magic ?
For emacs I’m embedding a # -*- python -*- line, but that obviously isn’t recognized by spyder. Is there any other mechanism I could use ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Files — Spyder 5 documentation
You can view and filter files according to their type and extension, open them with the Editor or an external tool, and perform...
Read more >Spiders — Scrapy 2.7.1 documentation
Spiders¶. Spiders are classes which define how a certain site (or a group of sites) will be scraped, including how to perform the...
Read more >How do I debug efficiently with Spyder in Python?
Quick first debugging using iPython %debug ... The first thing I do is to call pdb from iPython using the magic command %debug...
Read more >Input Files - Cantera
The required input files can be provided via one of several methods: ... Convert a pre-existing mechanism from Chemkin (CK) format to YAML...
Read more >Testing Guide - OWASP Foundation
find errors, please add a note to the discussion page or make the ... files. For security testing, developers can rely on the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The languages configuration (that we’re planing to introduce in spyder4) could have a field “first line”, that will be a regex to detect the file based in the first line (like vscode do)
first_line = r"^#!/.*\\bpython[0-9.-]*\\b"We could use the pygments lexer detector?