On Monday, February 11, 2013 04:09:11 PM Harald Sitter wrote: > On Mon, Feb 11, 2013 at 3:00 PM, Scott Kitterman <[email protected]>wrote: > > Harald Sitter <[email protected]> wrote: > > >On Mon, Feb 11, 2013 at 2:04 PM, Aleix Pol <[email protected]> wrote: > > >> Hi Kubunt'ers, > > >> I've been seeing today that: > > >> Couldn't find the > > >> /usr/share/pyshared/UpdateManager/DistUpgradeFetcherKDE.py file > > >> > > >> After investigating a little (thank you apt-file) I saw that now the > > > > > >file > > > > > >> is in: > > >> /usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeFetcherKDE.py > > >> > > >> Could anybody tell me a better way to find that file rather than > > > > > >having > > > > > >> the full path like we had so far? > > >> Or maybe I'm just missing something...? > > > > > >I don't think you can get the old pyshared path, but the new lib based > > >path > > >should be detectable by evaluating the sys.path variable in python. > > > > > >python -c "import sys; print sys.path" > > > > > >not really nice though, I reckon it would be possible to simply have it > > >linked into a more stable path (usr/bin or usr/libexec or something). > > >Though I should note that I don't see the path changing until python4, > > >so I > > >wonder whether that is really worthwhile ;) > > > > Use python3 though, not python. > > > > It's an importable module, so that's the correct location for it. > > The point is that you'd not need to change stuff and expect that it is in a > searchpath of python (i.e. the default python of the system).
Python and python3 are different things. It's in the search path of the default python3. Another option would be to add a short /usr/bin script that imports the module and runs it. Then there's no need for non-python users to know or care where it lives or if it's in python or python3. Something like: #! /usr/bin/python3 import UpdateManager.DistUpgradeFetcherKDE UpdateManager.DistUpgradeFetcherKDE.main() Scott K -- kubuntu-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
