Hi! The solution is sys.modules at first.
I get "*global_data", and other common modules, and check, which are use same pre-tag. If I found them all, the pre-tag is my Pylons Project name, and with this tag I can found all modules, and modules have __file__ member that can inform me the paths I need. Example: ity.lib ity.lib.app_globals ity.config.environment ity.lib.base ity.controllers ity Thanks for me... :-) dd On máj. 21, 16:45, durumdara <[email protected]> wrote: > Hi! > > I used a code in global_data init to append my shared libs to sys.path > (to simplify the imports). > > One of these libs are a special object that collect and hold many > informations, and request are create this to use it's functions. > > F. ex: > > def index(self): > R = Request() > R.DoSomething... > html = R.CheetahRenderDef() > return html > > I wanna ask that how can this Request object know about the physical > place of the Pylons dirs, like controllers, or other dirs... (c:\web > \pylons\ddd\site\site\controllers) > Ok, I can pass it in my creation with this: > R = Request(__file__) > > But this creation is existing in many codes, libs (without parameter), > and I wanna avoid this replace. > > If possible, I wanna get informations from the Pylons. Do you know > about a property, function, etc. that can provide me the Pylons > directory info? > > Thanks for your help: > dd --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
