WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-09-2009, 09:12 AM
GiudiceLab GiudiceLab is offline
Member
 
Join Date: May 2009
Location: Orono, ME
Posts: 49
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
Code:
viz.res.addPath('//rootname/foldername/Components/resources')
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
Code:
viz.resource.path('//rootname/foldername/Components/resources')
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.
__________________
Virtual Environments and Multimodal Interaction (VEMI) Lab

This time, it should work...
Reply With Quote
  #2  
Old 10-09-2009, 09:25 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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:
Code:
viz.resource.path = //rootname/foldername/Components/resources
Reply With Quote
  #3  
Old 10-09-2009, 09:44 AM
GiudiceLab GiudiceLab is offline
Member
 
Join Date: May 2009
Location: Orono, ME
Posts: 49
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?
__________________
Virtual Environments and Multimodal Interaction (VEMI) Lab

This time, it should work...
Reply With Quote
  #4  
Old 10-09-2009, 09:52 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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 sitecustomize.py 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.
Reply With Quote
  #5  
Old 10-09-2009, 09:57 AM
GiudiceLab GiudiceLab is offline
Member
 
Join Date: May 2009
Location: Orono, ME
Posts: 49
That did the trick. Thank you very much!
__________________
Virtual Environments and Multimodal Interaction (VEMI) Lab

This time, it should work...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:18 AM.


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