CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2010
    Posts
    907

    Cannot run this python program.

    Hello,
    When I ran this python program with python 3.5.2
    I would get

    https://github.com/unr-arl/DubinsAirplane

    Code:
      File "DubinsAirplaneMain.py", line 46
        print '### Path Type: short climb RSR'
                                             ^
    SyntaxError: invalid syntax
    Any ideas why?
    Thanks a lot
    Jack

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Cannot run this python program.

    Run it under Python 2.7 instead because it is not written for Python 3. In this case, print in Python 3 is a function, so if written for Python 3 it would have been:
    Code:
    print('### Path Type: short climb RSR')
    Alternatively, you can update the Python code for Python 3, but if you are not familiar with the differences between Python 2 and Python 3, that could be very difficult.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured