Questions tagged as 'python'

1
answer

How to execute a loop while waiting for input?

I want to know if you can execute a loopback while waiting for an input () input, and immediately after receiving the input the for loop or while starts processing she immediately. something like: imputs = [] parar = false def faca_algo...
asked by 31.12.2016 / 13:42
1
answer

Python integration with C #

Is there any way to integrate C # and Python 3? I need to create a graphical application quickly and practically. Currently, I have the Python scripts running 100%, now what I need is to take the inputs from the terminal and play in a visu...
asked by 12.05.2017 / 22:18
1
answer

How do I loop endlessly without bursting memory?

I'm trying to make a program that makes requests on a DDE server, so I need to collect the data every 0.1 sec. But at each iteration of the program the computer's memory increases and in the end to the script. I'm trying like this: def requ...
asked by 23.02.2017 / 20:26
1
answer

divide a string of n into n chars, split () of n n

I have the following text: "ola sou o Allan" I would like to have this text divided by eg 2 in 2 chars. How can I do this?     
asked by 20.07.2016 / 16:33
1
answer

What is the purpose of string.maketrans?

I was taking a look at some Python challenges and found one that involved rotating the characters of a string. Type 'a' turns 'c', 'b' turns 'd', and at the end 'y' turns 'a' and 'z' turns 'b'. As I solved the problem, I saw an indication tha...
asked by 27.02.2015 / 14:47
1
answer

How to make a POST request in Python?

I would like to know how to make a request POST at this URL , for later get here on this page . Where do I have to spend the year on the div of the unsigned fiscal body.     
asked by 01.04.2015 / 15:33
1
answer

Is there a random text generator that produces correct sentences?

Is there any program, preferably in python, capable of generating random but syntactically correct text? The language I'm looking for is English.     
asked by 20.10.2015 / 19:50
1
answer

How to create a symbolic link for a Python code in Linux?

I want to run a simple Python code that I created from anywhere on my system. I know that to do this with a shell script just run the command ln -s /home/user/script.sh/usb/ bin / script , however of knowing how to do the same with a "code...
asked by 03.11.2015 / 19:25
2
answers

Input or raw_input?

Can anyone tell me the difference between input and raw_input in Python and what is the proper way to use both?     
asked by 06.04.2016 / 18:14
1
answer

Python 3.4 and Python 2.7: How to remove the preinstalled version of MacBook?

Currently I'm migrating from a Mac to a Windows and today I discovered, when I installed all the features I needed, that I already had a Python 2.X in it and I need to run Python 3.4.3. > How can I remove the old version that is harming me?  ...
asked by 15.07.2015 / 23:05