0
I have two python codes, one that is called [receiving.py] another that is called [sending.py] I have a problem importing my codes. I’m just gonna send a little piece of my code that I’m in trouble.
EX:
ENVIAR.py
import pika
def envio(ch, method, properties, body):
print(body)
try:
dados_envio = json.loads(body)
from recebimento import run,rr
run(data)
rr(data) ## aqui é a conexão com meu codigo "recebimento.py" para ele receber dados do "enviar.py"
RECEIPT.py
import json
def run(data):
driver = webdriver.Firefox()
driver.get('google.com')
elemento = driver.find_element_by_name('q')
elemento.send_keys('{}'.format(data['nome']))
def rr(data):
elemento2 = driver.find_element_by_name('q')
elemento2.clear()
elemento2.send_keys('{}'.format(data['cidade']))
i want to do data exchange with more than one function.
but I get that mistake.
ImportError('cannot import name rr',))
Someone knows how to help me?