Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Support magic arguments #12

Closed
bollwyvl opened this issue Jun 7, 2015 · 4 comments
Closed

Support magic arguments #12

bollwyvl opened this issue Jun 7, 2015 · 4 comments

Comments

@bollwyvl
Copy link
Owner

bollwyvl commented Jun 7, 2015

Neither cell or line magics can accept parameters: they result in parse errors.

@actsasgeek
Copy link

Is there a way to get my matplotlib inline whilst this issue is open?

%matplotlib inline
Using matplotlib backend: MacOSX
Magics with parameters are not supported

@bollwyvl
Copy link
Owner Author

Not yet. The magics are not real python, so hy can't make ast for them. I
tried masking them in comments, but that didn't work either, as hy strips
comments.

The hy to ast to code approach is brittle as hell anyway. The real answer
will be to somehow wrap magics:

(%matplotlib inline)

As well as somehow handle cell magics that don't expect code. PRs or
suggestions welcome!

On 17:16, Sat, Jun 13, 2015 Steve Butcher [email protected] wrote:

Is there a way to get my matplotlib inline whilst this issue is open?

%matplotlib inline
Using matplotlib backend: MacOSX
Magics with parameters are not supported


Reply to this email directly or view it on GitHub
#12 (comment).

@bollwyvl
Copy link
Owner Author

Actually, just fixed this with #17, now on pypi as 0.3.0.

It breaks the code up around magics and compiles them as discrete chunks.

Still won't do inline magic!

@actsasgeek
Copy link

sweet, just tried it out. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants