This error is being generated because you are trying to import the module py
package teste
, or at least, that’s how the interpreter understands.
In Python language you should not put the file extension when importing the module. So your code should be like this:
import teste
teste.ipynb.path.insert('teste.py', "C:\Users\pasta\Documents\WPy64-3760\notebooks")
In addition, the point .
is used to inform Python that an X module is within a certain package. See the example below:
# Árvore de diretórios:
#
# carro/
# carro/config/
# carro/config/motor.py
# carro/roda.py
# carro/volante.py
# piloto.py
import carro.config.motor # Importa o módulo "motor.py" do pacote "carro/config"
import carro.roda # Importa o módulo "roda.py" do pacote carro
import carro.volante # Importa o módulo "volante.py" do pacote carro
import piloto # Importa o módulo "piloto.py" que está no diretório atual
To learn more about Python import see this another answer.