File: Main.cpp

package info (click to toggle)
ovito 0.9.5-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 24,824 kB
  • sloc: cpp: 61,876; ansic: 10,002; xml: 940; python: 523; sh: 43; makefile: 15
file content (35 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
///////////////////////////////////////////////////////////////////////////////
// 
//  Copyright (2008) Alexander Stukowski
//
//  This file is part of OVITO (Open Visualization Tool).
//
//  OVITO is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//
//  OVITO is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
///////////////////////////////////////////////////////////////////////////////

#include <iostream>
#include "Python.h"

int main(int argc, char** argv) 
{
	Py_Initialize();
	
	if(PyRun_SimpleString("print \"Hello World\""))
		std::cerr << "Call to PyRun_SimpleString() failed." << std::endl;
	
	Py_Finalize();
	
	return 0;
}