Hello. I am new here! Excuse my ignorance, but how does AS work? I have a script in Python I run under built in IDLE. I wish to transfer it as a package to a Win10 environment. But I wish to test it first om my MAC as a package. The documentation does not give an overall view of AS. Tons of details. But how do I execute my code in AS? Where is the AS stuff stored? How do you administer input and output files? Etc. I can not find anything on this, nor any videos!
Perhaps I’m trying to use AS for something it is not intended for.
I would appreciate a “nice” response. I know this is sooooo basic for many of you out there, but Rome wasn’t build in a day!!
Welcome to the ActiveState Platform! Yours is a simple question that deserves a simple answer, but history gets in the way. Basically:
Traditional open source distributions install globally, which causes all kinds of problems. To address these issues, AS only installs virtual environments. This has two important ramifications:
Language runtimes gets installed into a directory like (Windows) C:\users<username>\appdata\local\activestate<UUID>\bin\perl.exe or for Mac HD/System/Library/Perl/
By default, your working directory (i.e., where AS stuff is stored) gets set to something like (Windows) C:\users<username><projectName> or Mac HD/Users/username/projectName
To run code, you have to activate the virtual environment you want to run the code in. If you only have one environment, it gets activated by default. But you can always switch between environments (or reactivate an environment if you exit out of it) by running:
state activate orgname/projectName
To run under Windows, you would need to build your project for Windows on the AS Platform, install the runtime environment and then copy over your code unless your code is on GitHub, in which case the easiest way is just to install the code and runtime at the same time (see video for how)