From d47d0de2b2bbc4a5a3383ab30364d3517a47db08 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jun 2015 23:12:20 -0400 Subject: [PATCH] simpler way to determine the source file location --- python/lammps.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/lammps.py b/python/lammps.py index a3a979cd3f..d43766f541 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -16,13 +16,12 @@ import sys,traceback,types from ctypes import * from os.path import dirname,abspath,join -from inspect import getsourcefile class lammps: def __init__(self,name="",cmdargs=None,ptr=None): # determine module location - modpath = dirname(abspath(getsourcefile(lambda:0))) + modpath = dirname(abspath(__file__)) # load liblammps.so by default # if name = "g++", load liblammps_g++.so