Java tutorial
//package com.java2s; /* * Copyright (c) 2012 European Synchrotron Radiation Facility, * Diamond Light Source Ltd. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { private static InputStream getHelloWorldPython() { String contents = "# An exmple python script\r\n" + "# Please chose run or debug to run the script with the \r\n" + "# python interpreter found automatically by the workbench. \r\n" + "# For instance go to 'Run' and choose 'example'. \r\n" + "\r\n" + "def hello():\r\n" + " print \"Hello World!\"\r\n" + "\r\n" + "\r\n" + "hello()"; return new ByteArrayInputStream(contents.getBytes()); } }