From: Wander L. C. <wan...@gm...> - 2015-04-28 11:16:13
|
2015-04-27 22:01 GMT-03:00 Chapman Flack <gh...@an...>: > Hi, > Hi, > I recently sent a patch so the ctypes structures would have > the right sizes on Solaris (thanks for merging!), but I was > not sure what would be the best way for the libusb0 backend > to handle the strange location of the shared object on Solaris. > It's /usr/sfw/lib/libusb.so.1 > > Should that name just be added to the big list o' names already > in libusb0.py _load_library()? Or check for sys.platform == 'sunos5' > and define a different _load_library that knows the right path? Or > some other approach? > Sorry, you commented this in the patch and I completely forgot to answer it. I think the simplest solution would be to add it to the list of candidates. > I also recently saw this blog post here: > http://emergent.unpythonic.net/01330399156 > > where somebody wrote a C port of a Python script that was > using pyusb because it was too slow. The post says that the > compiler, objdump, and ldconfig were getting run when the Python > script started up. I don't see that when I run it (same script, > but I modified it to pass a find_library lambda that just returns > the Solaris library path). So maybe the only time those expensive > external processes get run are during the library search? In that > case, maybe it's good to hardcode the path when known ... or fall > back to the expensive way if the hardcoded path isn't found. > He doesn't necessarily need to rewrite the app in C, but he can write a faster backend. I am not worried about optimization right now, but guessing common paths seems like a smart and simple optimization. > -Chap > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users -- Best Regards, Wander Lairson Costa |