cancel
Showing results for 
Search instead for 
Did you mean: 

XMC python modules used in example scripts

XMC python modules used in example scripts

StephanH
Valued Contributor III
Hello,

often in the XMC example scripts functions from the module "xmclib" or "device" are used.
Is there a documentation what functions are included, what parameters can be send and what returnvalues can be used?

If there is no documentation, is there a way to access the source code to find out what the functions can do?

It would be helpfule to use the existing code and not do reinvent the access to functions like "logger"

Here an example from XMC:

#@MetaDataEnd
from xmclib import emc_vars
from xmclib import logger
from xmclib import cli
from device import api

Best regards
Stephan

Regards Stephan
22 REPLIES 22

Any update? Really would be nice to have these modules documented.

Hi all,
Any idea about when this scripting guide will be available ?
Because there's a real lack of documentation.
Regards

Patrick

John_Moore
Extreme Employee
Hi, all.

We're actually in the process of creating a more comprehensive scripting and workflows guide that should answer most of these questions. I'll provide a link to the resource online once it is published.

Thanks,

John

StephanH
Valued Contributor III
Hello Erik, hello James,

I have come as far as James. Therefore, the question how do I get to the information. I resolved the way till xmcbase, but I can't find it. Therefore this post.

I can't find any sources.

Best regards
Stephan

Regards Stephan

Erik_Auerswald
Contributor II
Hi Stephan,

I cannot give you a definitive answer, but you may be able to find the source on an XMC appliance. Python modules are most often implemented in Python, and sometimes delivered as source. Thus you may just need to find the relevant files (brute force: find / -iname xmclib\*) to be able to read them.

Useful documentation is preferable, of course. 🙂

Thanks,
Erik
GTM-P2G8KFN