Manjot Pahwa wrote: > Respected Sir/Ma'am, > > I am an undergraduate student who is currently working a project that > involves porting of a video editor for the Sugar environment which is > a shell built over the Linux OS. I am studying Pitivi and wish to port > it on Sugar. > > While browsing through the source code that is available on you > website pitivi.org <http://pitivi.org>, I encountered the following > code and was unable to understand it completely. > The code is as follows: Have you tried running PiTiVi under sugar? PiTiVi is written in pygtk, so I would assume you have most of the dependencies already. If not, your first task will be to install them. > from pitivi.signalinterface import Signallable > from pitivi.factories.base import SourceFactory, SinkFactory > from pitivi.encode import RenderSinkFactory, RenderFactory > from pitivi.log.loggable import Loggable > pitivi is not a built in module, so is it possible to develop modules > of your own, save it in some library and then be able to access it in > the python environment?
These are absolute imports (as opposed to relative imports). This is accomplished by putting a file in the pitivi subdirectory of the source tree named "__init__.py,", and prepending pitivi's path to PYTHONPATH environment variable before loading the rest of the application. When you run pitivi from the command line, this is done done for you (see the bin/pitivi.py file in the source tree. Note: this file is generated by the build system, so at least run ./autogen.sh && make if you have not done so already). I would suggest you read through the python reference documentation on the module system. > Moreover, I wanted to know the order in which I should study the code, > the files that I should browse through first and then after that. Again, just try to get the application to load under sugar. If it crashes and you get a traceback, come back and explain what happened. For all I know you don't need to do anything in particular. But do make sure you have the dependencies required for pitivi. > > Your help will be highly appreciated. > > Regards, > Manjot Pahwa > Consultant, Technology and Education > Software for Education, Entertainment and Training Activities (SEETA) > Undergraduate > Netaji Subhas Institute of Technology > Division of Computer Sciences > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > ------------------------------------------------------------------------ > > _______________________________________________ > Pitivi-pitivi mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pitivi-pitivi > ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Pitivi-pitivi mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pitivi-pitivi
