I am new to running python scripts in the terminal. I have ran the script ./filename.py and made sure it is executable with chmod +x filename. I also put #!/usr/bin/env python at the top of my program. i am getting no errors but none of my print statements are showing in my terminal. attached is my code. any ideas?
#!/usr/bin/env python
import ctypes
import os
def is_hidden(filepath):
name = os.path.basename(os.path.abspath(filepath))
return ('.' + name) or (has_hidden_attribute(filepath))
def has_hidden_attribute(filepath):
try:
attrs = ctypes.windll.kernel32.GetFileAttributesW(unicode(filepath))
assert attrs != -1
result = bool(attrs & 2)
except (AttributeError, AssertionError):
result = False
return result
def main():
print ('whatup')
print(is_hidden('~/.jupyter'))
print('hey')
And then from the terminal
$ ./makepass_jup.py
$