question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The startup_script feature ignores spaces

See original GitHub issue

I tried to add a startup_script using the following code:

class MyCmd(Cmd):
    def __init__():
        Cmd.__init__(self, startup_script='/home/ubuntu/my folder/start.rc')
        ...

However, after debugging the code, it seems that cmd2 is considering that path as two separated elements: /home/ubuntu/my and `folder/start.rc’, and then of course the parsing fails when trying to see if that’s a real file, as I get the following error:

ERROR: /home/ubuntu/my does not exist or is not a file

Any help?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tleonhardtcommented, Jun 26, 2018

Yup, came to the same conclusion myself and just pushed that fix 😉 PR coming shortly

1reaction
tleonhardtcommented, Jun 26, 2018

@Den1al Thank you for reporting this. I was able to reproduce it and it is most certainly a bug. We will look into fixing it shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trim trailing spaces in Xcode - Stack Overflow
Starting from Xcode 4.4 whitespaces will be trimmed automatically by default, unless the line is all whitespace. You can also activate Including ...
Read more >
How to accept input with spaces from command line in bash ...
Currently I am having a bash script in which I accept input from the command line, but the input is with spaces and...
Read more >
4. The Shell Startup Files - Using csh & tcsh [Book] - O'Reilly
The shell treats lines that begin with # as comments and ignores them. Use this feature to add comments that document your modifications....
Read more >
How To Remove Spaces from a String In Python - DigitalOcean
Introduction. This tutorial provides examples of various methods you can use to remove whitespace from a string in Python.
Read more >
Troubleshoot Storage Spaces Direct - Microsoft Learn
Run cluster validation and review the Storage Space Direct section, ensure the drives that will used for the cache are reported correctly and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found