Questions tagged as 'python'

1
answer

How to make a script in python run two processes simultaneously?

Soon I learned to capture videos through the webcam using Python with the OpenCV library. After that, I had the idea of making a script that automatically starts and stops recording a video. Once the program started, the capture would start, but...
asked by 18.01.2017 / 16:18
1
answer

Reading CSV with Python

As I can go by giving a "scan" in the CSV file and when finding a certain String in the CSV line, print in another file the complete line with its values after the string. Ex When you find the string "Bruno lorencini" in csv, print to a second f...
asked by 23.03.2017 / 21:05
1
answer

Converting a text file in XML with Python

Imagine that I have the following command: echo -e "'date'\n\n'free'\n\n'vmstat'\n" >> free_vmstat_output.txt The generated file (the output of the above command) would be (in TEXT mode): Fri Mar 31 22:19:55 -03 2017 t...
asked by 01.04.2017 / 08:54
1
answer

Sockets Python disconnect client

I would like to have a specific client disconnected with a server command. from socket import * meuHost = '' minhaPort = 50007 sockobj = socket(AF_INET, SOCK_STREAM) sockobj.bind((meuHost, minhaPort)) sockobj.listen(5) while Tr...
asked by 03.01.2017 / 01:41
1
answer

Python - Tkinter Module

I'malmostdonewiththislittleprogram,butwhat'shappeningisthis:Inthe"Tools" tab I create 2 submenus, in which I wanted to add submenus within other submenus, I know it's possible, but I still have not figured it out. So far I've been able to ma...
asked by 18.03.2017 / 19:40
1
answer

Twitter User-App Authentication

I'm developing some Python scripts with the intention of bringing specific tweets and doing later analysis, but I'm having doubts about the type of Twitter authentication. So I noticed, there are two types of authentication, User-Based Authen...
asked by 07.02.2017 / 18:17
1
answer

How to run a crawler in Python with PHP

I made a crawler with Python and run it through the command line: python crawler.py As soon as I run this command it asks me for the keyword that will be searched for and start running. global keyword keyword = raw_input('Keyword: ') T...
asked by 27.01.2017 / 13:45
1
answer

Python - How to get the names of the drivers C: D: F: I:

   I am developing GUI in Python 3.6 using TKinter . I came to an impasse where I have to get the installed driver letters and their names in the same way they appear in Windows Explorer . See attached picture....
asked by 04.05.2017 / 16:19
1
answer

What is the problem with this code that takes the highest and lowest value?

I want to display the sum of the numbers entered as well as the largest and the smallest number entered, only with while , if and else : contador = 1 maior = 0 menor = 0 S = 0 # 1º NÚMERO A SER SOMADO while contador <=...
asked by 14.01.2017 / 22:36
1
answer

Python Using .replace () with list comprehension

Can someone tell me if I can make it work: a = ['<a1>', '<a2>', '<a3>', '', '<a5>'] b = ['<b1>', '<b2>', '<b3>', '', '<b5>'] txt = '<a1> test <a2> test <a3> test <a4> test...
asked by 15.01.2017 / 05:12