Questions tagged as 'python'

1
answer

What can happen to my project if I remove the virtual environment configured for it?

Let's say I created a virtual environment through virtualenvwrapper $ mkvirtualenv venv . I create my project, make the necessary settings, start working on the project and one day I remove the virtual environment $ rmvirtualenv venv...
asked by 19.09.2015 / 17:53
0
answers

RFID-RD522 with Python [closed]

Good morning guys !! I'm trying to connect a RFID module with PYHTON in Raspberry B I followed the following tutorials: link link It seems like everything is ok, but the time I put the system to run, it just does not work...
asked by 16.06.2016 / 14:44
1
answer

Which language has better performance for multithread webcrawler using parallelism [closed]

I'm going to start a project where one of the stages will fetch certain information from other companies' websites. Given that webcrawler will go through x sites, and each site will visit several pages at least one once a day,...
asked by 09.05.2015 / 16:43
1
answer

Problems with Psycopg2 on MAC

I'm catching up with Python + Postgre and Psycopg2. I installed Python 3.4 on my MAC, then Postgre, and then followed the following steps: export PATH=/Library/PostgreSQL/9.4/bin:$PATH pip install psycopg2 He installed Psycopg 2, but whe...
asked by 04.07.2015 / 16:42
2
answers

TypeError: 'float' object has no attribute 'getitem'

First, as soon as the mouse is clicked, it saves itself in the bullets_array list the angle of the shot (which is the same angle as the player). Second, speed is given to the shot through the 'cos' and 'sin' and then its movement is limited to a...
asked by 16.02.2015 / 17:03
3
answers

Delete part of text with Python

How do I delete part of a text in Python? I have the following string """ texto textinho outro texto <div dir 'ltr'><div><div> bla bla .... """ I want to delete all HTML part. I'm using Python2.7  ...
asked by 08.08.2014 / 22:55
2
answers

Problems with columns in Python XLRD

I'm a beginner in Python and am trying to make a script to sum all the values of an excel column and write the sum value in the worksheet. I'm using the Python xlrd and xlwt packages. The code works fine for the first column, but from the second...
asked by 08.08.2014 / 22:24
0
answers

Philosophers' Dinner in Python [closed]

I wonder if anyone has already implemented the Philosopher's Dinner algorithm in python. I need to do it, however I only find examples with implementation using thread and I need to do it without using thread.     
asked by 29.03.2015 / 00:32
2
answers

How to use an iterator twice within an understanding?

Let's say I have a list: lista = [(1,1), (1,2), (1,3), (2,6), (2,4), (3,1), (3,2)] And I want to know the maximum and minimum values of the second element, grouped by the first. That is: { 1:(1,3), 2:(4,6), 3:(1,2) } I thought about us...
asked by 19.03.2015 / 21:05
2
answers

Python installed but Environment Variables does not contain the information

I installed Python 3.5 and in your installer comes with the option to automatically put it in the Environment Tables, but it did not work, how do I add it so it can compile?     
asked by 05.01.2016 / 04:15