After checking out two or more projects using the state checkout <orgname>/<projectname> command from different working directories, you can launch separate instances of your project by using the state shell and state use commands.
After checking out your runtime, you can designate a default for your entire system. This default will persist until it is either changed to a new default project, or unset using the state use reset command. This includes after closing the terminal window, logging off, or rebooting the machine.
To set a default runtime, open a command terminal and run
state projects
This will produce a list of all projects currently checked out on your local machine. Select a project from the list and run:
state use <projectname>
To check the current default runtime on your system, enter state use show.
You can switch between projects and set a new default by entering state use <newprojectname>. To verify that the change was successful, enter state use show to view the current default runtime.
To unset your default runtime, enter state use reset. You will be prompted to confirm your choice before you can continue. This will remove the project as your default, but the runtime will still remain on your system.
You cannot set more than one default at a time. For instance, you cannot have a default Python runtime and a default Perl runtime. The State Tool will only accept one default project runtime.
Setting your default project with the state use command does not prevent you from working on two or more projects at the same time.
To find which project is currently set as the system default, enter
state use show
The project shown in the command output will be the default for your entire system (with the exception of those operating inside a virtual shell).
To launch another project (“project2”) while still having your default project (“project1”) set, enter state shell <orgname>/project2.
This will open a new shell to work on project2 without disrupting your current default project runtime.
Open two separate terminal windows and navigate to the directories containing your checked out ActiveState projects (“project1” and “project2” in this example) from the same organization (“MyOrg”). This example uses projects from the same organization; however, projects can be run simultaneously from different organizations.
In one terminal window enter
state shell myOrg/project1
and in the other window enter
state shell MyOrg/project2
The State Tool will generate two separate virtual shells for your projects, ensuring that each instance will not interfere with the other or with existing system tools and settings. This is useful if you want to jump from project to project without setting a global environment for your machine.
Note that once your working session has ended, by either typing exit into the command prompt or closing the application, you will need to repeat the state shell myOrg/project1 command to open a shell for your project for any future work.