Hi:
I want to Draw rectangle on Dc when gived a position. Can you teach me? Let
me view your code?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
's/].*$//'
yet the following Python code does nothing:
line = line.replace('^.*\[', '', 1)
line = line.replace('].*$', '')
Is there a decent description of string.replace() somewhere?
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
>Another approach is to use the split() function in "re" module.
Ah ha, thar's the disconnect. Thanks for all the pointers, my def is
now working. Still don't understand the logic behind this design though.
I mean why would any programming language have separate search or find
functions, one for
Shmuel (Seymour J.) Metz writes:
> In , on 03/12/2012
>at 11:27 AM, Albert van der Horst said:
>
>>You're confused.
>
> No, s/h/it is just an acephalic troll with delusions of adequacy.
Another way to put it is to say that Xah is a legend in his
own mind.
--
http://mail.python.or
http://mathcentral.uregina.ca/QQ/database/QQ.09.06/h/murtaza2.html
Another interesting avenue to is aim for highest possible accuracy.
Consider using math.fsum() to avoid rounding errors in the summation
of large numbers of nearly equal values.
Raymond
-
follow my python tips on
Thanks for all the feedback on the earlier post.
I've updated the recipe to use a cleaner API, simpler code,
more easily subclassable, and with optional optimizations
for better cache utilization and speed:
http://code.activestate.com/recipes/577684-bloom-filter/
Ra
On Jun 6, 10:47 am, geremy condra wrote:
> On Fri, Jun 3, 2011 at 1:17 PM, Raymond Hettinger wrote:
> > Thanks for all the feedback on the earlier post.
>
> > I've updated the recipe to use a cleaner API, simpler code,
> > more easily subclassable, and with optional
foo))
That works great and is very clear.
If you want to also preserve order, use an OrderedDict:
>>> list(OrderedDict.fromkeys('abracadabra'))
['a', 'b', 'r', 'c', 'd']
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
). For new keys, it is a little slower
because it calls the __missing__ method which returns zero.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
erged into Python source code?
It was rejected as a replacement for the existing list implementation.
There is some chance it will get accepted into the collections module
someday.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 17, 12:47 am, Xah Lee wrote:
> i hope you'll participate. Just post solution here. Thanks.
http://pastebin.com/7hU20NNL
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 17, 7:15 am, Thomas 'PointedEars' Lahn
wrote:
> Did you notice the excessive crosspost? Please do not feed the troll.
IMO, this was a legitimate cross post since it is for a multi-language
programming challenge and everyone can learn from comparing the
results.
Ray
utput of the program and
running it through emacs to see that the cursor gets moved exactly to
the location of the mismatched delimiter.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
udes str,int,list,tuple, etc in both Section 2 for builtin
functions and Section 5 for builtin types.
'nuff said,
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
with
older, unmaintained versions of Python.
When it comes to moving pow() to another module or changing the
signature for the __pow__ magic method, there's not much of a win to
be had, but it will affect tons of existing code (including examples
in printed books where pow() is commonly used in
00 pystones and your new shiny macbook
scores 84000, then you can expect your non-i/o bound single threaded
python apps to run about seven times faster on the new machine.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
I forgot to mention that PyStone is just a Python translation from C
of the venerable Dhrystone benchmark. See
http://en.wikipedia.org/wiki/Dhrystone
for a short write-up on the history, purposes, and limitations of the
benchmark.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
t the
length of each group, and emit the value whenever the count is more
than one:
>>> s = [1,2,3,3,4,4,5,6,7,7,7]
>>> [k for k, g in groupby(s) if len(list(g)) > 1]
[3, 4, 7]
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
cations of the last paragraph is that if 2.7 style cmp-
logic were reinstated in 3.3, not only would it clutter the API with
two-ways-to-do-it, it would also disadvantage make the common case
(using key-functions) run much more slowly. In other words, the
performance mavens will have shot themselves (and us) in the foot.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
from collections import Counter
from itertools import product
print('\n'.join('*'*(c//2000) for _,c in sorted(Counter(map(sum,
product(range(6), repeat=8))).items(
almost-normally-yours,
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
***
*
***
*
Re-posting (forgot to attach the output).
Besides the interesting output, other
interesting virtues include very low
memory usage and that the inner-loop
pipeline runs entirely in C
e the reload() function:
Help on built-in function reload in module __builtin__:
reload(...)
reload(module) -> module
Reload the module. The module must have been successfully
imported before.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
u all might
find it to be both interesting and educational.
For more details on how it works and how it relates to descriptors,
see http://mail.python.org/pipermail/python-ideas/2011-March/009657.html
Raymond
sample code
class MyDict(object):
def __init__(self, ma
(list(g))) for k, g in groupby(sorted('abracadabra'))]
[('a', 5), ('b', 2), ('c', 1), ('d', 1), ('r', 2)]
>>> [k for k, g in groupby(sorted('abracadabra')) if len(list(g)) > 1]
['a', 'b', 'r
t statements to
the while loop:
def play(self):
next = self.start
while True:
room = getattr(self, next)
print "--- Calling the method:", room, "---"
next = room()
print "--- That method retu
On Mar 29, 7:32 am, Neil Alt wrote:
> i mean made with python only, not just a small part of python.
BitTorrent was a huge success.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
If you develop banner.py with adequate tests, you will want to restart
> the test anyway, and you should not need to modify much thereafter.
This is excellent advice.
You're much better-off starting fresh each time.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
l#how-can-i-create-a-stand-alone-binary-from-a-python-script
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
T, he was right. I've seen large projects where
deepcopy and copy where not used even once.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
most downloaded as far as i can tell
At Pycon, I saw some impressive looking games written
during the PyWeek, Python Game Programming Challenge
http://www.pyweek.org/
I think they're fine examples of what Python is capable of.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
need
to make @property accessors that get and set the underlying attribute.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
[Ian Kelly]
> Which is O(n). If that is too verbose, you could also use a dictionary:
>
> def invert(p):
> return dict(map(reversed, enumerate(p)))
def inv(p):
return dict(zip(p, itertools.count()))
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
DE widows) much wider than 80
> characters. I'm using 140 for python these days. Seriously, who would
> want to limit him/herself to 80 characters in 2011?
I wonder how many people will shorten otherwise clear
variable names just to get their lines to fit in 80 characters?
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
y exist
and the whole operation becomes equivalent to an update().
You can see the same behavior with regular dictionaries:
>>> d = dict(a=1, b=2)
>>> d.__init__(b=4, c=5)
>>> d
{'a': 1, 'c': 5, 'b': 4}
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
d dict code internally calls __update()
instead of update() so that a subclass can override
update() without breaking the constructor
* eval(repr(obj)) should round-trip whereever possible
* containers should behave reasonable well even if someone
makes the container reference itself: a=[]; a
#x27; module for
> details:
>
> http://docs.python.org/library/threading.html
The docs for Python3.2 have a nice example for downloading multiple
webpages in parallel:
http://docs.python.org/py3k/library/concurrent.futures.html#threadpoolexecutor-example
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 8, 8:55 am, r wrote:
> I had a problem for which I've already found a "satisfactory"
> work-around, but I'd like to ask you if there is a better/nicer
> looking solution. Perhaps I'm missing something obvious.
>
> The code looks like this:
>
> stream-of-tokens = token-generator(stream-of-ch
t; from itertools import *
>>> list(chain([1,2,3], ErrorResult(), [4,5,6]))
[1, 2, 3, <__main__.ErrorResult object at 0x2250f70>, 4, 5, 6]
> Any idea for a working and elegant solution?
Hope these ideas have helped.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
) recipe in
http://docs.python.org/py3k/library/itertools.html#itertools-recipes
Raymond
twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
creator running
as a producer thread.
Writing your own test runner isn't difficult. 1) wait on the queue
for a new test case. 2) invoke test_case.run() with a TestResult
object to hold the result 3) accumulate or report the results 4)
repeat forever.
Raymond
twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
itertools for example).
I don't now how difficult the work is, but it would be nice to have a
way to save multiple scripts, have an interactive prompt, and get more
modules to work (random, collections, functools).
Thanks again for your work.
Raymond
twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
ults.copy()
result.update(d)
Another approach is to use something like ChainMap() which has been
added to Python 3.3.
http://docs.python.org/dev/library/collections.html#collections.ChainMap
result = ChainMap(d, multiple_defaults)
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
t
values.
Raymond
twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
dvantage of multiple-cores is to run
multiple pythons in separate processes.
Threading is really only an answer if you need to share data between
threads, if you only have limited scaling needs, and are I/O bound
rather than CPU bound
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 16, 1:24 pm, candide wrote:
> Consider the following code :
>
> # --
> def bool_equivalent(x):
> return True if x else False
It's faster to write:
def bool_equivalent(x):
return not not x
Raymond
--
http://mail.python.
uot;bar": 1}
> >>> base_dct = {"foo": 0, "bar": 1, "baz": 2}
> >>>
> >>> test_dct.items() <= base_dct.items()
> False
>
> In Python 3:
>
> >>> test_dct = {"foo": 0, "bar": 1}
> >>> base_dct = {"foo": 0, "bar": 1, "baz": 2}
> >>> test_dct.items() <= base_dct.items()
> True
>
> YMMV
That is because it is spelled differently in Python 2.7:
>>> test_dct = {"foo": 0, "bar": 1}
>>> base_dct = {"foo": 0, "bar": 1, "baz": 2}
>>> test_dct.viewitems() <= base_dct.viewitems()
True
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
Here's a handy utility function for you guys to play with:
http://code.activestate.com/recipes/577676/
Raymond
twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 25, 7:42 pm, Paul Rubin wrote:
> Raymond Hettinger writes:
> > Here's a handy utility function for you guys to play with:
> > http://code.activestate.com/recipes/577676/
>
> Cute, but why not use collections.defaultdict for the return dict?
> Untested:
My
e the lessons learned
will be helpful to your readers.
Raymond
twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
t; ['0A', '1B', '2C', '3D',...
You could unpack the 1-tuple the same way you would with a 2-tuple.
>>> result = [('0A',), ('1B',), ('2C',), ('3D',)]
>>> for elem, in result:
print elem
0A
1B
2C
3D
Raymond
http://twitter.com/raymondh
--
http://mail.python.org/mailman/listinfo/python-list
/howto/sorting.html
http://docs.python.org/dev/library/collections.html#collections.namedtuple
Raymond
python tips on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 27, 11:28 pm, Paul Rubin wrote:
> Raymond Hettinger writes:
> > A number of developers have been working on adding examples and useful
> > advice to the docs. To sharpen your skills, here are some pieces of
> > recommended reading:
>
> Thanks, those are n
I think it is time to give some visibility to some of the instructive
and very cool recipes in ActiveState's python cookbook.
My vote for the coolest recipe of all time is:
http://code.activestate.com/recipes/365013-linear-equations-solver-in-3-lines/
What are your favorites?
Ra
near equation to a*x+b (= 0 implied).
>
> Hmmm... so if we used quaternions, could we solve systems
> of linear equations in 3 variables?
Yes :-)
The implementation of a Quanternion class and the Quartic equation is
left as an exercise for the reader ;-)
Raymond
@raymondh
--
http://mai
, and most boring recipe ;-)
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
requires three lines of executing code and at least 6 lines of additional
> comment. Hopefully accompanied by an excuse of the developer.
If you found nothing educational, interesting, or amusing about the
three-line linear equation solver, then you're *really* going to hate
this one:
Here's a 22-line beauty for a classic and amazing algorithm:
http://bit.ly/bloom_filter
The wiki article on the algorithm is brief and well-written:
http://en.wikipedia.org/wiki/Bloom_filter
It turns out that people in the 1970's were pretty smart :-)
Raymond
---
follow my ot
ter was mentioned?
Yes! As a matter of fact there was:
http://www.slideshare.net/c.titus.brown/pycon-2011-talk-ngram-assembly-with-bloom-filters
Raymond
---
follow my other python tips and recipes on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
On May 4, 12:42 pm, Terry Reedy wrote:
> On 5/4/2011 2:17 PM, Raymond Hettinger wrote:
>
> > Here's a 22-line beauty for a classic and amazing algorithm:
> >http://bit.ly/bloom_filter
>
> > The wiki article on the algorithm is brief and well-written:
> >htt
On May 4, 12:27 pm, Paul Rubin wrote:
> Raymond Hettinger writes:
> > Here's a 22-line beauty for a classic and amazing algorithm:
> >http://bit.ly/bloom_filter
>
> The use of pickle to serialize the keys is a little bit suspicious if
> there might be a reason to d
10 false positives in 5 runs is good.
I've just posted an update with a spell checker using a large
dictionary. That should make it easy to validate against some real
world text samples.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
#x27;],
['fox', 'hare', 'turtle', 'kangaroo'],
['lazy', 'stupid', 'sleepy', 'confused'],
['dog', 'aardvark', 'sloth', 'wombat'],
)
amb(lambda x, y, z: x*x + y*y == z*z,
range(1, 11),
range(1, 11),
range(1, 11),
)
Raymond
follow my recipes and tips on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
eps/pep-0008/
for the official recommendation.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
lver", no?
FWIW, here's one of my favorite brute-force solvers:
http://code.activestate.com/recipes/576615-alphametics-solver/
Raymond
---
follow my recipes and tips on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
x27;,
> 'Portuguese': 'en_pt',
> 'Dutch' : 'en_nl',
> 'Japanese' : 'en_ja',
> }
>
> def translate(lang, text):
> kwds = { 'trtext' : text, 'lp' : langua
cpython/file/7254c03b7180/Lib/collections.py#l235
Note the template has both {typename} formatting for the first pass
and %r style formatting in the generated code.
Raymond
follow my tips and recipes on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
se:
key, val = next(iter(MyDict.items()))
The latter is nice because next() allows you to supply a default
argument in case the dictionary is emtpy:
key, val = next(iter(MyDict.items()), (None, None))
Raymond
-
follow my tips and recipes on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
Hans Georg Schaathun writes:
> ["Followup-To:" header set to comp.lang.python.]
> On 18 May 2011 09:16:26 -0700, Thomas A. Russ
>wrote:
> : Well, unless you have a tree with backpointers, you have to keep the
> : entire parent chain of nodes visited. Otherwise, you won't be able to
> : fi
Hans Georg Schaathun writes:
> ["Followup-To:" header set to comp.lang.python.]
> On Wed, 18 May 2011 20:20:01 +0200, Raymond Wiker
>wrote:
> : I don't think anybody mentioned *binary* trees. The context was
> : directory traversal, in which cas
Hans Georg Schaathun writes:
> ["Followup-To:" header set to comp.lang.python.]
> On Wed, 18 May 2011 21:09:15 +0200, Raymond Wiker
>wrote:
> : > In the sense that the tree itself is a stack, yes. But if we
> : > consider the tree (or one of its branches
There are many ways to write this function. The one I like shows-off
a general purpose dynamic programming technique while staying *very*
close to a common textbook definition of a fibonacci number:
@functools.lru_cache()
def fibo(n):
return 1 if n < 2 else fibo(n-1) + fibo(n-2)
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
r Python toolkit.
If any of the comp.lang.python readers want to review and comment on
my latest draft, please email me and I'll send it to you directly.
Cheers,
Raymond Hettinger
my email address is listed at
http://users.rcn.com/python/download/Descriptor.htm
--
http://mail.pytho
ld get you started on your grand unified, do-
everything-at-once vision with minimal deviation from the standard
library.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
uper-considered-super/
It would also be great if some of you would upvote it on HackerNews.
Raymond Hettinger
---
follow my python tips on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
> It would also be great if some of you would upvote it on HackerNews.
Here's a link to the super() how-to-guide and commentary: bit.ly/
iFm8g3
Raymod
--
http://mail.python.org/mailman/listinfo/python-list
27;s tweet (where shorter
is better).
Hope you enjoyed the post.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
David Beazley wrote a class decorator blog post that is worth reading:
http://dabeaz.blogspot.com/2011/05/class-decorators-might-also-be-super.html
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
deeper understanding of class decorators, mixins, and
inheritance. That makes the post worthwhile even if someone never
ends up using those particular coding technique.
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
constant might yield twin paradoxes and other
curiousities ;-)
Raymond
--
http://mail.python.org/mailman/listinfo/python-list
On May 29, 3:44 pm, Benjamin Peterson wrote:
> On behalf of the Python development team, I'm happy as a swallow to announce a
> release candidate for the fourth bugfix release for the Python 3.1
> series, Python
> 3.1.4.
The Pi release of Python :-)
Raymond
P.S. For the
goal is to serve as a reliable guide to using
super and how to design cooperative classes in a way that lets
subclasses compose and extent them.
Raymond Hettinger
follow my python tips on twitter: @raymondh
--
http://mail.python.org/mailman/listinfo/python-list
>> I have a function that I use to retrieve daily data from a
>> home-brew database. Its calling sequence is;
>>
>> def TempsOneDay( year, month, date ):
>>
>> After using it (and its friends) for a few years, I've come to
>> realize that there are times where it would be advantageous to
>> invok
>>def TempsOneDay(*dateComponents):
>>if len(dateComponents) == 3:
>>year, month, date = dateComponents
>>elif len(dateComponents) == 1 and isinstance(dateComponents[0],
>> datetime.date):
>>year, month, date = (dateComponents[0].year, dateComponents[0].month,
>> dateCompo
So after a long while I'm finally getting around to upgrading to 3.10 on
Windows from 3.9, and my first pip upgrade is causing issues with the
installation.
Problem seems to be that I run pip from a command prompt in the Scripts folder,
and it seems pip is trying to completely remove the Script
>> But, an easier and often
>> better option for concurrent data access is use a (relational)
>> database, then the appropriate transaction isolation levels
>> when reading and/or writing.
>>
>
> That would obviusly save some coding (but would introduce the need to
> code the interaction with the d
> Find 6-letter words that are hidden (embedded) within each row of letters.
> The letters are in the correct order.
>
> 1. JSOYOMFUBELR
> 2. SCDUARWDRLYE
> 3. DASNAGEFERTY
> 4. CLULOOTSCEHN
> 5. USENEARSEYNE
> The letters are in the correct order. S
> I wrote my previous message before reading this. Thank you for the test you
> ran -- it answers the question of performance. You show that re.finditer is
> 30x faster, so that certainly recommends that over a simple loop, which
> introduces looping overhead.
>> def using_simple_loop(
> Or use the sum() builtin rather than reduce(), which was
> *deliberately* removed from the builtins. The fact that you can get
> sum() without importing, but have to go and reach for functools to get
> reduce(), is a hint that you probably shouldn't use reduce when sum
> will work.
Out of curios
> Then I'm very confused as to how things are being done, so I will shut
> up. There's not enough information here to give performance advice
> without actually being a subject-matter expert already.
Short version: In this specific case "weights" is a 5,147 element list of
floats, and "input" is
I believe your problem is __rsub__, not __sub__.
When you havethen that
uses the "r" version of the operators.
In your __rsub__ (used when you have - ) you instead return
- which is backwards.
Notice how the final return should also be -4,95 and not the +4,95 it's
returning.
> If on th
Not sure if I'm fully understanding the question. But one option instead of
making everything class attributes is to just define __getattr__ for when it
doesn't find an attribute.
Won't work for every single valid section and option name (because of spaces,
name overlaps, etc) but should cover
In regards to the various comments about adding in print() calls what I've
found myself doing is to basically always use the logging module, and use
logging.debug() for those.
Somewhere at the top of the script I'll have a line like...
DEBUG = False
...and when initializing the handler to stdo
> def how_many_times():
> x, y = 0, 1
> c = 0
> while x != y:
> c = c + 1
> x, y = roll()
> return c, (x, y)
Since I haven't seen it used in answers yet, here's another option using our
new walrus operator
def how_many_times():
roll_count = 1
while (rolls := roll())[0] !=
>> (venv_3_10) marco@buzz:~$ python
>> Python 3.10.0 (heads/3.10-dirty:f6e8b80d20, Nov 18 2021, 19:16:18)
>> [GCC 10.1.1 20200718] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> a = frozenset((3, 4))
>> >>> a
>> frozenset({3, 4})
>> >>> a |= {5,}
>> >>> a
> Is there a simpler way?
>>> d = {1: ['aaa', 'bbb', 'ccc'], 2: ['fff', 'ggg']}
>>> [a for b in d.values() for a in b]
['aaa', 'bbb', 'ccc', 'fff', 'ggg']
>>>
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, April 18, 2018 at 7:16:19 PM UTC-6, simona bellavista wrote:
> I have a code fortran 90 that is parallelised with MPI. I would like to
> traslate it in python, but I am not sure on the parallelisation strategy and
> libraries. I work on clusters, with each node with 5GB memory and 1
https://docs.python.org/3.7/library/constants.html
"None
The sole value of the type NoneType..."
"x is None" and "type(x) is type(None)" are equivalent because of that.
I think though that the better way to do the first tests would be to use
isinstance
https://docs.python.org/3.7/library/functi
A note that Arc may have installed its own version of Python, which it is using
from within its own tools. For example, I've got a full Python installation in
C:\Python27\ArcGIS10.2 which Arc installed on top of a preexisting installation
in C:\Python27. So you may need to explicitly run it with
Take a look at the subprocess module for how to "spawn new processes, connect
to their input/output/error pipes, and obtain their return codes."
https://docs.python.org/2/library/subprocess.html
-Original Message-
From: Python-list
[mailto:python-list-bounces+david.raymond=tomtom@p
A couple notes:
-I think the Python interpreter actually sends its output to stderr, so to
capture it you'd probably want it to go to the same place as stdout, so use
stderr = subprocess.STDOUT
-You're only reading 1 line out output for each thing, so if 1 command creates
multiple lines of out
1 - 100 of 875 matches
Mail list logo