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

Python Console (with ActiveState Python) - Issue with multinline strings input #292

Closed
jjarava opened this issue May 25, 2015 · 6 comments
Closed
Assignees
Milestone

Comments

@jjarava
Copy link

jjarava commented May 25, 2015

Hi!

Commercial user of Komodo version (latest):

komodo-license-2015-05-25_16-25-33

In the Console, when trying to add a multi-line string of the form:

>>> txt1="""BEGIN:VEVENT
DTSTART;TZID="Europe/Madrid":"""

I get an error and the variable is not initialized.

txt1="""BEGIN:VEVENT
DTSTART;TZID="Europe/Madrid":  File "<console>", line 1
    BEGIN:VEVENT
         ^
SyntaxError: invalid syntax

I get an error and the variable is not initialized.

I can make it somewhat work if the line is the 3 "commas" and then I paste the rest:

txt2="""
BEGIN:VEVENT
DTSTART;TZID="Europe/Madrid":
"""

but it's klunkier and I get an extra \n at the beginning of the string.

Same thing with Idle works fine in both formats:

Issue in Komodo:

komodo-bug-issue-in-komodo-2015-05-25_16-24-29

Works in IDLE:

komodo-bug-works-in-idle-2015-05-25_16-24-57

@Naatan
Copy link
Member

Naatan commented May 25, 2015

I cannot reproduce this, seems alright to me?

9geacfe2ficarv0xdk9njpxhwyuqxkcypvjvkbg0agm

@jjarava
Copy link
Author

jjarava commented May 25, 2015

Platform-specific issue?

I'm using ActivePython 2.7.8.10 on OSX (10.9.5) vs your case that is 2.7. on Linux?

@jjarava
Copy link
Author

jjarava commented May 25, 2015

Even more odd...

If I copy and paste the whole "line":

txt1=BEGIN:VEVENT
DTSTART;TZID="Europe/Madrid":"""

on the editor it works -- BUT if I start typing the beginning:

txt1="""

And then I PASTE the other 2 lines of data following the """

BEGIN:VEVENT
DTSTART;TZID="Europe/Madrid":"""

THEN is when I get the error in the Editor.

I've done the same test on IDLE and on the "command line" python interactive interpreter and in both places it works.

@Naatan
Copy link
Member

Naatan commented Jun 30, 2015

@cgchoffman can you repro this on windows?

@th3coop
Copy link
Member

th3coop commented Jun 30, 2015

Yes, this is easy to repro on Windows.
You can simplify it a bit more by just starting with the triple quote then pasting in additional lines and the closing triple quote.

"""blah #start

then past in

blah
blah
""""

It seems it's interpreting new lines as carridge returns rather than just a char (eg."\n").

@Naatan Naatan added this to the 10.0 milestone Oct 29, 2015
@mitchell-as
Copy link
Contributor

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

No branches or pull requests

4 participants