rk2015
rk2015

Reputation: 21

python script- how to import System

I am trying to get the following to work in a python script and have referred to this import java ImportError: No module named java, but it did not solve my issue.

I am trying the following in a python script (version 2.6.6) :

from java.lang import System

and the get following error :

Traceback (most recent call last):
File "./myscript.py", line 3, in <module>
  from java.lang import System

Is the above possible in a python script?

Please note following commands work fine

Upvotes: 0

Views: 9592

Answers (1)

Avi Mosseri
Avi Mosseri

Reputation: 1368

python has a sys library but it is significantly different than System in java's standard library.

import sys

Upvotes: 1

Related Questions