memory leaks - tools and docs

2011-11-24 Thread Aljosa Mohorovic
i've been trying to find memory leaks in a wsgi application using
gunicorn to run it and after a lot of time invested in research and
testing tools i did find a lot of useful information (most really old)
but i'm left with a feeling that this should be easier, better
documented and with tools that generate better data.

if anybody can share some tips, links, docs or better tools with
better reports i would really appreciate it.
i'm not against paying for a good tool so any recommendation is
appreciated.

i mostly used http://guppy-pe.sourceforge.net/#Heapy but found
http://pysizer.8325.org/ and http://code.google.com/p/pympler/ also
interesting.

Aljosa
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: oauth2 server implementation

2011-09-28 Thread Aljosa Mohorovic
On Sep 28, 2:17 am, Roy Smith  wrote:
> We rolled our own oauth2 client on top of basic urllib calls.  It's not
> terribly difficult.

i'm asking about oauth2 server implementation, not client.
it's easy to consume oauth2 stuff but what to do when you need to
implement server side stuff?

Aljosa
-- 
http://mail.python.org/mailman/listinfo/python-list


oauth2 server implementation

2011-09-27 Thread Aljosa Mohorovic
i'm looking for oauth2 server implementation but other than
https://github.com/simplegeo/python-oauth2 (oauth v1 implementation)
it doesn't seem that people are using v2 implementations.
anybody using some oauth2 implementation and can share some info?


Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


setup.py and MANIFEST.in - duplicating inclusion of files?

2009-11-27 Thread Aljosa Mohorovic
the only way i can get to distribute template files when using "python
setup.py sdist" is to declare it both in setup.py and MANIFEST.in.

setup.py:
> package_data={'myapp':['templates/*.html', 'templates/admin/*.html'],}

MANIFEST.in:
> recursive-include myapp/templates *.html

am i doing something wrong or is this correct? if it's correct, why?

Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: naming packages for pypi

2009-06-26 Thread Aljosa Mohorovic
On Jun 26, 11:15 am, Carl Banks  wrote:
> Your post seems to suggest some conflating of these concepts so you
> need to make it clear what you really mean.

my example:
when creating website example.com (django project) it contains
multiple django apps which i package separately.
most of websites have news, about, contact so i would create 3
packages news, about and contact and add them to pypi.example.com
(private pypi for my company).
same thing happens for site example2.com, example3.com so finally i
have something like:
example.com-news # news package for project/site example.com
example2.com-news # news package for project/site example2.com
example3.com-news # news package for project/site example3.com

i'm trying to find a better way, currently it looks to me like
packaging system is missing namespaces/categories or something similar
but i'm guessing it's only that i don't know how to do it properly.
that's why i'm asking so please suggest a proper way for me to do it.

Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


naming packages for pypi

2009-06-26 Thread Aljosa Mohorovic
is it possible to have 2 packages with same name registered at pypi?
are packages unique per name or also per category or something else?

if package is unique per name how do you name you packages?
do you name them something like -myapp, -myapp,
-myapp, ...

if this is current situation is this something that you learned to
live with and there are no indications that this will eventually
change?

Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


pypi compatible software

2009-06-07 Thread Aljosa Mohorovic
i've been searching for a recommended way to setup private pypi
repository and i've found several options:
- PloneSoftwareCenter
- http://code.google.com/p/pypione/
- http://pypi.python.org/pypi/haufe.eggserver
- http://www.chrisarndt.de/projects/eggbasket/
- http://pypi.python.org/pypi/ClueReleaseManager

so now i have a few questions:
- is code behind pypi.python.org available and why i can't find some
up-to-date official document or howto for private pypi repository
(maybe it exists but i just can't find it)?
- since python is used in commercial environments i guess they
actually have private pypi repositories, where can i find docs that
defines what pypi is and how to implement it?
- can you recommend 1 option (software providing pypi like service)
that can be easily installed and configured as a service running on
apache2/mod_wsgi, has an active community and docs howto setup?
- i did found http://www.python.org/dev/peps/pep-0381/ - is this the
spec that above mentioned software is based upon?

any additional info or comments appreciated.

Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


private pypi repository

2009-06-03 Thread Aljosa Mohorovic
i'm looking for a effective way to setup private pypi repository, i've
found:
- PloneSoftwareCenter
- http://code.google.com/p/pypione/
- http://pypi.python.org/pypi/haufe.eggserver

what are you using? what would you recommend?

Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


http://orbited.org/ - anybody using it?

2009-05-17 Thread Aljosa Mohorovic
can anybody comment on http://orbited.org/ ?
is it an active project? does it work?

Aljosa Mohorovic
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: current week / weeks in year - best practice

2008-07-31 Thread Aljosa Mohorovic
On Jul 31, 5:42 pm, Aljosa Mohorovic <[EMAIL PROTECTED]>
wrote:
> what if i know current context week = 20 (example), what would be the
> best way to get datetime objects for first and last day of current
> context week?
> by "current context week" i don't mean current week for current year
> but current week when program is iterating all weeks in year.

if w = current context week and now is current datetime object  this
is how i calculate days:
first_day = datetime.strptime("%s %s" % (now.year, str((w-1)*7)), "%Y
%j")
last_day = first_day + timedelta(days=6)

any comments on this?

Aljosa Mohorovic
--
http://mail.python.org/mailman/listinfo/python-list


Re: current week / weeks in year - best practice

2008-07-31 Thread Aljosa Mohorovic
On Jul 31, 3:58 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Instead of datetime.now() use date.today(), which removes a lot of
> boilerplate.
>
> int(date.today().strftime("%W"))
>
> Apart from that, I think it's the way to go.

what if i know current context week = 20 (example), what would be the
best way to get datetime objects for first and last day of current
context week?
by "current context week" i don't mean current week for current year
but current week when program is iterating all weeks in year.

Aljosa
--
http://mail.python.org/mailman/listinfo/python-list


current week / weeks in year - best practice

2008-07-31 Thread Aljosa Mohorovic
i use this to find out current week and total number of weeks for
current year:
now = datetime.now()
weeks_in_year = int(date(now.year, 12, 31).strftime("%W"))
current_week = int(date(now.year, now.month, now.day).strftime("%W"))

is this the best way or is there a better way?

Aljosa Mohorovic
--
http://mail.python.org/mailman/listinfo/python-list


PYTHONPATH breaks MySQLdb

2008-04-25 Thread Aljosa Mohorovic
i have a working MySQLdb module (/usr/lib/python2.4/site-packages/
MySQL_python-1.2.2-py2.4-linux-i686.egg), using it without problems.

"clean shell" after login:
python -c "import MySQLdb" reports no errors

if i export PYTHONPATH:
export PYTHONPATH=/var/www/projects/uv_portal/portal

python -c "import MySQLdb" reports no errors as in previous case

if i export PYTHONPATH:
export PYTHONPATH=/var/www/projects/uv_portal/portal/apps

i get this:
python -c "import MySQLdb"
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: No module named MySQLdb

is there any reason why this happens?

Aljosa Mohorovic
--
http://mail.python.org/mailman/listinfo/python-list


Re: looking for library to read ppt files

2007-04-18 Thread Aljosa Mohorovic
On Apr 18, 4:02 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> How about running a headless OpenOffice instance and remote-controlling
> it with pyuno:
>
> http://udk.openoffice.org/python/python-bridge.html
>
> -Carsten

i'll try oo, thanks for link.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: looking for library to read ppt files

2007-04-18 Thread Aljosa Mohorovic
> > Not really a Python question but Google turned up:
it is a python question. i'm not looking for a program, i'm looking
for a library.
my goal is to convert ppt to jpegs but later i wish to convert to swf
and maybe implement animations

> I suppose you could also use the win32 module and the COM object to
> grab the info from the slide and then use the PIL module to create a
> jpeg. Sounds like a lot of head banging to me, but it might be an
> interesting project.
i can't use win32 because it should work on linux since it will be
used as server-side application.

-- 
http://mail.python.org/mailman/listinfo/python-list


looking for library to read ppt files

2007-04-16 Thread Aljosa Mohorovic
i'm looking for a way to read ppt (powerpoint) files using python and
to convert slides into jpeg files.
any links or tips how to do this?

-- 
http://mail.python.org/mailman/listinfo/python-list


dynamic func. call

2005-02-04 Thread Aljosa Mohorovic
can i do something like this:

s = "myFunction"
a = s() # equals to: a = myFunction()


-- 
http://mail.python.org/mailman/listinfo/python-list