<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 3, 2014 at 8:36 AM, Mark Lawrence <span dir="ltr"><<a href="mailto:breamoreboy@yahoo.co.uk" target="_blank">breamoreboy@yahoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 03/07/2014 10:27, Rita wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
<br>
<br>
<br>
On Thu, Jul 3, 2014 at 2:54 AM, Mark Lawrence <<a href="mailto:breamoreboy@yahoo.co.uk" target="_blank">breamoreboy@yahoo.co.uk</a><br></div><div class="">
<mailto:<a href="mailto:breamoreboy@yahoo.co.uk" target="_blank">breamoreboy@yahoo.co.<u></u>uk</a>>> wrote:<br>
<br>
On 03/07/2014 02:17, Rita wrote:<br>
<br>
<br>
On Wed, Jul 2, 2014 at 2:46 PM, Irmen de Jong<br>
<<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a> <mailto:<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a><u></u>><br></div>
<mailto:<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a><div class=""><br>
<mailto:<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a><u></u>>__>> wrote:<br>
<br>
On 2-7-2014 4:04, Rita wrote:<br>
> yes, this helps. But I want to know who uses the module,<br>
serpent.<br>
So, when<br>
> I upgrade it or remove it they won't be affected adversely.<br>
<br>
(Please don't top-post, it makes the discussion harder to<br>
follow.)<br>
<br>
> On Tue, Jul 1, 2014 at 2:16 PM, Irmen de Jong<br>
<<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a> <mailto:<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a><u></u>><br></div>
<mailto:<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a> <mailto:<a href="mailto:irmen.NOSPAM@xs4all.nl" target="_blank">irmen.NOSPAM@xs4all.nl</a><u></u>>__>><div>
<div class="h5"><br>
<br>
> wrote:<br>
><br>
>> On 1-7-2014 12:38, Rita wrote:<br>
>>> i work in a group of developers (15 or so) who are<br>
located<br>
globally. I<br>
>>> would like to know what modules everyone is uses if I<br>
ever have to<br>
>> upgrade<br>
>>> my python. Is there mechanism which will let me see who is<br>
using what?<br>
>>><br>
>>> ie,<br>
>>><br>
>>> tom,matplotlib<br>
>>> bob, pylab<br>
>>> nancy, numpy<br>
>>> nancy, matplotlib<br>
>>><br>
>>> etc...<br>
>>><br>
>>><br>
>><br>
>> Well, if your group is all using Pip (and perhaps even<br>
virtualenv), you<br>
>> could use pip<br>
>> list. In my case:<br>
>><br>
>> $ pip list<br>
<br>
[...]<br>
<br>
<br>
Why would the fact that you upgrade or remove a package, affect<br>
another developer in<br>
your group? Are you all using the same machine to develop<br>
on, with<br>
one Python installation?<br>
<br>
I think you'll have to tell us some more details about the<br>
way you<br>
work together before<br>
we can give a meaningful answer to your question.<br>
<br>
Irmen<br>
<br>
--<br></div></div>
<a href="https://mail.python.org/__mailman/listinfo/python-list" target="_blank">https://mail.python.org/__<u></u>mailman/listinfo/python-list</a><div class=""><br>
<<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/python-list</a>><br>
<br>
we have a shared mount point which has our python install. we have 3<br>
servers on one part of the campus and 2 in another part.<br>
<br>
I want to find out what packages our user base is using thats<br>
the final<br>
goal. I can figure out who is using python by writing a wrapper<br>
but not<br>
what module.<br>
<br>
--<br>
--- Get your facts first, then you can distort them as you please.--<br>
<br>
<br>
You can check every users's program for import statements but do you<br>
really need to, why not check what's in the site-packages folder for<br>
your python install?<br>
<br>
--<br>
My fellow Pythonistas, ask not what our language can do for you, ask<br>
what you can do for our language.<br>
<br>
Mark Lawrence<br>
<br></div><div class="">
how can i get frequency of the module usage? thats the end goal.<br>
<br>
--<br>
--- Get your facts first, then you can distort them as you please.--<br>
<br>
<br>
</div></blockquote>
<br>
Count the number of imports or count the times a given program gets run for the number of imports depending on what you mean.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.<br>
<br>
Mark Lawrence<br>
<br>
---<br>
This email is free from viruses and malware because avast! Antivirus protection is active.<br>
<a href="http://www.avast.com" target="_blank">http://www.avast.com</a><br>
<br>
<br>
-- <br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>here is what I am doing now, </div><div class="gmail_extra"><br></div><div class="gmail_extra">egrep 'from|import' *.py | wc -l which is giving me that. But this does not give me the number of times the particular module gets called. I was thinking of adding a logging feature to all of my modules so every time they get called it will be written to a log file with corresponding host and username. Is there an easy way to do that?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><br clear="all"><div><br></div>-- <br>--- <span>Get your facts first, then you can distort them as you please.</span>--
</div></div>