Questions tagged as 'python'

1
answer

Change strings with reference to dictionaries

To put my question correctly, I will put some "contextual" code. Unfortunately, I had to go to see the solutions of a couple of exercises because it was not clear to me what had to be done and how the code works. I hope you can guide me. First o...
asked by 16.09.2017 / 10:44
1
answer

Create excel from a list that has a dictionary inside

I would like to know how to create an Excel file with the data inside a list that has dictionaries nested in Python. The structure of the data is as follows: xs=[{'x': 2, 'y': 1, 'z': 4}, {'x': 3, 'y': 15, 'z': 41}, {'x': 22, 'y': 10, 'z':...
asked by 25.08.2017 / 02:29
1
answer

Problems opening Jupyter Notebook - Python

I just reinstalled python and the package for jupyter notebook, however when running from the cmd jupyter notebook I get the following message I verify the installation and it tells me that it has all the required packages installed Do...
asked by 20.08.2017 / 02:29
1
answer

how to omit values in python

I try to get an array of averages from a list but there are some gaps then as a condition that I do not use that empty values list = [1, "", 1,2,4, ""] how to add an if wing instruction so that it does not use the NoneType and exit error...
asked by 21.08.2017 / 22:13
1
answer

Access the Django database from a non-Django script

When I try to access the database that Django automatically creates from the interpreter, or from a script that Django has not created on its own, I receive an error. Code where I try to import the User model of the application called ap...
asked by 25.08.2017 / 18:24
1
answer

Date updated on Tkinter

I want to do an accountant in Tkinter little by little. At the moment I want you to show me the date in seconds (yes, I know it's a bit weird ...) through this function: def Date_secondsnow(): now = datetime.now() Datesecondsnow = now....
asked by 26.08.2017 / 09:52
1
answer

break does not break the client listening cycle on server when receiving keyword

I have two codes: one the server and the other the client: The server: import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(("127.0.0.1", 9999)) s.listen(5) print ("Servidor de Chat\n") while True: pri...
asked by 16.12.2017 / 20:23
1
answer

Enter values within Variable python

#!/usr/bin/python # coding=utf-8 import time from selenium import webdriver import xlsxwriter from Data_tags import Inventory_data driver = webdriver.Chrome('/Users/Martin/Desktop/chromedriver') def run(d): login("Usuario", "pass") New...
asked by 09.10.2017 / 23:13
1
answer

Accesses using Key Dictionaries Python

I want to place some function in my code that allows me to enter the dictionary key outside the code. I mean to run the program and through the terminal I asked what key of the dictionary I want to place. To express myself better here is part...
asked by 09.10.2017 / 04:26
1
answer

How can scraping be done on a web page that has javascript with python 3?

Hi, I would like to know how I can scrap a web page that has Javascript using PyQt5, the page from which I want to extract information is this: link From this page I want to take the name of the series and the chapters. This is what I have...
asked by 16.08.2017 / 22:44