ethanchewy / PythonBuddy

1st Online Python Editor With Live Syntax Checking and Execution
https://pythonbuddy.com
BSD 3-Clause "New" or "Revised" License
277 stars 84 forks source link

OS detection fixing gutter error notifications #32

Closed derekwilling closed 6 years ago

derekwilling commented 6 years ago

tested w/ python 3.7.0, windows 10 1809, and MS Edge.

image

Fixes #29

ethanchewy commented 6 years ago

@DirtySoc

For scoping and to create clearer error messages, let's do something like this:

line_num = None
if os.name == "nt":
        line_num = error.split(":")[2]
else:
       try:
            line_num = error.split(":")[1]
      except Exception as e:
           print(os.name + " not compatible: " + e)
derekwilling commented 6 years ago

updated. let me know if that works!

ethanchewy commented 6 years ago

@DirtySoc That works! Thanks! I'll test it out on my windows and linux systems and merge it later tonight. Thanks!

derekwilling commented 6 years ago

Cool. I'll start working on #26