Questions tagged as 'python-2.7'

1
answer

Selenium python travel dictionary

I am looking to build some function with for in to go through my dictionary. I explain a little the code that I have here, I use selenium. Within Def Name() in variable nametag , I call "NameTag" of my dictionary. So s...
asked by 20.10.2017 / 19:47
1
answer

Problems Login Python Selenium, Urllib, Urllib2, request!

I want to login to this page: https://onevideo.aol.com/#/ and I have tried with request, selenium, urllib2, urllib, mechanize ... and I have not even been able to find the username xpath and the submit button. Better said, if I find them...
asked by 11.10.2017 / 20:15
2
answers

How to access an object per class?

This is my code fragment that generates me error. boton = browser.find_element_by_css_selector(".boton boton-rojo") boton[0].click() Here is the html object: <div class="boton boton-rojo"><a href="https://******.*****.com.co/iMod...
asked by 26.12.2017 / 16:49
1
answer

Error with url when listing products from index.html file

I am trying to list products in a index.html file, I would greatly appreciate your help. I have this file from the app url: from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.hello_world, name='hello...
asked by 02.09.2017 / 02:27
1
answer

Receive emails with Python

I am trying to receive with Python the emails that I have in my Gmail. I connect without problems to my account and I get the mail from the one who sent the message, the subject or the delivery time, but there is no way to get the body of the me...
asked by 10.09.2017 / 16:44
1
answer

Environment variables

I need to create an environment variable to share information between two Python scripts. Let me explain, I have created three scripts in Python to check the operation or rather verify that the environment variable is created. These files are...
asked by 03.03.2018 / 22:49
1
answer

How to call xml while in the Lib \ xml folder?

Doing an exercise that starts with the following code: import xml.etree.ElementTree as ET tells me when executing it that it can not find the module.    Traceback (most recent call last):       File "C: \ Python27 \ xml1.py", line 1, in...
asked by 21.06.2017 / 10:58
1
answer

psycopg2.OperationalError: fe_sendauth: no password supplied⁠?

It turns out that I'm trying to get my program to get data from a database generated from pgadmin, but I'm not making it happen. I'm trying to make this work: from psycopg2 import connect import dbconfig cfg=dbconfig dbname=cfg.dbname dbhos...
asked by 07.07.2017 / 20:01
1
answer

print os.system () in python

I was practicing a small program in socket that allows access to the shell of the server machine. The case is that the p r int that would have to be sent to the client (which is the answer of os.system() ) are numeric...
asked by 01.06.2017 / 07:52
1
answer

How can I read a certain line of a csv file, keeping in mind that the process was stopped?

This in the dilemma of how to do to read a csv of 1,000,000 records and go back to the line that process previously. This would happen when the process stops in the middle, that is, I need to return it from the last point. I imagined how to w...
asked by 02.06.2017 / 01:40