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

Fixed pyspark indentation issue: ZEPPELIN-34 #61

Closed

Conversation

whisperstream
Copy link
Contributor

Fixes the pyspark indentation issue discussed here: https://issues.apache.org/jira/browse/ZEPPELIN-34

Allows you to have indented and nested code:

%pyspark
def test_fix(text):
    for i in range(1, 10):
        print text + str(i)
test_fix("now fixed - ")

@whisperstream
Copy link
Contributor Author

sorry, looks like the indentation changed dramatically when I changed the file, will re-submit as there were only a few line changes

@Leemoonsoo
Copy link
Member

Hi @whisperstream.

Could you try

%pyspark
if True:
    print "Yup"
else:
    print "Nope"

I get

(<type 'exceptions.SyntaxError'>, SyntaxError('invalid syntax', ('<string>', 1, 4, 'else:')), <traceback object at 0x10c3becf8>)

with this branch

@whisperstream
Copy link
Contributor Author

You're right, it didn't work for that case. I have submitted a new pull
request, with a simplified version that seems to work for all cases:

#63

-Axel

On Wed, May 6, 2015 at 1:01 AM, Lee moon soo notifications@github.com
wrote:

Hi @whisperstream https://github.com/whisperstream.

Could you try

%pysparkif True:
print "Yup"else:
print "Nope"

I get

(<type 'exceptions.SyntaxError'>, SyntaxError('invalid syntax', ('', 1, 4, 'else:')), <traceback object at 0x10c3becf8>)

with this branch


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

@jongyoul
Copy link
Member

@whisperstream Please close this issue. I've seen #63 resolved this issue.

@jongyoul
Copy link
Member

heartbeat

@asfgit asfgit closed this in dcc1655 Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants