except socket.error, (errno, msg):
if errno == 1:
# Operation not permitted
msg = msg + (
" - Note that ICMP messages can only be sent from processes"
" running...
I need help solving a power problem in an alternate way.
The purpose is to show the result of the potentiation and the number of characters (or numbers) that appear in the result. The code I'll put next I got put to work through some conversi...
I wanted to know if there is a possibility to change the encoding of an element returned by the to_datetime function of pandas. I need to change to ISO-8859-1 encoding to compare the date with others that are stored in an external file (T...
I have a class in Python that has a function that returns a triple (3 information together) and I wanted to create 4 different objects because I need 4 different triples. The point is that the values are accumulating and the 4th object has the i...
I'm trying to install the cartopy library. But I can not. Can someone help me?
I tried for pypi and returned the following error:
C:\Users\Rafa>pip install cartopy
Collecting cartopy
Using cached Cartopy-0.15.1.tar.gz
Exception:
Tracebac...
I'd like to create a variable with the first value passed as a parameter in a function, but every time a recursive call is made the variable receives the value of the new passed parameter. For example:
def fatorial(n)
print(n)
if n <...
I would like to understand why in the code below the tikinter (I think that's the problem) can not do something simple like
'c = c + 1'
?
Code:
from tkinter import *
import pygame.mixer
sounds = pygame.mixer
sounds.init()
c = 0
e...
I am having problems with reportlab.
Python 3 / Django application
I have a Pessoa model that contains a data de nascimento field that is of type DateTimeField .
I am trying to write the date of birth in the PDF but the...
I'm starting to learn scrapy and created the following function:
import scrapy
class ModelSpider(scrapy.Spider):
name = "model"
start_urls = [
'http://www.icarros.com/'
]
def parse(self, response):
with open('brands....
I'm trying to set up a progress bar to tell the percentage of running my Python script with varying different functions, but without success how would I create such a progress bar?