Hi Mr.G.
You ask a number of tricky questions in one post, but I'll do my best to answer them.
Python is relatively new to me and i have some questions.
Is it possible to use CPython instead of IronPython or is it to much linked with VC?
You can only use IronPython as a plugin in VC. The whole point of IronPython is that it can live inside of a .Net application like VoxCommando.
The problem is that i want to also use my Python files with other programs.
If you want to use your python files with "other programs" (I'm not exactly sure what you mean by this), then just use CPython.
If i can't use CPython the same way and with the same VC functions/features like with IronPython,
how to i register VC IronPhyton in my system (environment variables)?
You can't use the same features with CPython because it can't be used in the plugin. So you can't call actions and events in VC from the python code, or pass variables between VC and python. But you can call executables along with command line parameters by using the Launch actions in VC, so if you create a program in CPython you can initiate it from VC, and you may also be able to read console information back from it.
I don't know what you mean by "register VC IronPhyton in my system (environment variables)" or why you would need to do this. You will need to explain more clearly what you mean by this.
Then I'm not sure how to ad packages to the VC IronPython.
The normal way is putting them in the "site-packages" folder but that did not work.
The correct place to put libraries is in YourVCRootFolder\plugins\PY\Lib
I don't recommend you try to use a setup.py though, you just want to put the actual python library files in there manually.
Also I'm not sure what part of the unziped package is the right one to put in IronPython.
There is the main folder with the setup.py...
There are subfolders "build" and "src"...
Build has a subfolder "lib"...
You should look for the folder in the zip that contains mostly .py files and nothing else. It is probably called lib but it varies. If you send me a zip I will take a look and make my best guess. Even for a given library you may find many versions.
I did put it in PY/Lib and that looks like the import works - but the my code gives me:
Line: 722 >>
TypeError: create_connection() got an unexpected keyword argument 'source_address'
In CPython my code works...
I can't help much with this yet because.
1 - I don't know what the "it" is that you put in PY/Lib
2 - I don't know if you mean that you put it in VC\PY\Lib (wrong) or VC\Plugins\PY\Lib
3 - I don't know what library you are talking about
4 - I haven't seen your code.
Just because something runs in CPython does not mean that it will run in IronPython.
I am not aware of any situation where code runs in IronPython, but not in the VC IronPython plugin, but anything is possible.
Usually pure python code will work in IronPython and therefore it will work in VC, but there are some exceptions. Like this one:
http://voxcommando.com/forum/index.php?topic=1319.msg11343#msg11343Edit: To be more clear about that last example: That is a problem with IronPython, not with VC. But the point there is that it works in CPython, and even though it is pure python code and should work in IronPython, certain methods, with certain variables, cause an error in IronPython due do some minor difference from CPython. The problem there is with ElementTree. ElementTree works in VC, but in some cases like this one it can throw an unexpected error.