Scala VS python2 (Linux or shell) not completed

Source: Internet
Author: User

PS: Only consider the latest version of Scala and python2.x, due to the difference between python3.x and python2.x, and the mainstream of some open source projects are used Python2, currently python2 a little bit compatible python3

1. Installation

Ps:python2 and Scala are easy to install

(1) python->

Download the appropriate version on the official website http://www.python.org/ftp/python/

Taking Python-2.6.6 as an example

Unzip the tar xvzf python-2.6.6.tgz
CD Python-2.6.6

Compiling and installing Python
./configure–prefix=/usr/local/python2.6
Make
Make install

Create a Python link
Ln-sf/usr/local/python/bin/python2.6/usr/bin/python

Python-v displaying version information

Python 2.6.6

(2) Scala

Download the appropriate version http://www.scala-lang.org/download/all.html take scala-2.10.4 as an example

Unzip tarxvzf scala-2.10.4.tgz

Configuring Environment variables

exportSCALA_HOME=/usr/scala/scala-2.10.3

exportPATH=$PATH:$SCALA_HOME/bin

Scala-version displaying version information

Scala Code Runner version 2.10.4--Copyright 2002-2013, LAMP/EPFL

2.python Scala calls the same Linux and Shell command comparison

(1) The function of Python is divided into modules, there are three ways to call the Linux command, and three modules can be used

One, OS module

Two, commands module

Three, subprocess module

(2) Scala has already encapsulated functionality in the Scala.sys.process reference and can be used directly

Scala VS python2 (Linux or shell) not completed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.