Questions tagged as 'python'

0
answers

Columns of a ListView

Hello my question is if there is any way to modify the width of the columns in a listview using python code I make a query to a table in a database but it looks all messy, I would like to be able to fixed width to the columns, and that each o...
asked by 02.10.2017 / 03:28
1
answer

Problem when plotting data

The point is that I have the following code in python: import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('Output/015_Termal/Estructura_termal:lon-lat-Q-sigma-area-Z-Tz') lon = -6.8000e+01 lat = -2.5000e+01 Tz = data[np....
asked by 30.09.2017 / 14:29
0
answers

Restore connection with SMTPlib

Good afternoon: I have a Python program that what it does is read a Telegram message and send the same message but by email through the SMPT library. The problem is that by chance I send two messages from Telegram at the same time the program...
asked by 29.09.2017 / 15:44
1
answer

Click Javascript link href

I'm doing a code to enter a platform. It has a URL which I access and log in through Mechanize. import mechanize br = mechanize.Browser() br.set_handle_robots(False) br.addheaders = [('User-agent','Chrome')] #URL del Login br.open('https://pl...
asked by 29.09.2017 / 16:52
2
answers

Count all the characters except a few

I'm trying to count all the characters of a string other than four that I have reserved. for example: s.count (I want all the characters of a string (s) except 4: a, c t and g) How could you count all of them except the four mentioned?...
asked by 28.09.2017 / 20:59
0
answers

How to pass variables from php to python and vice versa using json

Someone knows why only one part of a program is executed in python, when it is called by one in php, my codes are as follows <?php $x=$_GET['velocidad']; if(isset($_GET['der'])){ $y=1; $z=0;...
asked by 01.10.2017 / 18:47
2
answers

How to create database and then consult them in excel through python?

Hello, I am trying to make a program in which I can add data in an excel file and later consult them, for this I must use the libraries openpyxl (for managing the .xlsx file) and tkinter (for the window where they should be enter the data), my p...
asked by 03.10.2017 / 03:52
0
answers

How is the url before I am?

I need to know in my view or template, which has been the previous URL to which I am. I am using request.get_full_path() but this returns the current url. Is there any way to know the previous url? I need it because I have a view th...
asked by 22.09.2017 / 11:32
1
answer

Dice in python

I'm trying to create a program that launches n number of dice n times, but it marks me an error nd = int(input("Cuantos dados quieres tirar? ")) nv = int(input("Cuantas veces quieres tirar los dados? ")) import random td = [0]...
asked by 04.10.2017 / 04:59
0
answers

I can not open QDialog

I'm doing a QMainWindow that calls a QDialog , when executing the QDialog it opens without problems but when placing the code so that it opens from the QMainWindow by clicking on the button it throws me the following e...
asked by 03.10.2017 / 23:23