-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_python_list.py
More file actions
executable file
·48 lines (38 loc) · 952 Bytes
/
test_python_list.py
File metadata and controls
executable file
·48 lines (38 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import sys
import os
#import imageio
#image io got updated and they building next to next v2 and v3 brances.
if sys.version_info < (3, 7):
import imageio
else:
import imageio.v2 as imageio
import numpy as np
from PIL import Image
#print("Files and directories in '", path, "' :")
# print the list
print("print list that show filenames")
print()
#ask for arguments for directory, ifn't given any , exit
path = "./test_files/"
dir_list = os.listdir(path)
print(dir_list)
print()
print("Full dir with name ")
print()
for filename in os.listdir(path):
#print(path)
if filename.endswith(".jpg"):
#print(filename)
#print(path)
pathfilename = path + filename
print(pathfilename)
print()
print("alternative style")
print()
data_len=len(dir_list)
data_out = 0
if (data_len > -1):
while (data_len > data_out):
print(dir_list[data_out])
data_out= data_out+1
#wait(100)