Questions tagged as 'python'

1
answer

Error running Cython - unable to find vcvarsall.bat

Good! When I try to run a file with Cython I get the following error: G:\>python setup.py build_ext --inplace running build_ext building 'VF_n' extensión error: Unable to find vcvarsall.bat I'm using Python 3.5.1 on Windows 7, 64 bits...
asked by 14.05.2016 / 21:28
1
answer

Python - Working on a file

I'm starting in Python and every sentence I try to write gives me an error. I created a archivo.txt with a fasta sequence that I downloaded, with its spaces and numbers. Now I try to work on it, making small changes, in plan to remo...
asked by 15.05.2016 / 21:03
1
answer

Create an executable with ptyhon cx_freeze

I'm creating an executable with python using the cx_freeze library, but I have a problem, when I run the setup.py to create the .exe this throws me an error asking me to close Python 2.7: Firma con problemas: Nombre del event...
asked by 31.03.2016 / 14:24
1
answer

How to convert a csv (unicode) file to csv (utf-8) in python 3.6.5?

I download a CSV (unicode) file from a website, the fields are separated by tabulation and in double quotation marks and the line break does not do it at the end of each row of how it looks in the CSV, example of how it is see the CSV informatio...
asked by 11.09.2018 / 08:04
1
answer

Create column from another column in which each row indicates the column to use to obtain that cell

I have the following information in a DataFrame in Python: ## x1 x2 x3 x4 x5 colum ##0 206 214 021 122 554 2 ##1 226 234 123 456 789 4 ##2 245 253 558 855 123 5 ##3 265 272 000 111 222 4 ##4 28...
asked by 12.09.2018 / 12:36
1
answer

Problem with basic function

Hi I am starting in Python and I have a problem with an exercise of a function that at first seems very basic, but I do not understand why it does not return what corresponds. Basically what you are looking for is to invest a chain, and for that...
asked by 18.08.2018 / 14:53
1
answer

change the image the index of a stakedWidget using a QcomboBox

Good evening I have the following code: from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic from PyQt5.QtCore import Qt from tabla import tabla_style class Principal(QMainWindow): def __init__(self): QMainW...
asked by 02.09.2018 / 04:30
1
answer

Is there any other way to make a Bubble Sort without defining it?

In Python3, when you search how to make a bubble sort, find something like this def bubbleSort(alist): for passnum in range(len(alist)-1,0,-1): for i in range(passnum): if alist[i]>alist[i+1]: temp =...
asked by 31.07.2018 / 19:26
1
answer

How to open webcam in fullscreen with python?

I have this basic code to open my webcam via python, but I do not know how to put it in fullscreen , could you help me? import cv2 cv2.namedWindow("preview") vc = cv2.VideoCapture(0) if vc.isOpened(): # try to get the first frame rval,...
asked by 03.08.2018 / 15:51
2
answers

how can I use this character (*) repeatedly in python3?

example: a=********** print'a' It shows me the following error OUTPUT: Traceback (most recent call last): File "python", line 1 a=********** ^ SyntaxError: invalid syntax     
asked by 03.10.2018 / 04:45