Questions tagged as 'python-2.7'

1
answer

File corrupts when trying to copy it [closed]

I was trying to copy a file using Python, but the file corrupts ... Look at the code: #!/usr/bin/env python cf = raw_input("File: ") ds = raw_input("Destino: ") with open(cf,"rb") as fl: for l in fl.read(): l.rstrip() with open(ds,"wb")...
asked by 16.08.2018 / 17:08
1
answer

Connect a button with a lcd screen pyqt4

Good afternoon everyone! I need to develop a calculator in pyqt 4, but I do not know how to connect the number / operations buttons to the virtual lcd display. I already researched, but found nothing that solved my problem. Can someone help m...
asked by 13.08.2018 / 19:12
0
answers

How do I extract data into Scalepy Models.py fields?

I want to remove all "Municipalities" from the tag starting at this page. link And then remove information such as: "county name", "mayor", etc. of the pages of each county in the list. Using the shell with the line to line extract all t...
asked by 29.07.2018 / 20:36
0
answers

How to search and start an application using python

I am developing a code that allows me to find and run any application (for the moment only from the desktop) using python 2.7, using a phrase, this in Windowns 10. Ex: open firefox. Test code: import os def run_prog(self): for p in self...
asked by 09.07.2018 / 00:06
0
answers

Problem starting project with Fiona in Windows

I made a software in ubuntu, and I'm having several problems to run the same in windows what I'm working on now is to install fiona. I have it installed in my PIP packages but for some reason it does not work, so I decided to install it via s...
asked by 15.06.2018 / 03:54
0
answers

Function being called before being called by the GUI

I have software that I'm using Tkinter as a GUI, to get some parameters that the user will give me. In this software I have 1 problem and one question. The problem is this, as soon as I run the software, the process_files function is alrea...
asked by 14.06.2018 / 03:09
0
answers

Generate ctypes._fields_ dynamically

Good afternoon guys! This is my first post here, so have patience with the newbie;) I am creating a DNS server taking into account the RFC 1035 specifications using the ctypes to improve code readability and make it more organized. My...
asked by 25.06.2018 / 19:46
0
answers

Match size of 2 vectors

I have a set of data that I need to compare .... do a statistical analysis Assuming my dataset is A - > len (A) = (18.1) B - > len (B) = (73.1) I need to plot A vs B ... do a linear regression, compute correlation, r ^ 2 and ae an...
asked by 07.06.2018 / 11:03
0
answers

How can I convert image data to float? Or is there something wrong with the code?

I'm testing a code and I had problems: I can not see the image. The message that appears is: TypeError: Image data can not be converted to float (image data can not be converted to float) I could not solve this, please help me CODE: from ma...
asked by 20.05.2018 / 18:18
0
answers

How can I call a program.py on a server within another local program.py?

I have interacted with a server within a program that I am doing using the os.system () function as if it were using the console itself. os.system("ssh [email protected] 'comando a ser realizado'") For everything I had done before (create...
asked by 14.05.2018 / 22:20