Commit d21fde27 authored by Felipe Silveira's avatar Felipe Silveira
Browse files

Adicionado limite de classes de acordo com a quantidade de pastas do...

Adicionado limite de classes de acordo com a quantidade de pastas do pynovisao/data, contabiliza antes de criar o demo
parent c711d7f5
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
Name: tk_interface.py Name: tk_interface.py
Author: Alessandro dos Santos Ferreira ( santosferreira.alessandro@gmail.com ) Author: Alessandro dos Santos Ferreira ( santosferreira.alessandro@gmail.com )
""" """
import os
import sys import sys
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
import Tkinter as Tk import Tkinter as Tk
...@@ -22,7 +22,17 @@ from interface import Interface, InterfaceException as IException ...@@ -22,7 +22,17 @@ from interface import Interface, InterfaceException as IException
class TkInterface(Interface): class TkInterface(Interface):
"""Implements graphical interface and functionalities using Tkinter.""" """Implements graphical interface and functionalities using Tkinter."""
MAX_CLASSES = 20 directory = os.getcwd()
if(directory[-1] == '/'):
directory = directory[:-1]
path = directory[::-1].find("/")
directory = directory[:-path] + "data"
directory = os.listdir(directory)
MAX_CLASSES = len(directory)
print MAX_CLASSES
utils = tk_local.Utils utils = tk_local.Utils
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment