On Sunday, March 2, 2014 4:43:48 PM UTC+2, geni...@gmail.com wrote:
> I agree with you and really appreciate your experience. But what I was
> looking for is clues. Thank you anyway
#not tested
for i in range(n):
for j in range(n*2):
if i in (0, n - 1) or j in (0, n*2 - 1):
print('o',
On Apr 10, 4:28 am, candide wrote:
> Python is very good at introspection, so I was wondering if Python (2.7)
> provides any feature to retrieve the list of its keywords (and, as,
> assert, break, ...).
>>> import keyword
>>> keyword.kwlist
['and', 'as', 'assert', 'break', 'class', 'continue', 'd
> > def invert(p):
> > inverse = [None] * len(p)
> > for (i, j) in enumerate(p):
> > inverse[j] = i
> > return inverse
>
> Elegant. This seems like the best solution, although it isn't as much
> fun to write as a "one-liner". Thanks
>>> invert([1, 2, 3, 1])
[None, 3, 1, 2] #bl
On Jan 2, 3:18 pm, "Octavian Rasnita" wrote:
> Hi,
>
> If I want to create a dictionary from a list, is there a better way than the
> long line below?
>
> l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b']
>
> d = dict(zip([l[x] for x in range(len(l)) if x %2 == 0], [l[x] for x in
> range(len(l)) if x %2 ==
On Sep 20, 6:03 pm, de...@web.de (Diez B. Roggisch) wrote:
> Glazner writes:
> > Hi,
>
> > I'm will be writing a distributed program with parallel python and i
> > would like to if there are any good monitoring utilities for python.
> > I would like each remote
ut it seems a bit
outdated.
any tips will be great!
Many Thanks,
Yoav Glazner
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 12, 5:10 am, narke wrote:
> My simple tool writing in python get bigger and bigger and I think I'd
> better split my code into several files. But, unlike what in some other
> languages, there is no way to compile these several files into a single
> executable. Before I splitting my simple
On Sep 6, 11:08 am, Bruno Desthuilliers wrote:
> Jason a écrit :
>
> > On Sep 5, 3:53 pm, Peter Otten <__pete...@web.de> wrote:
> > m = gio.File(".").monitor_directory()
> > C = type(m)
>
> > 'C' will not necessarily be 'gio.FileMonitor' — I think the internals
> > of the GIO methods might
On Mar 24, 5:29 pm, kj wrote:
> Is there a sequence-oriented equivalent to the sum built-in? E.g.:
>
> seq_sum(((1, 2), (5, 6))) --> (1, 2) + (5, 6) --> (1, 2, 5, 6)
>
> ?
>
> (By "sequence" I'm referring primarily to lists and tuples, and
> excluding strings, since for these there is ''.join()
his system with python.
I already use win32all and read about Pareller Python and Pyro.
a requirement is that messages can be sent to the remote worker.
If anyone can share experience I'll love to hear
Many Thanks,
Yoav Glazner
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 13, 8:45 pm, News123 wrote:
> Hi,
>
> I'd like to make sure, that a certain python program will only be run
> once per host. (linux/windows)
>
> so if the program is started a second time it should just terminate and
> let the other one run.
>
> This does not have to be the fastest solution
Hi all,
I hope someone can help me with this issue
I see that i can't start a thread Pool from another thread, why?
running python 2.6.4 windowsXP
>>> import multiprocessing.dummy as threads
>>> def makePool():
threads.Pool(3)
>>> makePool()
>>> import thread
>>> thread.start_new(makePool
On Dec 15 2009, 10:56 am, makobu wrote:
> I have a function that makes two subprocess.Popen() calls on a file.
>
> I have 8 cores. I need 8 instances of that function running in
> parallel at any given time till all the files are worked on.
> Can the multiprocessing module do this? If so, whats th
On Nov 30, 7:41 pm, Grant Edwards wrote:
> On 2009-11-30, a b wrote:
>
> > I have a pain in the a** problem with pyserial- it works 90%
> > of time but on the 10% of time it thorows and termios.error
> > exception with the value (5, 'Input/output error') and i
> > cannot get rid of it :(
>
> Soun
14 matches
Mail list logo