Questions tagged as 'python'

0
answers

how to open a csv file with python?

hello everyone I have a code in python that I used to send text messages, this code was passed by the same manufacturer of the product but I do not understand a lot of python, could you tell me how to open the csv file here please I pass the cod...
asked by 02.04.2017 / 16:52
1
answer

Exception parse error parity

I am trying to evaluate the derivative of a function with the parser function evaluator, the problem is that when sympy returns the exponents represented as "**" and my evaluator does not understand that it is power, he is waiting for a symbol ^...
asked by 23.03.2017 / 18:52
0
answers

Convert / decode character in html page and convert it into a list

I have a server in python 'simpleHTTP' running on my machine. He works as he should but there is a problem with the client side. An error is raised when you try to read a directory that has an accent in its name. This has happened to me no...
asked by 18.04.2017 / 21:04
1
answer

I have problems with urllib2 in Python 2.71

I have this request: import urllib2 f = urllib2.urlopen('http://www.python.org/') print f.read(100) but when I run it in Python 2.7.1, I get the following error:    AttributeError: 'module' object has not attribute 'urlopen'     
asked by 06.03.2017 / 22:41
2
answers

Multiprocessing with processes in Python

I must write in the same file simultaneously for 4 processes, with threads I have no problem (even if I do not block the access, I guess for the GIL), but with processes is different because when you reach lock the process simply omits that part...
asked by 24.03.2017 / 01:53
1
answer

After installing PostgreSQL I try to access the localhost and I get a message that the page does not exist

I am starting a web page project which I will do with Django , to make it more complete I will use PostgreSQL to manage the database. I already have installed the python with which I also have a good experience and I also have installed...
asked by 06.03.2017 / 18:00
1
answer

TypeError: only length-1 arrays can be converted to Python scalars

import matplotlib.pyplot as plt import numpy as np from py_expression_eval import * def f(exp, var, x0): p = Parser() result = p.parse(exp).evaluate({var:x0}) return result a = 0 b = 4 error = 10 i = 0 while(error>1e-8 and i!=100)...
asked by 02.03.2017 / 10:23
0
answers

How to make a query Inner Join in Django

I have the following models: class perfil(models.Model): usuario = models.OneToOneField(User, on_delete=models.CASCADE) carrera = models.TextField() promocion = models.TextField() telefono = models.TextField(max_length=11)...
asked by 20.02.2017 / 20:13
2
answers

Script does not work outside of IDLE

The following code can be executed from IDLE (a Python IDE) in 32-bit Python 3.6 on Windows 7 (64 bits) import tkinter def algo(): pass def ventanan1(): Ventana1=tkinter.Toplevel() Ventana1.geometry("250x100") Ventana1.title("Ve...
asked by 15.03.2017 / 02:33
1
answer

ValueError: invalid literal for int () with base 10: '*'

I'm starting to program in Python, and my question is this: my program does run, however when wanting to exit the loop, it throws me the following error: def pcn_loop3(): while True: x = int(input("Ingrese un numero ('*' para te...
asked by 18.02.2017 / 18:46