Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider multi-line Python statements for start scene #25

Open
Splines opened this issue Oct 24, 2024 · 3 comments
Open

Consider multi-line Python statements for start scene #25

Splines opened this issue Oct 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Splines
Copy link
Member

Splines commented Oct 24, 2024

With the behavior introduced in #17, via the Start scene at cursor command, the scene is started at the line of the cursor (or the whole scene is previewed when the cursor is at a class statement).

This might be problematic when one Python statement is spread over multiple lines. Manim will then fail and the user might not even notice if they don't have their terminal open.

Options to resolve this and more details are provided in this comment:

  1. Propagate this error to the user in a vscode notification
  2. Implement logic to detect the end of the python expression on the selected line

Where the first option would probably be easier to implement. Maybe one could also just open the terminal if an error is encountered?

@VladimirFokow
Copy link
Collaborator

VladimirFokow commented Oct 24, 2024

(option 1) :

But how to detect if there was an error? -

Get the output from the ipython terminal via the VSCode API,
and see if it's red / or contains substring that indicates this error?

@Splines
Copy link
Member Author

Splines commented Oct 24, 2024

I was able to get the stream of an already running terminal with this code.
(The code there is really bad, it's just my first attempts to get anything related to the progress indicator to work).

@bhoov
Copy link
Collaborator

bhoov commented Oct 25, 2024

I agree with this comment that we can treat this as an issue for future development. For v0.1.0, we can assume that users are viewing a terminal and can see the error.

@bhoov bhoov added the enhancement New feature or request label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants