Questions tagged as 'python'

1
answer

How to create variable names while executing a code?

I need a little help. While executing a code I get a list with x entries (the size of the list varies according to the input). Each entry in that list is a row array with a certain number of elements, not necessarily the same as each other....
asked by 18.08.2017 / 02:46
0
answers

Generic menu using Python, Django and tree structure

I am creating a generic menu where a parent can have 1 child and so on (tree structure) and I had a question about how to render parents in a menu and when hovering over the parent open their children laterally CurrentlyIonlyhavethiscodethat...
asked by 17.08.2017 / 17:45
0
answers

How to use f2py using more than one .f90 file and using dassl.f?

I am a beginner in F2PY and am trying to use it in a very complex Fortran program that has several subroutines in separate files and one of them is dassl.f. I believe my problem is with her. Is there any limitation on its use with F2PY? (Use lin...
asked by 09.09.2017 / 15:27
1
answer

Problem to execute .feature file in PyCharm

I'm having trouble in my environment to run .feature files. I'm creating a Behave + Selenium and every time I run my file .feature it gives the following error: C:\Python\Python36-32\python.exe "C:\Program Files\JetBrains\PyCharm...
asked by 04.09.2017 / 23:16
0
answers

Is there a single way to use images in pygame?

I read in the documentation that there is the image.load method to read images, however it returns an object of type Surface which is not always the most appropriate, so I was wondering if there is a way to return an object of type...
asked by 15.10.2017 / 17:41
1
answer

Python function in AWS Lambda

I need to run the following function below on AWS Lambda : def subset_sum(numbers, target, partial=[]): s = sum(partial) # check if the partial sum is equals to target if s == target: print("sum(%s)=%s" % (partial, target)) if s >...
asked by 15.10.2017 / 05:58
0
answers

PyQt5 - MainWindow opens and closes soon

main.py (dialog) if __name__ == '__main__': try: import sys from user_interface.ui.login import Ui_Dialog from PyQt5 import QtCore, QtGui, QtWidgets app = QtWidgets.QApplication(sys.argv) login_wi...
asked by 08.08.2017 / 14:38
2
answers

Django Rest compare user id 'sector' id with publication 'sector' id

Well, I'm messing with an API and I want it to return the content only when the user sector is the same as the publishing sector. Publications API: The user has a sector field also equal to this, and I am already getting the id of th...
asked by 11.09.2017 / 02:57
1
answer

twitter data with python

Hello. I want to mine twitter data using python. I started by making an initial example, but it is giving error. I imported twitter_python into the python 3.6 lib folder through the setupe.py install command at the windows prompt. The code:...
asked by 27.08.2017 / 20:01
1
answer

Play video stored on the web python [closed]

Imagine that I have video in a directory of a website and not in a tag, example: www.site.com/video.mp4, how can I play this video using python + tkinter?     
asked by 25.07.2017 / 15:56