Skip to content

Commit f23a541

Browse files
authored
Merge pull request #308 from alexlib/master
another place with pkg_resources
2 parents f5ec591 + bf8dbb5 commit f23a541

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openpiv/piv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import matplotlib.pyplot as plt
33

44
from openpiv import pyprocess, tools
5-
import pkg_resources as pkg
5+
from importlib_resources import files
66

77
# import numpy as np
88

@@ -71,8 +71,8 @@ def piv_example():
7171
7272
"""
7373
# if im1 is None and im2 is None:
74-
im1 = pkg.resource_filename("openpiv", "data/test1/exp1_001_a.bmp")
75-
im2 = pkg.resource_filename("openpiv", "data/test1/exp1_001_b.bmp")
74+
im1 = files('openpiv.data').joinpath('test1/exp1_001_a.bmp')
75+
im2 = files('openpiv.data').joinpath('test1/exp1_001_b.bmp')
7676

7777
frame_a = tools.imread(im1)
7878
frame_b = tools.imread(im2)

0 commit comments

Comments
 (0)