Question about the "new" module

2006-12-29 Thread Gabriele *darkbard* Farina
Hi, I'm using Python 2.5 to develop a simple MVC framework based on mod_python. To load my controllers, I create new modules using the "new" module like this: # my_module = new.module("random_name") my_module.__file__ = module_path exec open(module_path, "r") in my_module.__dict__ then I i

Re: restricted environment

2006-07-20 Thread Gabriele *darkbard* Farina
faulkner wrote: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746 > When you think of modifying the interpreter, think of the compiler > module. This seems a good solutions. Does it works correctly and safely ? -- http://mail.python.org/mailman/listinfo/python-list

Re: restricted environment

2006-07-20 Thread Gabriele *darkbard* Farina
Paul Rubin wrote: > "Gabriele *darkbard* Farina" <[EMAIL PROTECTED]> writes: > > Using a separate interpreter could be a solution, but restarting any > > time the interpreter give me too much overhead and the application will > > work as slow as a CGI app e

Re: restricted environment

2006-07-19 Thread Gabriele *darkbard* Farina
Using a separate interpreter could be a solution, but restarting any time the interpreter give me too much overhead and the application will work as slow as a CGI app even if it runs using FastCGI. Can't I put the interpreter to the starting state any time it finishes a script execution without re

restricted environment

2006-07-19 Thread Gabriele *darkbard* Farina
Hi, I saw the rexec module is deprecated. I need to develop a python application able to run custom python code based on a configuration file that tells the path of the script that have to be executed. Those scripts can be runned simultaneously trought threading module, but the MUST not have any w

Re: Unicode digit to unicode string

2006-05-16 Thread Gabriele *darkbard* Farina
thank you, bye -- http://mail.python.org/mailman/listinfo/python-list

Unicode digit to unicode string

2006-05-16 Thread Gabriele *darkbard* Farina
Hi, I have a unicode digit stored into a variable ('0020' for example) and I'd like to retrieve the corrisponding unicode character based on the current encoding. How can i do that ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C API question

2006-04-24 Thread Gabriele *darkbard* Farina
It seems to be what I need. Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Python C API question

2006-04-24 Thread Gabriele *darkbard* Farina
Hi, I'm a newbie in python extension development, and I'd like to ask you a simple question. I have to implement a simple estension that parses a source file and returns an xml.dom.minidom.Document instance. I'd like to know how can I import and then manage xml.dom.minidom.* objects using Python C

Adding methods to an object

2005-10-13 Thread Gabriele *darkbard* Farina
Hi, there is a way to add methods to an object dynamically? I need to do something like this. I remember python allowed this ... class A(object): def do(s, m): print m @staticmethod def init(obj): obj.do = A.do class Test(object): pass o = Test() A.init(o) o.do(10) Now it gives me an

compiling python code

2005-05-26 Thread Gabriele *Darkbard* Farina
Hi, I have a python file inside a zip file. I'd like to compile it and add the resulting .pyc file into the zip. I tryed reading the source and compiling it using compile(), but I don't know how to write .pyc file. Can someone give me some help? bye, gabriele -- http://mail.python.org/mailman

zipimport

2005-05-04 Thread Gabriele *Darkbard* Farina
Hi, I have a zip file structured like this: mymodule.zip\ module1.py submodule\ submodule1.py I tried to load submodule.submodule1 using this pice of code: import zipimport z = zipimport.zipimporter("mymodule.zip") z.load_module("submodule.submodule1") but it does not work (load_mod

Extracting Font Outline informations

2005-04-04 Thread Gabriele *Darkbard* Farina
Hi, there is a Python library that makes me able to extract outline informations from font files? I'd like to manage TrueType and FreeType fonts ... I searched for som wrappers, but I didn't find anything ... bye -- http://mail.python.org/mailman/listinfo/python-list