When i run 'python3 setup.py sdist' in idle python shell i get the error SyntaxError: invalid syntax (, line 1)
I got a similar question @ This Question
But my code is: my setup.py contains:
from distutils.core import setup
setup( name = 'inester', version = '1.0.0', py_modules = ['inester'], author = 'Abhimanyu')
and my inester.py contains:
import sys
def print_lol(the_list, indent=False, level=0, fh=sys.stdout):
for each_item in the_list:
if isinstance(each_item, list):
print_lol(each_item, indent, level+1, fh)
else:
if indent:
for tab_stop in range(level):
print("\t", end='', file=fh)
print(each_item, file=fh)
python3 setup.py sdist
is not a Python statement. You're supposed to run that in a terminal, such as the Terminal app in OSX or thecmd
utility in Windows. – kwatford Apr 15 '14 at 20:00