-
Notifications
You must be signed in to change notification settings - Fork 128
Pobshell: A Bash-like shell for live Python objects #1460
-
Hi cmd2 people, I made a thing using cmd2!
https://github.com/pdalloz/pobshell
To quote the README
"""It's cd, ls, cat, and find — but for Python objects instead of files. Stroll around your code, runtime state, and data structures. Inspect everything: modules, classes, live objects. It's pick‐up‐and‐play: familiar commands plus optional new tricks. A fun and genuinely useful way to explore a Python app, package, or Python itself."""
Would it be possible to add it to your "Projects using cmd2" section?
Sorry if this should have been a pull request instead, the notes said "please get in touch".
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 2 replies
-
Hi @pdalloz . That looks like something people might enjoy for live debugging sessions and such.
Feel free to submit a PR to update the README to add info on pobshell.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you, I've done that.
Beta Was this translation helpful? Give feedback.
All reactions
-
@pdalloz I was looking through your code and came across this TODO.
def ns_path_complete(self, text: str, line: str, begidx: int, endidx: int, path_filter: Optional[Callable[[str], bool]] = None) -> List[str]: ... # TODO This breaks cmd2 rules, it should not be a bound method, but I need a handle to PV instance
https://github.com/pdalloz/pobshell/blob/main/pobshell/pobmain.py#L950
You're not doing anything wrong here, so there is nothing to fix. When our documentation says not to set choices_provider or completer to a bound method, we mean the following.
completer=ns_path_complete # CORRECT completer=self.ns_path_complete # WRONG
Beta Was this translation helpful? Give feedback.
All reactions
-
You've put my mind at rest I've had a background worry about that.
I see the documentation is clear now you point it out. I'll remove the comment.
Thank you for taking the time.
Beta Was this translation helpful? Give feedback.