Questions tagged as 'python'

1
answer

Problem with swapcaser in python

The program should convert a letter into schema A-> a or a-> A and work normally except that at the end of the string a None appears. Anyone know how I can strip it? def swap_case(s): for x in s: if x.isupper()==True: print(x.lower...
asked by 29.01.2018 / 12:49
1
answer

Python with Windows Form or GUI

Hello, I am a beginner in Python 2.7 and am wondering how I apply graphical interface in applications developed with Python, just as html interfaces to php and visual studio is used to make windows form in C #, but python how does this work?    ...
asked by 06.08.2014 / 00:42
2
answers

How to solve these libpng errors in pygame?

These errors are shown when I close the game: libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: cHRM chunk does not match sRGB These errors happen because I'm using this: pygame.display.set_icon(pygame.image.loa...
asked by 04.11.2017 / 13:36
2
answers

How do I use the same argument / parameter in two different functions?

Example: def seno1(x = int(input("Entre com x: ")),n=int(input("Entre com n: "))): def cos1(x,n): How do I take advantage of the value entered by the user of x and n in this function too? Thank you     
asked by 28.05.2017 / 17:33
2
answers

Shell of Python and Django

I know that to open the Python interactive shell, we simply run it on the terminal of the operating system: python But with Django installed, you can also open the shell using the command: python manage.py shell Is there any difference...
asked by 25.05.2017 / 16:30
2
answers

Split a worksheet into several worksheets

I have a spreadsheet with 5000 rows that needs to be split into spreadsheets with 790 rows at the most. How can I do this ??     
asked by 26.05.2017 / 04:20
1
answer

Latex and Python integration

I need to generate and save a PDF file with some data I dealt with in a script I made to generate a report, but I do not know how to do it. Does this data need to go through a .tex file before generating the PDF? If yes, how can I work with v...
asked by 27.06.2017 / 22:04
3
answers

How to put punctuation with the last word on the left?

It may seem like a silly question, but I did not really find an answer in my readings. I created a program whose purpose is to calculate my Coefficient of Income and the percentage of the course completed in college, whose code follows below:...
asked by 04.01.2019 / 23:43
2
answers

I need help in a python crawler

from scrapy.spiders import BaseSpider from scrapy.selector import HtmlXPathSelector from crawler.items import crawlerlistItem class MySpider(BaseSpider): name = "epoca" allowed_domains = ["epocacosmeticos.com.br"] start_urls = ["http...
asked by 16.02.2017 / 00:32
2
answers

How to remove accent in Python? [duplicate]

In R would make this in this way iconv('Arapeí', to="ASCII//TRANSLIT") , so is there any simple way to do this in Python?     
asked by 11.12.2018 / 19:09