[PySide] Merge tool

Lucas Tanure ltanure at gmail.com
Mon Jan 20 14:02:14 CET 2014


Hi

Well, I'm not a python expert. Could you explain me a little more how you
would do it ?
The way that I did it was the most straightforward for me. Read the files
like any other text file and replace only the matching methods in the given
class.

Thanks
Tanure

--
Lucas A. Tanure Alves
+55 (19) 988176559


On Mon, Jan 20, 2014 at 10:14 AM, S. Champailler <schampailler at skynet.be>wrote:

> Hi Lucas,
>
> Thx for publishing your code...
>
> I have a question : wouldn't be safer to use the objectName attributes ?
> Somehow, having a program changing my python code makes me nervous...
> (or I dndin't get anything to your explanation :-( )
>
> stF
>
> > Le 19 janvier 2014 à 16:01, Lucas Tanure <ltanure at gmail.com> a écrit :
> >
> >
> > Hi,
> >
> > I want to share with you guys one tool that I wrote for PySide.
> > This tools was wrote thinking in my development workflow. I wrote this
> > tutorial few months ago:
> >
> > http://qt-project.org/wiki/QtCreator_and_PySide - I need to update this
> >
> > Problem:
> > Develop a class that control the UI that came from QtCreator +
> pyside-uic.
> > If you change the UI, you will need to merge this changes in previous
> > class.
> >
> > Algorithm:
> > 1 - run pyside-uic with the new uic
> > 2 - extrac the methods from 1, creates a dict {method_name : method_code}
> > 3 - read the the file that holds the previous class, but only the class
> > that you provide the name
> > 4 - replace methods from 3 with the methods from 2, only replace the
> > methods with the same name
> > 5 - apply some changes in the result code, some just for PyCharm stop
> > complaining
> >
> >
> >  Tool:
> >
> https://github.com/lucastanure/GoGo-Real-Software/blob/master/qtcreator/update.py
> >
> > Thanks
> >
> > --
> > Lucas A. Tanure Alves
> > +55 (19) 988176559
> > _______________________________________________
> > PySide mailing list
> > PySide at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/pyside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140120/ccbf4a36/attachment.html>


More information about the PySide mailing list