Questions tagged as 'python-3.x'

1
answer

Erase certain rows from a .csv python [duplicate]

What would be the easiest way to just delete certain lines from the .csv file within several more? In the .csv below I would like only the lines of the Client (C) Cleiton and their movies (F) which in this case would be City of God and...
asked by 12.08.2017 / 06:29
1
answer

Line break in a .txt file

How to break the line when passing my data to a .txt file? The code I'm using to open, write, and close .txt are these: arquivo = open("arquivo.txt", "a", newline="") arquivo.write("%s;" % nome_critico) arquivo.close() What I'm wanting i...
asked by 03.08.2017 / 02:49
1
answer

Python 3 - How to extract message from an email [pending]

I have this code to extract messages from an email, but the output shows the message and some encrypted information. I need help getting the message. In another version of the code, I tried the imaplib library but I was unsuccessful because...
asked by 03.08.2017 / 18:08
0
answers

Customize .read () and .write () in Python

I'm starting to learn Python and I came up with a question using with to open files, can I pass arguments to arquivo.read() methods to read a line and jump to the bottom line when a TAB or spaces are found? For writing I believe...
asked by 27.07.2017 / 18:20
2
answers

File for dictionary

I'm trying to transform a file into a dictionary but it's giving the following error:    Traceback (most recent call last): File   "C: \ Users \ taynan \ AppData \ Local \ Programs \ Python \ Python36-32 \ Project   CRUD \ Interface.py ", lin...
asked by 01.08.2017 / 19:52
1
answer

How to leave the focus on the ttk.Treeview screen, freezing the previous screens?

I made an application in Python 3.6 that calls another python script to mount a ttk.Treeview screen with the database information and this presented data can be manipulated (change and delete). It turns out that I can not leave this ttk.Treev...
asked by 24.07.2017 / 16:02
1
answer

Query in public database

I need to query in an online database, and transform the returned data into a data frame. I used an existing example on the database website, but I have no idea how to turn it into a database. The example looks like this sample: import u...
asked by 31.07.2017 / 15:24
1
answer

Python 3: Attribute Types

I'm new to python. As you all know, I do not have to speak the type when declaring a variable, and that's interesting, but when I create a function, I can not restrict attribute types, so by doing this: def x(a, b): return a + b I can n...
asked by 15.07.2017 / 00:45
1
answer

I want my variable to always be whole

People need to get out of a drama in which I can not finish my logic without getting stuck in condition in condition, the code is part of a game of the old one that I am perfecting, my condition in the code below says that the value of the input...
asked by 05.08.2017 / 02:09
1
answer

Smart Card reading certificate a3 with python

Is it possible, and how can I collect a3 smart card information to log in and authenticate? Is there a library
asked by 12.07.2017 / 19:42