Tox, pytest and pyperclip - System doesn't find clipboard

2016-06-19 Thread Alexandre Paloschi Horta
Hi everyone. I'm having the following problem on an app I'm developing. I'm writing a software that uses the Pyperclip module. I'm using pytest for the tests. Everything worked well so far, as long as I run the tests via pytest. The thing is, I want to use Tox, and now things didn't work so wel

Re: variable argument unpacking

2016-06-01 Thread Alexandre Paloschi Horta
The way you defined the function: def a(a = 1, b = 2, c = 3, *d, **e): print(a, b, c) print(d) print(e) a, b and c are positional arguments. d will be filled with the excess arguments and e will receive a dictionary, if supplied. One thing is the function definition, ano

Timeout to readline()/readlines()

2007-03-19 Thread Horta
Hi folks, Sometimes, when I do an os.popen*(), the process executed by the command hangs, and the script stops forever on the readline()/ readlines() calls. I found that I can use select, but I'm thinking... if, after a sellect() call returns, the stdout (for example) has more than one line

Re: A little more advanced for loop

2007-02-09 Thread Horta
On Feb 9, 9:00 am, Stephan Diehl <[EMAIL PROTECTED]> wrote: > Horta wrote: > > Hi folks, > > > Suppose I have to loop over 3 lists being the same size at the same > > time and order. How can I do that without using the range() function > > or whatever

A little more advanced for loop

2007-02-09 Thread Horta
Hi folks, Suppose I have to loop over 3 lists being the same size at the same time and order. How can I do that without using the range() function or whatever indexing? Example using range: a = ['aaa', ''] b = ['bb', ''] c = ['c', ''] for i in range(len(a)): # using a[i],