We did some work to make PyWt in the past. It was never completely finished
(too busy...), but quite a fun project with good results.
BR,
Wim.
import sys
import Wt
import WtHttp
class MyApplication(Wt.WApplication):
def __init__(self, env):
Wt.WApplication.__init__(self, env)
self.setTitle("Hello")
Wt.WText("Your name please? ", Wt.XHTMLText, self.root())
self.nameedit = Wt.WLineEdit("", self.root())
self.nameedit.setFocus()
button = Wt.WPushButton("Greet me!", self.root())
button2 = Wt.WPushButton("Quit", self.root())
Wt.WBreak(self.root())
self.greeting = Wt.WText("", Wt.XHTMLText, self.root())
button.clicked().connect(self.greet)
self.nameedit.enterPressed().connect(self.greet)
button2.clicked().connect(self.quit)
def greet(self):
self.greeting.setText("Hello there, " +
self.nameedit.text())
def createApplication(env):
return MyApplication(env)
if __name__ == "__main__":
import WtHttp
WtHttp.WRun(sys.argv, createApplication)
2013/1/22 Nagaev Boris <bnag...@gmail.com>
> Hi,
>
> Hello world in Python (Jython):
>
> http://www.nan-tic.com/en/2011/from-pyqt-to-jythonjwt-setting-up-the-environment/
>
> I think, Python is promising to interact with database. Django ORM,
> for example, is convenient. One of advantages is that no SQL is
> hardcoded and introspection is more featured. Boost.python can be used
> to bind it to C++.
>
> I do not know good web-servers in python except tornado. I think
> built-in Wt http server should be used.
>
> Python bindings to Wt (like PyQt for Qt) would be convenient for
> people writing in Python. Several programmers I know do not use Wt
> only because it is C++ and they prefer Python.
>
> GIL problem can be solved by multiprocessing.
>
> Taking better parts of Django and Wt is a good idea.
>
> On Tue, Jan 22, 2013 at 4:56 PM, Rashad M <mohammedrasha...@gmail.com>
> wrote:
> > Hi All,
> >
> > Why Wt not in python? Python has web server and all. If java why not in
> > Python
> >
> > --
> > Regards,
> > Rashad
> >
> >
> ------------------------------------------------------------------------------
> > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> > MVPs and experts. ON SALE this month only -- learn more at:
> > http://p.sf.net/sfu/learnnow-d2d
> > _______________________________________________
> > witty-interest mailing list
> > witty-interest@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/witty-interest
> >
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest