pview cant modify models, so you cant set or replace a texture in it. what you can do is modify the egg-file in a text editor and replace the texture in the material definition.
but pview isnt that complicated i’d say, implementing a small viewer that can do what you need should be easy.
Not the way I’ve written it above. If you want to write a program that works like that, it’ll be a bit longer than 7 lines (but only a bit longer). You can get the command-line parameters from sys.argv, and figure out which parameter is the model and which is the texture, and then apply them yourself.