Questions tagged as 'python'

2
answers

What is the meaning of the asterisk (*) operator?

In C this operator is used in variables of type pointers, but in Python I do not know which way, and what the reason to use, so what is the meaning of the operator (*) in the Python language?     
asked by 02.11.2016 / 23:46
3
answers

How to do a search ignoring accentuation in Python?

Suppose I have a list of words in Python (if necessary, already sorted according to the collation rules): palavras = [ u"acentuacao", u"divagacão", u"programaçao", u"taxação", ] Notice that I have not used cedilla ( ç...
asked by 08.01.2014 / 21:01
4
answers

How to programmatically respond to a command on the Linux terminal?

I have a Python script that runs a particular command on the system. This command waits for a password to be entered immediately, the only way to do this is to pass the password via the argument. I wanted to know if there is any way to execut...
asked by 28.01.2014 / 18:00
1
answer

What is the difference between break, pass and continue in Python?

The Python documentation in Portuguese is a work in progress, and fairly confusing how can you see . I have difficulties in English and I find this site that I can not read. So, how can I use break , pass and continue...
asked by 13.12.2013 / 17:06
2
answers

What is the function of the semicolon in Python?

I found some codes that had variables inside classes, ending in semicolons. I did not understand why, and also did not find anything on the internet about it. class exemplo(): self.variavel_teste = 0;     
asked by 13.09.2018 / 16:13
1
answer

How to use and what is 'super' in Python classes?

How to use and what is the super in% with classes Python ?     
asked by 25.06.2014 / 17:16
3
answers

In a list, what is the difference between append and extend?

In list in Python, there are methods append and extend . What's the difference between them and when should I use each?     
asked by 09.12.2016 / 20:38
1
answer

Demonstrating a slowloris attack on apache server using Python

I have the network dump (file in PCAP format captured with tcpdump) from a "conversation" between the attacked server (Apache web server: 192.168.1.2) and the malicious clients: Theattackwasalaboratorysimulationofdenialofservicewithslowloris.Ik...
asked by 08.05.2017 / 13:55
3
answers

Assigning value to a dictionary variable that is optional

I have a function where one of the parameters is a dictionary, but it is optional. I need to assign a value in this dictionary, but take into account the case where this parameter is not filled in. The following solution uses two lines for...
asked by 17.12.2013 / 18:45
3
answers

How to create a "* .exe" executable in python?

I need to turn ".py" files into ".exe" executables to run on any Windows desktop. Currently use 3.3     
asked by 24.04.2014 / 04:27