Questions tagged as 'python'

1
answer

Build Java code using Python

I want to create a python script that, given a name of a JAVA function, searches it in a library and copies it to another file. Is there any way to look up JAVA functions (providing the name) without doing the search string-a-string?     
asked by 28.04.2017 / 23:02
1
answer

Scapy Packages

I have some doubts that I can not heal about scapy , could you help me please? Questions: To declare a package in Scapy I do: pck = IP()/TCP() . With this I can query the layers of pkt , with for example: pkt[IP]...
asked by 26.03.2017 / 22:00
0
answers

Python does not find the "wait_read" member in "Gevent.socket"

import gevent from gevent import socket from gevent.pool import Pool from gevent.event import Event . . . def __receive__(self): """ receive response packets """ while not self.die_event.is_set():...
asked by 05.04.2017 / 21:45
1
answer

Configure webdriver Firefox in Selenium

I'm using selenium (Python) to fetch some data from a website, at some point I access a link that downloads a file. How do I configure webdriver (Firefox) so that it automatically accepts the download, without which I need to click download?   ...
asked by 05.04.2017 / 17:14
0
answers

How to solve this syntax error in python? [closed]

I am making code to ping MS from several sites for connection testing and in one of the lines (below) it is giving syntax error, I have already tried to fix it and it was flawed. if myStats.maxTime destIP<.     
asked by 20.03.2017 / 20:34
0
answers

Python 2.7.9 - Tkinter Module 01

Hello,youarefollowingthesourcecodeofmyprogram,thequestionis:    HowdoIaddfunctionsandpause/connectwiththesubmenusaftertheuserclick,beingexecutedinthemainwindow,withoutneedinganexternalwindow?Forexample:    Iwanttoaddafunctionthat,aftertheusercl...
asked by 21.03.2017 / 04:22
0
answers

Test API Python

How can I test a url of an api using nosetest For example: I have the following api: /api/user How to ensure that calls in this url are being called? make a GET ... a POST passing the parameters in the body I tri...
asked by 20.03.2017 / 19:35
1
answer

String Equivalent Using Variables - Python 3.x

What would be the equivalent of the string: values = """ { "exchange_code": "PLNX", "exchange_market": "BTC/USDT" } """ What the result is:   \ n "\ n" \ n "\ n" \ n "\ n" \ n " Entering "PLNX" and "BTC / USDT" as variables,...
asked by 23.03.2017 / 21:40
0
answers

Configuration of fixture mocker in pytest-mock

I'd like to do tests using pytest-mock. I have already run the pip install pytest-mock command and installed it, but when I run the test below, pytest can not find the fixture. What can it be? import pytest def test_unix_fs(mocker): mo...
asked by 23.03.2017 / 03:37
0
answers

Table of distances google maps api and python

Hello, I'm using the Maps API to check the distance between two points, so I have two local.csv files and .csv coordinates. The final goal is to know the distance of the locations for each of the coordinates. If there are 3 locations an...
asked by 28.04.2017 / 17:55