[Python Wpg] Has anyone used Plone before?
Stuart Williams
stuart at swilliams.ca
Fri Nov 12 08:36:50 EST 2010
I set it up 5 or 6 years ago for a client who wanted its event calendar
functionality.
Stuart.
On Wed, Nov 10, 2010 at 11:23 PM, Kevin Veroneau <kveroneau at gmail.com>wrote:
> Hello everybody,
>
> Just curious if anyone has touched base on a popular Python CMS called
> Plone? It is based off of Zope, which I have used a long time ago, about 3
> years ago. Plone is suppose to be really good and is used by a few notable
> companies, including Nokia and others for their websites. I am in the
> process of installing and testdriving it now to see how it work
> functionality-wise and how easy it is to extend using it's APIs.
>
> Oh, a small added pleasure for you desktop application programmers on the
> list. Below is the same application in both GTK and Qt formats, both
> written in Python to demonstrate how they differ:
>
> GTK version:
> import pygtk
> pygtk.require('2.0')
> import gtk
>
> class Form(gtk.Window):
> def say_hi(self,widget,event,Data=None):
> oth.say_hi(self.na.get_text())
> def delete_event(self, widget, data=None):
> return False
> def destroy(self, widget, data=None):
> gtk.main_quit()
> def main(self):
> self.connect("delete_event", self.delete_event)
> self.connect("destroy", self.destroy)
> self.ctl = gtk.Table(1, 1, True)
> lbl = gtk.Label("Name:")
> lbl.show()
> self.ctl.attach(lbl,0,1,0,1)
> self.na = gtk.Entry()
> self.na.show()
> self.ctl.attach(self.na,1,2,0,1)
> btn = gtk.Button("Submit")
> btn.connect("clicked",self.say_hi,None)
> btn.show()
> self.ctl.attach(btn,2,3,0,1)
> self.ctl.show()
> self.add(self.ctl)
> self.show()
> gtk.main()
>
> class OtherClass:
> def __init__(self):
> print "OtherClass init."
> def say_hi(self,data='World'):
> print "Hello %s!" % data
>
> if __name__ == "__main__":
> oth = OtherClass()
> win = Form(gtk.WINDOW_TOPLEVEL)
> win.main()
>
> ------------------------------------------------------------------------------------
>
> Qt3 version:
> from qt import *
> import sys
>
> class Form1(QDialog):
> def __init__(self,parent = None,name = None,modal = 0,fl = 0):
> QDialog.__init__(self,parent,name,modal,fl)
>
> if not name:
> self.setName("Form1")
>
> self.textLabel1 = QLabel(self,"textLabel1")
> self.textLabel1.setGeometry(QRect(10,10,50,21))
>
> self.na = QLineEdit(self,"na")
> self.na.setGeometry(QRect(60,10,121,23))
>
> self.pushButton1 = QPushButton(self,"pushButton1")
> self.pushButton1.setGeometry(QRect(180,5,70,32))
>
> self.languageChange()
>
> self.resize(QSize(253,39).expandedTo(self.minimumSizeHint()))
> self.clearWState(Qt.WState_Polished)
>
> self.connect(self.pushButton1,SIGNAL("clicked()"),self.say_hi)
>
> def languageChange(self):
> self.setCaption(self.__tr("Form1"))
> self.textLabel1.setText(self.__tr("Name:"))
> self.pushButton1.setText(self.__tr("Submit"))
>
> def say_hi(self):
> oth.say_hi(self.na.text().ascii())
>
> def __tr(self,s,c = None):
> return qApp.translate("Form1",s,c)
>
> class OtherClass:
> def __init__(self):
> print "OtherClass init."
> def say_hi(self,data='World'):
> print "Hello %s!" % data
>
> oth = OtherClass()
> app = QApplication(sys.argv)
> f = Form1()
> f.show()
> app.setMainWidget(f)
> app.exec_loop()
> --------------------------------------------------------
> These are apps using raw API coding into GTK and Qt3, however one can
> easily use the QtDesigner for Qt3, and GLADE for GTK. I made the same
> example apps again using these simple interface builders.
> Those familiar with Visual Studio should use QtDesigner, as it is very very
> similar. These example apps here by no way use best Python
> programming practices.
>
> Kevin.
>
> _______________________________________________
> Winnipeg Python Users Group mailing list
> http://WinniPUG.ca
> Winnipeg at python.org
> http://mail.python.org/mailman/listinfo/winnipeg
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/winnipeg/attachments/20101112/e5d4b06f/attachment.html>
More information about the Winnipeg
mailing list