Questions tagged as 'python'

1
answer

Create a match query in 2 tables with elasticsearch 2.3

As I can make a query between 2 tables, I have the following tables Company: - id - name - domain - timestamp Target - id - name - domain - company - website - company_id - timestamp User - id - firstName - lastName - email - company_id -tim...
asked by 16.11.2016 / 05:35
1
answer

Function open () and method os.open () and derivatives for files

When creating a file we have two options: use the function open () or use the module method os, accessing the con os.open (). Then we have its derivatives, such as write, close, read; and the same with the module os; os.write, os.read ... Wha...
asked by 23.12.2016 / 02:58
1
answer

Modify the value of a variable

I'm wanting to make a game of Stone, Paper or Scissors in Python, nothing complicated. The player starts with 2 points and depending on whether he wins or loses adds or subtracts value. The problem is that it is not saved in the variable that I...
asked by 27.10.2016 / 02:25
1
answer

Using WSGI with python 3.5

Good afternoon I need help to get an application running with django 1.8 and python 3.5 on an ubuntu server (Edit :) They are installed libapache2-mod-wsgi-py3 and enabled the a2enmod wsgi The code is located at: /var/www/html/ri...
asked by 16.01.2017 / 21:13
2
answers

Install Scrapy on Mac OS X error SSL pip

Good, I am currently trying to install Scrapy on my MacOS but they are all problems, the first thing I enter in terminal is: pip install scrapy And he returns me: You are using pip version 7.0.1, however version 9.0.1 is available. You sho...
asked by 20.11.2016 / 14:37
1
answer

How can you avoid generating line breaks while using print in python3.4?

I have the following function def reproducir(texto): pygame.mixer.music.load(TECLADO) for letra in str(texto): pygame.mixer.music.play() print(letra, end="") time.sleep(0.05) sys.stdout.flush() pygame.m...
asked by 04.10.2016 / 20:16
1
answer

Error method post Requests in python

I'm doing a script that makes me a POST method. I follow the library documentation requests . I have to make a login; when I use the method GET no error arises. It consists of several tags with enable ( value=1 ) and...
asked by 05.10.2016 / 15:58
1
answer

Django get info on the same page without showing the pk in the url

I hope you can help me, I am trying to see information from the database but without moving the url. When I access the list I get, for example, a list of books and when I click on the details of the book, I enter it in detail, however when I...
asked by 17.09.2016 / 00:41
2
answers

can not import name commit_on_success, Mockups in django 1.9

I installed Mockups in django 1.9, initially I sent the error: ImportError for import_module and I solved it with: link now I get another import error: File "/home/alejandro/django190/local/lib/python2.7/site-packages/mockups/management/comm...
asked by 31.08.2016 / 04:57
1
answer

Install pymdeco in django

How can I install pymdeco in django, django I have it installed in a virtual environment, install pymdeco in my machine via pip but when I try to install pymdeco with pip in the virtual environment I can not use pymdeco. How to install pymdec...
asked by 21.08.2016 / 00:25