simpler way to determine the source file location
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user