WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Vizcore.cfg - help with syntax (

GiudiceLab 10-09-2009 09:12 AM

Vizcore.cfg - help with syntax
As I mentioned in the previous post, our lab is getting bigger and we are making a push to organize our code development. One of the things we are working on is a central network folder for resources. We can add this folder to any script using

and it works fine, but we want to create a config file that will do this automatically, and just copy it to our development computers. I see in the configuration basics documentation that I can use something like

but I can't get it to work, and I'm guessing it is a syntax error of some sort. Can someone tell me what the correct syntax is? Also, is it possible to use sys.path.append or some equivalent in the config file as well, so that we can drop Python libraries on the network too, without having to reconfigure each Python? Thanks in advance once again.

farshizzo 10-09-2009 09:25 AM

Have a look at the Configuration settings basics page in the docs, it explains how to add options to your vizcore.cfg file. In this case you would add the following line:

viz.resource.path = //rootname/foldername/Components/resources

GiudiceLab 10-09-2009 09:44 AM

Yes, that's the page I was looking at, but when I tried to modify the option with the equals sign, I was using quotation marks as well, so that's why that wasn't working. Thanks.

So is it possible to modify the sys.path in the vizcore.cfg file as well? Or will we have to add the path manually on every computer?

farshizzo 10-09-2009 09:52 AM

During initialization, the Python interpreter will attempt to import sitecustomize. This allows you to make customizations to your Python environment. So create a file called and place it anywhere on the default module search path (i.e. Vizard/bin folder) and it will be imported before any Vizard script is executed.

GiudiceLab 10-09-2009 09:57 AM

That did the trick. Thank you very much!

All times are GMT -7. The time now is 04:19 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC