some more work in structure
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import os
|
||||
|
||||
|
||||
class vmenuManager():
|
||||
@ -62,4 +63,26 @@ class vmenuManager():
|
||||
return
|
||||
self.currIndex -= 1
|
||||
if self.currIndex < 0:
|
||||
self.currIndex = len(self.menuDict) - 1
|
||||
self.currIndex = len(self.menuDict) - 1
|
||||
def fs_tree_to_dict(self, path_):
|
||||
for root, dirs, files in os.walk(path_):
|
||||
tree = {d: fs_tree_to_dict(os.path.join(root, d)) for d in dirs}
|
||||
tree.update({f: root + f for f in files})
|
||||
return tree # note we discontinue iteration trough os.walk
|
||||
''''
|
||||
import os
|
||||
level = [0]
|
||||
|
||||
def fs_tree_to_dict( path_):
|
||||
file_token = ''
|
||||
for root, dirs, files in os.walk(path_):
|
||||
tree = {d: fs_tree_to_dict(os.path.join(root, d)) for d in dirs}
|
||||
print(files, root, dirs)
|
||||
tree.update({f: root + f for f in files})
|
||||
return tree # note we discontinue iteration trough os.walk
|
||||
|
||||
v = fs_tree_to_dict( '/home/chrys/Projekte/fenrir/src/fenrirscreenreader/commands/vmenu')
|
||||
|
||||
|
||||
|
||||
''''
|
||||
|
Reference in New Issue
Block a user