How to download the Enthought Tool Suite python script?
Domanda
I have Python downloaded already, but want to contribute code to the Enthought Tool Suite (ETS). According to this site (http://code.enthought.com/source/):
it says to download the following python script: https://raw.github.com/enthought/ets/master/ets.py
I put the ets.py into the python script, save as...and in the Python Shell, I typed in "import ets"
However, nothing happens.
Also, the site says to run the following commands:
$ mkdir ets
$ cd ets # and copy ets.py here
$ python ets.py clone
Typing those lines in Python Shell gives me the message: "SyntaxError: invalid syntax"
As you can see, I'm new to Python, and I don't know what I'm doing. How do I download the ETS script and run the commands??
Soluzione
Those last commands aren't meant to be entered into the Python console, they're meant to be entered at the terminal shell.
localhost-2:tmp $ mkdir ets
localhost-2:tmp $ cd ets
localhost-2:ets $ cp ../ets.py .
This last command assumes that ets.py was in the original directory. Now we can run it [edit: make sure you have git
installed, or this won't work]:
localhost-2:ets $ python ets.py clone
Cloning package encore
URL: https://github.com/enthought/encore.git
Cloning into encore...
remote: Counting objects: 1081, done.
remote: Compressing objects: 100% (483/483), done.
remote: Total 1081 (delta 729), reused 942 (delta 592)
Receiving objects: 100% (1081/1081), 981.12 KiB | 1.80 MiB/s, done.
Resolving deltas: 100% (729/729), done.
Cloning package traits
URL: https://github.com/enthought/traits.git
Cloning into traits...
[etc.]
Cloning package etsproxy
URL: https://github.com/enthought/etsproxy.git
Cloning into etsproxy...
remote: Counting objects: 3577, done.
remote: Compressing objects: 100% (2243/2243), done.
remote: Total 3577 (delta 1053), reused 3571 (delta 1047)
Receiving objects: 100% (3577/3577), 369.81 KiB, done.
Resolving deltas: 100% (1053/1053), done.
After this, you need to install everything (this will look different depending on your operating system):
localhost-2:ets $ python ets.py develop
Running command ['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'setup.py', 'develop'] in package encore
running develop
running egg_info
creating encore.egg-info
writing encore.egg-info/PKG-INFO
[long build process removed]