<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>342730</bug_id>
          
          <creation_ts>2015-01-11 13:02:40 +0000</creation_ts>
          <short_desc>Make it able to run python code with comments</short_desc>
          <delta_ts>2015-01-13 19:50:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>cantor</product>
          <component>python2-backend</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Minh Ngo">nlminhtl</reporter>
          <assigned_to name="Filipe Saraiva">filipe</assigned_to>
          <cc>alexanderrieder</cc>
          
          <cf_commitlink>http://commits.kde.org/cantor/c81c2f71fe134f652fef3aca83733d79556f875c</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1490333</commentid>
    <comment_count>0</comment_count>
    <who name="Minh Ngo">nlminhtl</who>
    <bug_when>2015-01-11 13:02:40 +0000</bug_when>
    <thetext>Currently this code can be run:
print(1 + 2) #some comment,

but this one will return an error:

#some comment
print(1 + 2)

Comments are important part for the code, and it will be nice to make it runnable too with code.

Reproducible: Always

Steps to Reproduce:
1. print:
#some comment
print(1 + 2)
2. and try to run this code

Actual Results:  
Error

Expected Results:  
3

I will work on this problem :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490457</commentid>
    <comment_count>1</comment_count>
    <who name="Filipe Saraiva">filipe</who>
    <bug_when>2015-01-12 08:38:13 +0000</bug_when>
    <thetext>Hum, you can to run it in previous stable Cantor version. I will review your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490458</commentid>
    <comment_count>2</comment_count>
    <who name="Minh Ngo">nlminhtl</who>
    <bug_when>2015-01-12 08:40:42 +0000</bug_when>
    <thetext>Not sure, doesn&apos;t work with the stable release of Cantor in Fedora 20 at least.

Anyway, I have added unit tests to be sure that it didn&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1490818</commentid>
    <comment_count>3</comment_count>
    <who name="Minh Ngo">nlminhtl</who>
    <bug_when>2015-01-13 19:50:13 +0000</bug_when>
    <thetext>Git commit c81c2f71fe134f652fef3aca83733d79556f875c by Minh Ngo.
Committed on 13/01/2015 at 19:44.
Pushed by minhngo into branch &apos;frameworks&apos;.

Makes it able to run python code with comments &amp; a bit of refactoring.
REVIEW: 122005

M  +33   -21   src/backends/python/pythonsession.cpp
M  +21   -4    src/backends/python2/testpython2.cpp
M  +3    -3    src/backends/python2/testpython2.h

http://commits.kde.org/cantor/c81c2f71fe134f652fef3aca83733d79556f875c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>