在ST3中編譯python時(shí),默認(rèn)是運(yùn)行整個(gè).py文件,可否只運(yùn)行單行代碼或選定的部分?
認(rèn)證0級(jí)講師
Python is an analytical language.
Python unit testing should be on your mind.
Put the selected part into a function, and then call it inside the main
function
def foo():
print 'I was selected'
def main():
foo()
if __name__ == "__main__":
main()