0
I need to bring a class file like this that is in class.py:
class Despesas(object):
def __init__(self):
self.Prioridade = Prioridade()
self.Situacao = True
self.Valor = 0.0
self.Categoria = ''
To the View.py file.
In PHP I can do this function with the require('Filename') method, How to do this in Python 3.6?
Something like
from classe import Despesas
– Woss
Too basic a question about language syntax
– jsbueno
https://wiki.python.org.br/ModulosPacks -I suggest reading, even if above, in the tutorial - has a very nice translation: https://wiki.python.org.br/Tutorial_Python
– jsbueno
I ruled out the closing vote, but it’s also a duplicate of https://answall.com/questions/231365/import-python
– jsbueno
Possible duplicate of Import in Python
– Woss