Making good progress, and things actually start working again: hello world,
drag'n'drop and charts examples are functional. There's still some
weirdness left that I want to solve before I release a preview.
BR,
Wim.
2013/1/28 Alec Taylor <alec.tayl...@gmail.com>
> Can't wait to see this out in the wild :D
>
> On Mon, Jan 28, 2013 at 11:17 PM, Rashad M <mohammedrasha...@gmail.com>
> wrote:
> > great work and was quick too
> >
> >
> > On Mon, Jan 28, 2013 at 3:12 PM, Wim Dumon <w...@emweb.be> wrote:
> >>
> >> Small update: over the weekend I rewrote the introspection data
> generator
> >> using libclang (we can't release the code we've written in the past).
> I'm
> >> very positive about libclang, but there are a few small features
> missing in
> >> libclang to make it complete - I'm also working on that. This
> introspection
> >> step generates data structures (actually python files) that describe
> the Wt
> >> API. These files are then fed into binding generator scripts, also
> written
> >> in python, which generate the proper python bindings for the Wt API.
> >>
> >> Shortly after I have some experience on how the (old) generator behaves
> >> with the current Wt state, I plan to make it available, even with
> limited
> >> support.
> >>
> >> Below: another pywt example to give an idea about what we're aiminng at.
> >>
> >> BR,
> >> Wim.
> >>
> >> import sys
> >> import Wt
> >>
> >> def createDragImage(url, smallurl, mimeType, p):
> >> result = Wt.WImage(url, "", p);
> >> dragImage = Wt.WImage(smallurl, "", p);
> >>
> >> result.setDraggable(mimeType, dragImage, True, None);
> >>
> >> return result;
> >>
> >>
> >> class Character(Wt.WText):
> >> def __init__(self, name, parent):
> >> Wt.WText.__init__(self, "", Wt.XHTMLText, parent)
> >> self.name = name
> >> self.redDrops = 0
> >> self.blueDrops = 0
> >>
> >> self.setText(name + " got no pills")
> >>
> >> self.setStyleClass("character");
> >> self.acceptDrops("red-pill", "red-drop-site");
> >> self.acceptDrops("blue-pill", "blue-drop-site");
> >> self.setInline(False);
> >>
> >> def dropEvent(self, event):
> >> if event.mimeType() == "red-pill":
> >> self.redDrops = self.redDrops +1
> >> if event.mimeType() == "blue-pill":
> >> self.blueDrops = self.blueDrops +1
> >>
> >> text = self.name + " got ";
> >>
> >> if self.redDrops != 0:
> >> text = text + str(self.redDrops) + " red pill"
> >> if self.redDrops > 1: text = text + "s"
> >>
> >> if self.redDrops != 0 and self.blueDrops != 0:
> >> text = text + " and "
> >>
> >> if self.blueDrops != 0:
> >> text = text + str(self.blueDrops) + " blue pill"
> >> if self.blueDrops > 1: text = text + "s"
> >> self.setText(text);
> >>
> >>
> >>
> >>
> >> def createApp(env):
> >> app = Wt.WApplication(env);
> >> app.setTitle("Drag & drop");
> >>
> >> Wt.WPushButton("Quit", app.root()).clicked().connect(app.quit)
> >>
> >>
> >> Wt.WText("<h1>Wt Drag & drop example.</h1>", Wt.XHTMLText,
> >> app.root());
> >> Wt.WText("<p>Help these people with their decision by dragging one
> >> of the pills.</p>", Wt.XHTMLText, app.root());
> >>
> >>
> >> if not env.javaScript():
> >> Wt.WText("<i>This examples requires that javascript support
> is
> >> enabled.</i>", Wt.XHTMLText, app.root());
> >>
> >>
> >> pills = Wt.WContainerWidget(app.root());
> >> pills.setContentAlignment(Wt.AlignCenter);
> >>
> >> createDragImage("icons/blue-pill.jpg",
> >> "icons/blue-pill-small.png",
> >> "blue-pill", pills);
> >> createDragImage("icons/red-pill.jpg",
> >> "icons/red-pill-small.png",
> >> "red-pill", pills);
> >>
> >> dropSites = Wt.WContainerWidget(app.root())
> >>
> >> Character("Neo", dropSites);
> >> Character("Morpheus", dropSites);
> >> Character("Trinity", dropSites);
> >>
> >> app.useStyleSheet("dragdrop.css");
> >>
> >> return app
> >>
> >>
> >>
> >>
> >> if __name__ == "__main__":
> >> import WtHttp
> >> WtHttp.WRun(sys.argv, createApp)
> >>
> >>
> >>
> >> 2013/1/24 Wim Dumon <w...@emweb.be>
> >>>
> >>> I'll investigate if we can defrost this project. Great to hear there's
> >>> interest for it.
> >>>
> >>> Best regards,
> >>> Wim.
> >>>
> >>>
> >>>
> >>> 2013/1/23 epi <massimodisa...@gmail.com>
> >>>>
> >>>>
> >>>> Il giorno 23/gen/2013, alle ore 08:52, Rashad M
> >>>> <mohammedrasha...@gmail.com> ha scritto:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Wed, Jan 23, 2013 at 7:06 PM, Plug Gulp <plug.g...@gmail.com>
> wrote:
> >>>>>
> >>>>> > Date: Wed, 23 Jan 2013 13:32:44 +0100
> >>>>> > From: Wim Dumon <w...@emweb.be>
> >>>>> > Subject: Re: [Wt-interest] Wt and Python
> >>>>> >
> >>>>> > Would be great if we could finish it.
> >>>>>
> >>>>>
> >>>>> Why not release it in the wild and let the community take a peak at
> >>>>> it? Though I am not a Python developer, I am sure there will be lots
> >>>>> of other developers interested in this project. Take a look at the
> way
> >>>>> MongoDB gets different language drivers
> >>>>> (http://www.mongodb.org/display/DOCS/Drivers) from community. EmWeb
> >>>>> has already started a project but is stalled because of overload,
> then
> >>>>> it makes sense to see if anyone from the wider world is interested in
> >>>>> contributing.
> >>>>>
> >>>>> Just my 2 cents.
> >>>>
> >>>>
> >>>> my 2c for Plug Gulps suggestion
> >>>>
> >>>>
> >>>>
> >>>> +1
> >>>>
> >>>> i'd love to spent some efforts on this!
> >>>>
> >>>> thanks!
> >>>>
> >>>>
> >>>>>
> >>>>> ~Plug
> >>>>>
> >>>>>
> >>>>> > It started before clang existed, but
> >>>>> > I'd like to take a look at clang to see if we can write a plugin to
> >>>>> > extract
> >>>>> > the information we need from Wt's header files. From there on, the
> >>>>> > python
> >>>>> > binding generation scripts that we wrote back then may still be
> >>>>> > usable on
> >>>>> > the current Wt version. This is unfortunately not done overnight...
> >>>>> >
> >>>>> > BR,
> >>>>> > Wim.
> >>>>> >
> >>>>> >
> >>>>> > 2013/1/23 epi <massimodisa...@gmail.com>
> >>>>> >
> >>>>> >> This is kind of cool!
> >>>>> >>
> >>>>> >> is the project still alive, any interest in resurrect it ?
> >>>>> >>
> >>>>> >> thanks!
> >>>>> >>
> >>>>> >> Massimo.
> >>>>> >>
> >>>>> >> Il giorno 22/gen/2013, alle ore 12:09, Wim Dumon <w...@emweb.be>
> ha
> >>>>> >> scritto:
> >>>>> >>
> >>>>> >> 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
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> 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
> >>
> >
> >
> >
> > --
> > 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
>
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest