python-3.6

Python Selenium select div

Python Selenium select div Question: driver = webdriver.Chrome() driver.get("https://discord.com/register") driver.find_element_by_xpath("//input[@class=’inputDefault-_djjkz input-cIJ7To’ and @type=’email’]").send_keys(mail) driver.find_element_by_xpath("//input[@class=’inputDefault-_djjkz input-cIJ7To’ and @type=’text’]").send_keys(name) driver.find_element_by_xpath("//input[@class=’inputDefault-_djjkz input-cIJ7To’ and @type=’password’]").send_keys(name) I have a problem. I do autogenerator accounts and discord.mail,password,name work. But with a date, I have problems because they don’t have input. How can I do it? Asked By: Никита Давыдов || Source …

Total answers: 1

Error when installing pywin32 (on Ubuntu)

Error when installing pywin32 (on Ubuntu) Question: I’m trying to install the pywin32 module on Ubuntu for python 3.6, I’ve tried pip3 install pywin32 and got the following output: Collecting pywin32 Could not find a version that satisfies the requirement pywin32 (from versions: ) No matching distribution found for pywin32 Then I tried pip3 install …

Total answers: 2

Simple equation reversal

Simple equation reversal Question: I am solving follwoing challenge but unable to do so now since last 4 hrs and I am stuck : Challenge : > Given a mathematical equation that has *,+,-,/, reverse it as follows: > > solve("100*b/y") = "y/b*100" > solve("a+b-c/d*30") = "30*d/c-b+a" Code I have made to resolve the challenge …

Total answers: 3

Unsure how to remove whitespace from strings

Unsure how to remove whitespace from strings Question: current_price = int(input()) last_months_price = int(input()) print("This house is $" + str(current_price), ‘.’, "The change is $" + str(current_price – last_months_price) + " since last month.") print("The estimated monthly mortgage is ${:.2f}".format((current_price * 0.051) / 12), ‘.’) This produces: This house is $200000 . The change is …

Total answers: 3

How to check for string in online text file in Python

How to check for string in online text file in Python Question: How do I check for a string from an online text file? Right now, I am using urllib.request to read the data, but how would I check for a string from an online text file? Asked By: Ayush Gundawar || Source Answers: I …

Total answers: 1

How can I use tqdm to show the progress of a while loop?

How can I use tqdm to show the progress of a while loop? Question: I have seen tqdm used to show progress in for loops, but I was wondering how to do that with while loops. I have some code here to get the percentages of coin flips at any number of flips: def flipem(): …

Total answers: 1

flask_uploads: ImportError: cannot import name 'secure_filename'

flask_uploads: ImportError: cannot import name 'secure_filename' Question: I want to create a form that allows to send a picture with a description using flask forms. I tried to use this video: https://www.youtube.com/watch?v=Exf8RbgKmhM but I had troubles when launching app.py: ➜ website git:(master) ✗ python3.6 app.py Traceback (most recent call last): File “app.py”, line 10, in …

Total answers: 7

ModuleNotFoundError: No module named 'dnspython'

ModuleNotFoundError: No module named 'dnspython' Question: I am trying to import the module dnspython in a python 3.6 script using import dnspython. pip3 freeze shows that the package is installed but I keep getting the error ModuleNotFoundError: No module named ‘dnspython’ I have tried: pip3 install dnspython uninstalling and reinstalling with pip3 pip3 install git+https://github.com/rthalley/dnspython …

Total answers: 3

Can you have an async handler in Lambda Python 3.6?

Can you have an async handler in Lambda Python 3.6? Question: I’ve made Lambda functions before but not in Python. I know in Javascript Lambda supports the handler function being asynchronous, but I get an error if I try it in Python. Here is the code I am trying to test: async def handler(event, context): …

Total answers: 2

How to fix — bash: /usr/bin/python: Too many levels of symbolic links

How to fix — bash: /usr/bin/python: Too many levels of symbolic links Question: I wanted to make python3 my default on rhel so I followed the following at How to set Python3.5.2 as default Python version on CentOS? sudo ln -fs /usr/bin/python3 /usr/bin/python It changed the default to 3.6.8 root@rhel:~# python -V Python 3.6.8 Then …

Total answers: 4