I have three .py files in my directory: Banco.py
, app.py
, Usuarios.py
.
My app.py
contains the Tkinder import I am using in the code and here I start all my view and import the Usuarios.py
class as follows:
#Arquivo app.py
from .Usuarios import *
from tkinter import *
class Application:
def __init__(self, master=None):
In the file Usuario.py
it contains all the SQL executions for insert, delete, update and select, and in that file I import the file Banco.py
, it follows:
#Arquivo Usuarios.py
from .Banco import Banco
class Usuarios():
def __init__(self, idusuario=0, nome="", telefone="", email="", usuario="", senha="" ):
Then in the Bank file I only give the import in sqlite for its use, it follows:
#Arquivo Banco.py
import sqlite3
class Banco():
def __init__(self):
The problem comes up when I run the app.py which returns me the following error:
/usr/bin/python3.6 "/ home / owi / Documents / PycharmProjects / Tkinder examples / app.py "Traceback (most recent call last): File "/ home / owi / Documents / PycharmProjects / Tkinder examples / app.py", line 1, in from .Users import * ModuleNotFoundError: No module named ' main .Users'; ' main ' is not a package
Process finished with exit code 1
I would like to understand what the problem is related to main that is not correct since all classes contain def __ini__
.