Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pobshell: A Bash-like shell for live Python objects #1460

pdalloz started this conversation in Show and tell
Discussion options

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".

You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

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.

You must be logged in to vote
1 reply
Comment options

Thank you, I've done that.

Comment options

@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
You must be logged in to vote
1 reply
Comment options

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /