Questions tagged as 'python'

2
answers

Socket Python keeps open even using Close

I have an App in Python that uses Socket, this App runs on Kodi from XBMC, and when I close the App I would like to close the Socket and knock down the clients, the problem is that even I using shutdown(socket.SHUT_RDWR) e close()...
asked by 19.09.2016 / 05:01
1
answer

Is it correct to implement unit testing on the model in the context of the Python language? [closed]

In some languages it is not suitable. I wonder if python is different. Thanks.     
asked by 18.05.2016 / 13:27
1
answer

Conversion of response into lists

I have a small problem in my algorithm, I have to receive an "institution name" any user entered and convert it into a list for future use in other conditions, but this is by converting all the letters of the name to the string and putting it on...
asked by 21.05.2016 / 08:47
1
answer

Python import error modules

I'm having trouble importing the modules into my project. I was creating some tests and I can not import the main from my project to test an end point, from my test file teste_ex.py . Here is the structure of the project: backend_api/...
asked by 02.10.2016 / 01:47
1
answer

"must be str, not list" error when writing to file

I have a job to do but I can not find the error. This excerpt from the program needs to add words to a text file cumulatively. That is, every time you go through the loop you will add numbers and words in the text file without deleting what is a...
asked by 08.03.2016 / 23:04
1
answer

Dictionaries receiving list with values

I have a little problem with my code, it receives "institutions" (names that the user wants in the input) within a dictionary, this input is passing the dictionary as a list, and then I use the list to make a "donation "until then it is quiet th...
asked by 22.05.2016 / 23:16
2
answers

Add elements to a list within a list comprehension

I have following code: myList = [1,2,3,4,5] result = [] test = [result.append(i) for i in myList] Whose output of test is:    [None, None, None, None, None] I would like to know why, since for example: test = [print(i) for i...
asked by 25.05.2016 / 19:51
1
answer

Problems with parameter restrict_xpaths in a crawler

I have no Python experience but I decided to try doing anything with Scrapy for testing. So I'm trying to collect the existing articles on a given page, namely a DIV element with a devBody ID. In this sense, my goal is to get the title of t...
asked by 10.03.2016 / 20:15
1
answer

FM simulation in Python

I studied the third semester of electrical engineering, my teacher commented that it is possible to simulate signal modulations programmatically, I had a brief introduction to the programming logic in the course, but I can not imagine how for ex...
asked by 20.04.2016 / 16:47
2
answers

Unknown command: 'syncdb' Visual Studio 2013

I'm having a hard time developing a system in Django. When I try to sync the database, this error appears: Python interactive window. Type $help for a list of commands. Executing manage.py syncdb Unknown command: 'syncdb' Type 'manage.py help'...
asked by 13.12.2015 / 20:28