How to run/debug a script file its name has characters such as space, (, etc.

Chris Angelico rosuav at gmail.com
Fri Oct 12 08:04:30 EDT 2018


On Fri, Oct 12, 2018 at 9:16 PM <jfong at ms4.hinet.net> wrote:
>
> Chris Angelico於 2018年10月12日星期五 UTC+8下午4時39分37秒寫道:
> > On Fri, Oct 12, 2018 at 6:26 PM <jfong at ms4.hinet.net> wrote:
> > >
> > > I saw a directory where all its filenames are something like this:
> > > ...
> > > 1a PSG (Entry and PopUp).py
> > > 1b PSG (Format).py
> > > 1c PSG (persistent form and bind key).py
> > > ...
> > >
> > > Just wondering how these file can run and debugged under Windows?
> > >
> >
> > Put the file name inside double quotes. You can probably do this by
> > tab-completing the name - type 1c and then hit the tab key - your
> > shell should fill out the rest of the name with whatever quoting is
> > necessary.
> >
> > ChrisA
>
> After using Windows so many years, I don't know this trick the double quotes and tab can do in the shell. It really embarrass me:-(  Thanks you, Chris.
>

No need to feel bad. Windows isn't as shell-heavy as Unix systems
(including Linux) tend to be, and Windows users are almost never as
shell-heavy as Unix users are. There are a lot of really cool tricks
and features available that aren't heavily used, and that applies on
ALL systems (seriously, have you ever met ANYONE who uses the entire
power of bash??); it's awesome to learn new ways to work more
efficiently, but there's no shame in not having used those methods
already :)

ChrisA



More information about the Python-list mailing list