Simply Jonathan

This is Simply Jonathan, online writing habitat for Jonathan Holst. In here, you may find content divided into three main categories: links, notes and essays. The links are to external content of interest; the notes are small thoughts and ponderings; the essays are longer, more thought-through entries, often debating a subject thoroughly. Read more about Jonathan and this site.

Python File Names

23 February 2007, 3:27 PM CET +0100

As I was curious, I today tested whether you can use a dash in a file name with Python — or, more specifically, if you can use that file as a module afterwards. You cannot. So don’t name your files with dashes.

(This might be in a manual somewhere, but I hadn’t seen it explicitly mentioned. Maybe it’s just common sense since you can’t name your variables that way either, I don’t know)