nikitakit / hydrogen-python

Python-specific plugin for hydrogen. Make Python coding in the Atom editor even more interactive!
https://atom.io/packages/hydrogen-python
MIT License
54 stars 20 forks source link

Bug when sending function #2

Closed kylebarron closed 6 years ago

kylebarron commented 6 years ago

Sorry to report a bug! Without this add-on installed, if I have my cursor at the end of the second line below, (at the place of the |) it'll send the rest of the function. With this installed, it appears that something is going awry and not sending to the ipython kernel correctly. It appears that the same error occurs when I select the 2nd through 4th lines. I'm hitting cmd+enter (hydrogen:run) in both instances.

d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(|
    data=d,
    dtype=np.int8)
File "<ipython-input-19-8cb79410d243>", line 2
    data=d,
           ^
SyntaxError: unexpected EOF while parsing
nikitakit commented 6 years ago

Hopefully fixed now.

This is embarrassing, looks like I don't know how the Javascript string manipulation APIs work.