# Getting Variables into and out of Python

**URL:** https://www.finalbuilder.com/forums/t/getting-variables-into-and-out-of-python/4372
**Category:** Discussion
**Created:** [May 16, 2009, 10:56am UTC](https://www.finalbuilder.com/forums/t/getting-variables-into-and-out-of-python/4372 "2009-05-16T10:56:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mdduke](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/mdduke/32/69_2.png) [@mdduke](https://www.finalbuilder.com/forums/u/mdduke)
#### Post date: [May 16, 2009, 10:56am UTC](https://www.finalbuilder.com/forums/t/getting-variables-into-and-out-of-python/4372/1 "2009-05-16T10:56:35Z")

</div>

First off, you guys deserve major applause for implementing Python.&nbsp; It's a major hassle to translate my thoughts (which are mostly in Python) into JavaScript or VB.

However, I am using Python 2.5.4 with FB 6.3, and can't seem to get variable values between Python and the FinalBuilder script, which was the major purpose of the exercise.

To wit, when I try to refer to a Project variable from python, the 'Run Script' action fails.&nbsp; It complains that the variable does not exist.&nbsp; I tried "print vars()" and there are a ton of variables set -- just not any of the FB variables (or anything related to FB) that I can tell.

I am allowed to assign to a variable with the same name as a project variable, but that is just python being nice.&nbsp; You can define a variable with any name in python.&nbsp; The value does not get back to the FB script.

(For grins, I pointed the Python lib dir to Python24 and Python26 )

&nbsp;

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [May 18, 2009, 3:26am UTC](https://www.finalbuilder.com/forums/t/getting-variables-into-and-out-of-python/4372/2 "2009-05-18T03:26:21Z")

</div>

Hi Miles   
  
 You should be able to use the ATVariables collection, however when I tested this it wasn’t working. This has now been fixed in this build :   
  
 [http://www.automise.com/downloads/automise/300/AT300\_625.exe](http://www.automise.com/downloads/automise/300/AT300_625.exe)   
  
 Example :   
  
 print ATVariables[“sysdir”]   
  
 ATVariables[“myvariable”] = “hello world”
