Hi!!! I suppose this topic might not be mystery at all for all those who have been working with ZOPE for a while, but for me, as a beginner, it's really starting to look as a pain in the ***. The issue is namespaces. I've been dabbling across ZOPE documentation and help files, but somehow I never found an appropriate answer to my problem. Let me be more specific. Suppose I have all my files organized in the following directory tree: Work | |-- dmFiles | |-- sqlFiles | \-- pyFiles Consider that all my DTML Documents are located in the root directory (Work). DTML Methods, SQL Methods and Python Scritps are located respectively in the folders dmFiles, sqlFiles, pyFiles. So far so good... The problems start when I want to code one of the following situations: - call a Python Script (pyFiles folder) from a DTML Method (dmFiles folder); - call a SQL Method (sqlFiles folder) from a Python Script (pyFiles folder); What is correct code necessary to implement both this cases? Thanks in advance, Vitor Varalonga
First, I wouldn't structure my files in that way. Your chosen method hinders acquisition. Put all your dtml on the same level as the sqlfiles and pyfiles and acquisition should take care of the rest. Work | dtmlfile dtmlfile . . . dtmlfile |-- sqlfiles folder |-- pyfiles folder -- Jeffrey D. Peterson Webmaster Range TV Cable & Broadband 1818 E. 3rd Ave. Hibbing, MN 55746 jpeterso@rangebroadband.com -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Vitor Varalonga Sent: Wednesday, December 12, 2001 11:10 AM To: zope@zope.org Subject: [Zope] Namespaces Hi!!! I suppose this topic might not be mystery at all for all those who have been working with ZOPE for a while, but for me, as a beginner, it's really starting to look as a pain in the ***. The issue is namespaces. I've been dabbling across ZOPE documentation and help files, but somehow I never found an appropriate answer to my problem. Let me be more specific. Suppose I have all my files organized in the following directory tree: Work | |-- dmFiles | |-- sqlFiles | \-- pyFiles Consider that all my DTML Documents are located in the root directory (Work). DTML Methods, SQL Methods and Python Scritps are located respectively in the folders dmFiles, sqlFiles, pyFiles. So far so good... The problems start when I want to code one of the following situations: - call a Python Script (pyFiles folder) from a DTML Method (dmFiles folder); - call a SQL Method (sqlFiles folder) from a Python Script (pyFiles folder); What is correct code necessary to implement both this cases? Thanks in advance, Vitor Varalonga
Jeff Peterson wrote:
Work | dtmlfile dtmlfile . . . dtmlfile |-- sqlfiles folder |-- pyfiles folder
With the above structure how could I call a SQL method, located in the sqlfiles folder, in a Python Script located in the pyfiles folder? Thanks in advance, Vitor Varalonga
Or... Put your SQL and Py above your dtml then acquisition will allow you to call them just by name. The method I suggested before still will require you to name the folder. <dtml-var "pylfiles.pyscript"> If above your dtml then <dtml-var pyscript> -- Jeffrey D. Peterson Webmaster Range TV Cable & Broadband 1818 E. 3rd Ave. Hibbing, MN 55746 jpeterso@rangebroadband.com -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Vitor Varalonga Sent: Wednesday, December 12, 2001 11:10 AM To: zope@zope.org Subject: [Zope] Namespaces Hi!!! I suppose this topic might not be mystery at all for all those who have been working with ZOPE for a while, but for me, as a beginner, it's really starting to look as a pain in the ***. The issue is namespaces. I've been dabbling across ZOPE documentation and help files, but somehow I never found an appropriate answer to my problem. Let me be more specific. Suppose I have all my files organized in the following directory tree: Work | |-- dmFiles | |-- sqlFiles | \-- pyFiles Consider that all my DTML Documents are located in the root directory (Work). DTML Methods, SQL Methods and Python Scritps are located respectively in the folders dmFiles, sqlFiles, pyFiles. So far so good... The problems start when I want to code one of the following situations: - call a Python Script (pyFiles folder) from a DTML Method (dmFiles folder); - call a SQL Method (sqlFiles folder) from a Python Script (pyFiles folder); What is correct code necessary to implement both this cases? Thanks in advance, Vitor Varalonga
participants (2)
-
Jeff Peterson -
Vitor Varalonga