Questions tagged as 'python'

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
1
answer

How to get return of the amount of a word existing inside a .txt file? [duplicate]

I'm trying to get the number of low-level words (swear words) back in a text, using as base a different .txt file containing the words (profanity). The code I made only returns 1 (one) occurrence, and there are 3 (three). What could I do to im...
asked by 23.05.2018 / 00:12
0
answers

Connect MS SQL Azure with Python (RaspberryPi)

I'm having difficulty connecting to SQL in Raspberry Pi, using Python. I made this class: import pyodbc class MaximoNivel(object): def __init__(self, Ponto): self.Ponto = Ponto def Retorna(self): server = 'tcp:ser...
asked by 15.05.2018 / 18:59
3
answers

How to create a "* .exe" executable in python?

I need to turn ".py" files into ".exe" executables to run on any Windows desktop. Currently use 3.3     
asked by 24.04.2014 / 04:27
1
answer

Matrix - Python

I'm doing a college job that requires me to play the Space Invaders game. I was able to make the matrix of the game and now I need to put the ships inside it, for now it is like this: Ineedtoprinttheshipssotheylooklikethis:VVVVVVVVNote:Iassign'...
asked by 18.05.2018 / 23:25
0
answers

RuntimeWarning Error

I'm trying to run an array and the following error appears: RuntimeWarning: invalid value encountered in double_scalars. What can cause it? def geomBarras(nx, ny, nz, fx, fy, fz): #determina tamanho das barras e cossenos diretores _L = np....
asked by 12.05.2018 / 18:46
1
answer

Meta Class vs. Traditional Descriptor

I've been watching the videos ( example ) by Luciano Ramalho on descriptors with < in> metaclass . I wanted to know what the advantage of this model is over the more traditional implementation of descriptors as this example in the docum...
asked by 12.05.2018 / 17:14
1
answer

How to do operations between arrays in python

Hello, I'm learning python, I saw the basics and I'm in a problem where I need to do operations between arrays. I have, for example, two arrays of equal size D. For each index I in the array, I want to make the difference between the two i-th el...
asked by 11.05.2018 / 00:49
1
answer

How to reuse class values?

I have three classes, the third one depends on the values of the other two (depends on E of class Material and A , Ix , Iu and Iz of class Geometria . I know I need to fix the 3rd class, but I do not...
asked by 10.05.2018 / 03:01
0
answers

Python, downloading file on a certain day and time

I want to structure a Python program that downloads files (manga) from a particular site once a week. I'm training, I took the web scraping course, but I'm lost on how to make these requests. I took as an example, the code of this page import...
asked by 10.05.2018 / 00:42