<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: locating python modules in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130350#M44558</link>
    <description>JF,&lt;BR /&gt;&lt;BR /&gt;Thanks!  Your solution worked for me.  I was hoping there would be an easy solution.  I had no idea I could even use unix style paths when I was invoking python!&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;John&lt;BR /&gt;</description>
    <pubDate>Thu, 18 Sep 2008 15:01:38 GMT</pubDate>
    <dc:creator>John Tannahill</dc:creator>
    <dc:date>2008-09-18T15:01:38Z</dc:date>
    <item>
      <title>locating python modules</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130347#M44555</link>
      <description>We have Python code in multiple directories that make up package constructs (i.e., use the __init__.py feature).  If I execute a Python script from within these directories, the imports work just fine.  If I define an OpenVMS symbol that calls the script so that I can execute it from anywhere, and do so outside of the directory where the code resides, the imports are not found.  I am looking for an easy way to solve this issue.  On a UNIX system, I think I would just create one alias with two commands in it: one that moved me to the exlicit directory prior to calling the script, the other would then execute it.  When finished, I would be back in my original directory.  I don't think that I can do this with OpenVMS symbols?&lt;BR /&gt;&lt;BR /&gt;I also do have a pythonpath entry that points to the top directory of the Python code, but I am not sure exactly what this is getting me?  I really would rather not play around with the paths as the code is in a configuration management system and can be dropped anywhere.  What I wish would happen is that when I execute the script, its environment would be where it exists, not where it is called from, but it does not look like this is going to happen.&lt;BR /&gt;&lt;BR /&gt;Ideas?&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Thu, 18 Sep 2008 00:02:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130347#M44555</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2008-09-18T00:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: locating python modules</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130348#M44556</link>
      <description>To simulate the UNIX way you may use pipe:&lt;BR /&gt;&lt;BR /&gt;$ prog == "pipe (set default xx ; prog)&lt;BR /&gt;&lt;BR /&gt;refards kalle</description>
      <pubDate>Thu, 18 Sep 2008 04:13:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130348#M44556</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2008-09-18T04:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: locating python modules</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130349#M44557</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;if you invoke your script using a Unix syntax the directory of the the script is automatically added to the path used by Python to locate module.&lt;BR /&gt;For example &lt;BR /&gt;python /dev/dir/myscript.py&lt;BR /&gt;instead of&lt;BR /&gt;python dev:[dir]myscript.py&lt;BR /&gt;&lt;BR /&gt;I will lift this restriction sometime...&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Thu, 18 Sep 2008 04:18:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130349#M44557</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2008-09-18T04:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: locating python modules</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130350#M44558</link>
      <description>JF,&lt;BR /&gt;&lt;BR /&gt;Thanks!  Your solution worked for me.  I was hoping there would be an easy solution.  I had no idea I could even use unix style paths when I was invoking python!&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;John&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Sep 2008 15:01:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130350#M44558</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2008-09-18T15:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: locating python modules</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130351#M44559</link>
      <description>Karl,&lt;BR /&gt;&lt;BR /&gt;Thanks for the excellent info.  Although JF's solution is the way we will go, I had no idea I could emulate this type of unix alias in openvms.  There may be places down the road where we will make use of it.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Thu, 18 Sep 2008 15:05:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130351#M44559</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2008-09-18T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: locating python modules</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130352#M44560</link>
      <description>See previous responses.</description>
      <pubDate>Thu, 18 Sep 2008 15:15:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/locating-python-modules/m-p/5130352#M44560</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2008-09-18T15:15:51Z</dc:date>
    </item>
  </channel>
</rss>

