Questions tagged as 'python-3.x'

0
answers

Structure a program in Python

So, I'm creating a "road map" of creating projects in Python to consolidate the way I and my co-workers write our codes. I developed a structure of how each project should be organized, and how we should write our variables. That kind of l...
asked by 04.05.2018 / 15:18
1
answer

Problem inserting rounds in stone, paper and scissors game

Good morning, I am not able to implement a rounding system in this game, the rounds should change when the player's Mao empties. , what happens now is that when the player and player list 2 are emptied the game continues to run with it empty, bu...
asked by 04.05.2018 / 16:59
1
answer

Get data from a specific column in CSV

I have a question in an exercise. I have a table where I need to get results from only one column. The data is as follows: ['2017-01-01 00:27:45', '2017-01-01 00:31:13', '208', 'Damen Ave & Chicago Ave ',' Damen Ave & Division St ',' Subscrib...
asked by 04.05.2018 / 20:45
1
answer

Parse Xpath from Int

I have a scrapy running the for to bring the day and the link to something. Ex: t_day = div.xpath('.//a/text()').extract_first() a_day = div.xpath('.//a/@href').extract_first() day = int(t_day) if day > last_day: print(t_day, a_day)...
asked by 04.05.2018 / 20:57
0
answers

IDLE software locks with encoding

I have developed a program that, for your use, automatically creates another program on the user's Desktop. In order for the second to run in CMD or IDLE directly, it is necessary to convert the cp1252 encoding to utf-8. For this I followed a St...
asked by 27.04.2018 / 02:56
1
answer

Rename Bulk Files from a Notepad List

I need to rename many (many !!!) photos inside some folders, so I decided to use the os.rename method inside a loop from an auxiliary list in the notepad that contains in each line the old name of the photo, and a semicolon separating for whic...
asked by 27.04.2018 / 17:36
0
answers

Using the Geopy library

I have the following question, I want to set up a routine to perform iterations within a dataframe (pandas) to extract longitude and latitude data, after supplying the address using the 'geopy' library. The routine I created was: import tim...
asked by 25.04.2018 / 19:36
0
answers

If and Else in Python Commands

How do I check if a command was spelled correctly or not? For example, if the user enters a command that does not exist, it will display a warning message, otherwise it will execute the command. I built the code partially and tried with if...
asked by 24.04.2018 / 14:04
0
answers

Error using Cx_freeze to create an msi installer

I'm trying to create an installer for a java application that will use matplotlib to display some images, but after creating the installer, and trying to run the .exe I get the error in the image.
asked by 23.04.2018 / 21:24
1
answer

How to make a function that takes data and releases in bot chat

Good afternoon I have a bot for a site where I go and wanted to develop a function where it sends a private message in the system. In my head it seems simple but I can not execute (I know the code is wrong but that's how I imagined it). I'm a...
asked by 22.04.2018 / 18:58