Be realistic, when have you ever had to do this beyond just experimenting and learning about qrc? Yes, it's possible to make this separation and yes, somewhere there probably are those that do. But the question isn't whether it's possible, the question is why jump through these hoops?
If the OP is developing within a production environment then all the more reason to avoid qrc where deployment could be as simple as pushing to a central repo. I'm questioning the practice of qrc in the context of Python, I think those that use it do so from reading about it in a C++ context. On 7 September 2015 at 22:15, Justin Israel <[email protected]> wrote: > > > On Tue, Sep 8, 2015 at 8:11 AM Marcus Ottosson <[email protected]> > wrote: > >> > @Marcus, another benefit of compiled qrc files is that you don't have >> to deploy any of the source images or deal with path locations. You only >> need to deploy one python file as standard code in the python path. >> >> Yeah, but I don't buy it. >> >> This only really makes sense if you separate between development and >> deployment directory. With Python, this distinction isn't made and you end >> up deploying the development directory. Meaning paths don't change as they >> do during deployment of compiled Qt. >> > > Why do you say this is the case? It completely depends on your deployment > scheme. If you choose to deploy only the compiled resource file, then you > no longer have to worry about images in a relative resource location on > disk. You only have to import one python module. > > >> >> Let's say your right, wouldn't it still mean keeping the source images in >> the development directory, and still deploying them? You'd end up with qrc >> and source images. I suppose you could selectively exclude them via some >> packaging mechanism like pip, but why bother? >> > > Yes, your source images would be part of your development directory. No > you don't have to deploy them if you don't want to. Deployment is something > you can control. You can choose to compile UI and qrc files and only deploy > the compiled ones. > > It's basically an option you have, if you see a benefit in not having to > read static assets from a relative filesystem location, and also want to > reduce the number of files that have to be part of your deployment. > > > >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC_rMZZaAi-_TVuh47eFV1xDwQM83evwUU-xDnkSGbdZw%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC_rMZZaAi-_TVuh47eFV1xDwQM83evwUU-xDnkSGbdZw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA13O5GTLi8ODhE%2BPJBeMcCas35qTjkxeKv3JPuBpkM9Bg%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA13O5GTLi8ODhE%2BPJBeMcCas35qTjkxeKv3JPuBpkM9Bg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- *Marcus Ottosson* [email protected] -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCYP06m6UB%2BSB1bVt5sueG4HiKN23iA6NWjB5iko46hcg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
