Re: [Tutor] More tutor testing required

2017-12-06 Thread Alan Gauld via Tutor
On 05/12/17 16:02, Alan Gauld via Tutor wrote:

> address the issues raised and the latest incarnation
> should work (although not well with Opera for some reason!)

Now better with Opera, although the contents panel is
still not quite right on small screens.

Still looking for feedback from iOS devices (or
even Safari on a desktop PC/laptop for that matter)

Any input appreciated.
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] How to debug a memory leak in a wsgi application?

2017-12-06 Thread Etienne Robillard

Hi

I think my wsgi application is leaking and I would like to debug it.

What is the best way to profile memory usage in a running wsgi app?

Best regards,

Etienne


--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to debug a memory leak in a wsgi application?

2017-12-06 Thread Alan Gauld via Tutor
On 06/12/17 09:21, Etienne Robillard wrote:
> Hi
> 
> I think my wsgi application is leaking and I would like to debug it.
> 
> What is the best way to profile memory usage in a running wsgi app?

This is probably a bit advanced for the tutor list, you might
get a better response on the main Python list.

But to get a sensible answer you need to provide more data:
What OS and Python version?
What toolset/framework are you using?
What measurements lead you to suspect a memory leak?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] download google contacts

2017-12-06 Thread Jerry Hill
On Tue, Dec 5, 2017 at 10:10 AM, Atux Atux  wrote:

> i am looking for a way to download only the contacts from my google account
> and export them in my linux machine in a txt file, every12 hours with
> cronjob and overwrite the old txt file.
>

​Have you read Google's Contacts API​ documentation?  It has a python
library and sample code you can start with.
https://developers.google.com/google-apps/contacts/v3/.  It might be a bit
tricky to work with since it uses OAuth, which doesn't always mix well with
a command line application run non-interactively.  I'm not sure the best
way to deal with that, but I would guess you aren't the first person to try
and solve that problem.

Once you have some code, if it isn't working the way that you'd like folks
here are usually happy to pitch in with advice.

-- 
Jerry
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to debug a memory leak in a wsgi application?

2017-12-06 Thread Etienne Robillard

Hi Alan,

Thanks for the reply. I use Debian 9 with 2G of RAM and precompiled 
Python 2.7 with pymalloc. I don't know if debugging was enabled for this 
build and whether I should enable it to allow memory profiling with 
guppy... My problem is that guppy won't show the heap stats for the 
uWSGI master process. However I have partially resolved this issue by 
enabling --reload-on-rss 200 for the uwsgi process.  Previously, the 
htop utility indicated a 42.7% rss memory usage for 2 uWSGI processes. I 
have restarted the worker processes with SIGINT signal. Now my uwsgi 
command line looks like:


% uwsgi --reload-on-rss 200 --gevent 100 --socket localhost:8000 
--with-file /path/to/file.uwsgi --threads 2 --processes 4 --master 
--daemonize /var/log/uwsgi.log


My framework is Django with django-hotsauce 0.8.2 and werkzeug. The web 
server is nginx using uWSGI with the gevent pooling handler.


Etienne

Le 2017-12-06 à 10:00, Alan Gauld via Tutor a écrit :

On 06/12/17 09:21, Etienne Robillard wrote:

Hi

I think my wsgi application is leaking and I would like to debug it.

What is the best way to profile memory usage in a running wsgi app?

This is probably a bit advanced for the tutor list, you might
get a better response on the main Python list.

But to get a sensible answer you need to provide more data:
What OS and Python version?
What toolset/framework are you using?
What measurements lead you to suspect a memory leak?




--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor