Aug-24-2018, 07:10 PM
I am trying to write a script using Python 3 and
os.walk. The code is as follows:
I receive no errors in the shell window.
However after hitting return for the line
'print(files)' nothing happens other than
a blank line is displayed. Hitting enter
a second time will create a display listing
of the log files.
If I run the script from the IDE it simply
returns the cursor to the beginning of the
next line and nothing happens after that.
No repeat tapping of the 'Enter' key causes
any change.
OS used is Ubuntu 18.04
Python version is 3.6.5
Any ideas on how t keep this from wandering
off and staring back at me? Thanks
Wiley
os.walk. The code is as follows:
1 2 3 4 5 6 |
import os path = '/home/systemconttrol/data_logs' for root, dirs, files in os.walk(path): print (files) |
However after hitting return for the line
'print(files)' nothing happens other than
a blank line is displayed. Hitting enter
a second time will create a display listing
of the log files.
If I run the script from the IDE it simply
returns the cursor to the beginning of the
next line and nothing happens after that.
No repeat tapping of the 'Enter' key causes
any change.
OS used is Ubuntu 18.04
Python version is 3.6.5
Any ideas on how t keep this from wandering
off and staring back at me? Thanks
Wiley