how to get user input from wx.html?

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

how to get user input from wx.html?

Alec Bennett-2
I'd like to embed some HTML in a wx application, and
the tricky part is I need the user to be enter data in
form fields. Is this possible in wx?

For example, if I had a form field that looked like
this:

<input type="email" name="textfield">

Is there a way to learn the contents of it from my wx
App?

Also, is there a way for me to know when the user has
clicked the "submit" button?








      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Chris Mellon
On Jan 22, 2008 7:28 AM, Alec Bennett <[hidden email]> wrote:

> I'd like to embed some HTML in a wx application, and
> the tricky part is I need the user to be enter data in
> form fields. Is this possible in wx?
>
> For example, if I had a form field that looked like
> this:
>
> <input type="email" name="textfield">
>
> Is there a way to learn the contents of it from my wx
> App?
>
> Also, is there a way for me to know when the user has
> clicked the "submit" button?
>


I implemented form support for wxHTML using custom tag handlers and
posted it to this list a while ago, try searching the archives to see
if you can find it.


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Chris Mellon
On Jan 22, 2008 8:29 AM, Chris Mellon <[hidden email]> wrote:

> On Jan 22, 2008 7:28 AM, Alec Bennett <[hidden email]> wrote:
> > I'd like to embed some HTML in a wx application, and
> > the tricky part is I need the user to be enter data in
> > form fields. Is this possible in wx?
> >
> > For example, if I had a form field that looked like
> > this:
> >
> > <input type="email" name="textfield">
> >
> > Is there a way to learn the contents of it from my wx
> > App?
> >
> > Also, is there a way for me to know when the user has
> > clicked the "submit" button?
> >
>
>
> I implemented form support for wxHTML using custom tag handlers and
> posted it to this list a while ago, try searching the archives to see
> if you can find it.
>


I'd forgotten that I actually posted the (best) version on the wiki.
See http://wiki.wxpython.org/wxHTML


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Stef Mientki-2
In reply to this post by Chris Mellon


Chris Mellon wrote:

> On Jan 22, 2008 7:28 AM, Alec Bennett <[hidden email]> wrote:
>  
>> I'd like to embed some HTML in a wx application, and
>> the tricky part is I need the user to be enter data in
>> form fields. Is this possible in wx?
>>
>> For example, if I had a form field that looked like
>> this:
>>
>> <input type="email" name="textfield">
>>
>> Is there a way to learn the contents of it from my wx
>> App?
>>
>> Also, is there a way for me to know when the user has
>> clicked the "submit" button?
>>
>>    
>
>
> I implemented form support for wxHTML using custom tag handlers and
> posted it to this list a while ago, try searching the archives to see
> if you can find it.
>
>  
in the wxPython demo there's also a very good example, look for
"HtmlWindow" (also based on wxHTML).
I've used as an interactive instruction / answer form, and it's really
greate (and very easy to use),
you can see this part of my application here:
http://stef.mientki.googlepages.com/pylab_works_demo_html_instruction.html

cheers,
Stef
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>  


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Alec Bennett-2
In reply to this post by Chris Mellon
> I implemented form support for wxHTML using custom
> tag handlers and posted it to this list a while ago,

> try searching the archives to see if you can find
it.

Hmm, I couldn't find your post. I found a few other
people looking to do the same thing though...

Looking at your examples here:

http://wiki.wxpython.org/wxHTML

I can't figure out how to use it. Is there some sample
of it in use somewhere?

And which forms module are you importing in the "from
forms import GetParam" line?







      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Chris Mellon
On Jan 22, 2008 3:22 PM, Alec Bennett <[hidden email]> wrote:

> > I implemented form support for wxHTML using custom
> > tag handlers and posted it to this list a while ago,
>
> > try searching the archives to see if you can find
> it.
>
> Hmm, I couldn't find your post. I found a few other
> people looking to do the same thing though...
>
> Looking at your examples here:
>
> http://wiki.wxpython.org/wxHTML
>
> I can't figure out how to use it. Is there some sample
> of it in use somewhere?
>
> And which forms module are you importing in the "from
> forms import GetParam" line?
>
>

It's importing itself. A fairly hacky and not recommended way to do
things. I really should clean up the code so it's production quality.

As for use, all you need to do is import the package (it will register
itself as tag handler when you do so), then load the HTML form of your
choice into an HTMLWindow. When a form submission is triggered, a
forms.FormSubmitEvent is raised.

>
>
>
>
>
>       ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Alec Bennett-2
Trying this, I get the following error:

Traceback (most recent call last):
  File "C:\Python24\lib\forms\form.py", line 75, in
HandleTag
    return handler(tag)
  File "C:\Python24\lib\forms\form.py", line 81, in
HandleFORM
    self.form = HTMLForm(tag,
self.GetParser().GetWindowInterface().GetHTMLWindow())
AttributeError: 'HtmlWinParser' object has no
attribute 'GetWindowInterface'


Here's the code I'm using, is anything obviously
wrong?

import wx
import wx.html
import forms

class MyHtmlFrame(wx.Frame):

    def __init__(self, parent, title):

        wx.Frame.__init__(self, parent, -1, title)

        html = wx.html.HtmlWindow(self)

        if "gtk2" in wx.PlatformInfo:

            html.SetStandardFonts()

        html.SetPage(

            "Here is some <b>formatted</b>
<i><u>text</u></i> "

            "loaded from a <font
color=\"red\">string</font>."

            "<form id='form1' name='form1'
method='post' action=''>"
            "  <p><input type='text' name='name'>"
            "  <p><input type='text' name='email'>"
            "  <input type='submit' name='Submit'
value='Submit'>"
            "</form>"

            "Hi there"

            )

app = wx.App()
frm = MyHtmlFrame(None, "Simple HTML")
frm.Show()
app.MainLoop()








      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Chris Mellon
On Jan 24, 2008 3:27 PM, Alec Bennett <[hidden email]> wrote:

> Trying this, I get the following error:
>
> Traceback (most recent call last):
>   File "C:\Python24\lib\forms\form.py", line 75, in
> HandleTag
>     return handler(tag)
>   File "C:\Python24\lib\forms\form.py", line 81, in
> HandleFORM
>     self.form = HTMLForm(tag,
> self.GetParser().GetWindowInterface().GetHTMLWindow())
> AttributeError: 'HtmlWinParser' object has no
> attribute 'GetWindowInterface'
>
>
> Here's the code I'm using, is anything obviously
> wrong?
>
> import wx
> import wx.html
> import forms
>
> class MyHtmlFrame(wx.Frame):
>
>     def __init__(self, parent, title):
>
>         wx.Frame.__init__(self, parent, -1, title)
>
>         html = wx.html.HtmlWindow(self)
>
>         if "gtk2" in wx.PlatformInfo:
>
>             html.SetStandardFonts()
>
>         html.SetPage(
>
>             "Here is some <b>formatted</b>
> <i><u>text</u></i> "
>
>             "loaded from a <font
> color=\"red\">string</font>."
>
>             "<form id='form1' name='form1'
> method='post' action=''>"
>             "  <p><input type='text' name='name'>"
>             "  <p><input type='text' name='email'>"
>             "  <input type='submit' name='Submit'
> value='Submit'>"
>             "</form>"
>
>             "Hi there"
>
>             )
>
> app = wx.App()
> frm = MyHtmlFrame(None, "Simple HTML")
> frm.Show()
> app.MainLoop()
>

This may have been added in a more recent version of wx than you are
using, since I see you're using Python 2.4. Can you update to the most
recent version of wx?


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Alec Bennett-2
> This may have been added in a more recent version of
> wx than you are using, since I see you're using
> Python 2.4. Can you update to the most recent
> version of wx?

Whoops, my bad, form works fine after upgrading WX
from 2.6 to 2.8.

Now my only problem is catching the form event. How do
I bind the submit action? You said in a previous email
"When a form submission is triggered, a
forms.FormSubmitEvent is raised"... How do I bind to
that?

Thanks, and apologies if this is an overly basic
question.









      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Chris Mellon
On Jan 24, 2008 4:32 PM, Alec Bennett <[hidden email]> wrote:

> > This may have been added in a more recent version of
> > wx than you are using, since I see you're using
> > Python 2.4. Can you update to the most recent
> > version of wx?
>
> Whoops, my bad, form works fine after upgrading WX
> from 2.6 to 2.8.
>
> Now my only problem is catching the form event. How do
> I bind the submit action? You said in a previous email
> "When a form submission is triggered, a
> forms.FormSubmitEvent is raised"... How do I bind to
> that?
>

The module defines an event binder for it. You want something like
self.Bind(forms.form.EVT_FORM_SUBMIT, self.OnFormSubmit).

> Thanks, and apologies if this is an overly basic
> question.
>
>
>
>
>
>
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Alec Bennett-2
Hmm, still can't get the event to fire. Here's my
code, anything obviously wrong?

import wx
import wx.html
import forms

class MyHtmlFrame(wx.Frame):

    def __init__(self, parent, title):

        wx.Frame.__init__(self, parent, -1, title)

        self.Bind(forms.form.EVT_FORM_SUBMIT,
self.OnFormSubmit)

        html = wx.html.HtmlWindow(self)

        if "gtk2" in wx.PlatformInfo:

            html.SetStandardFonts()

        html.SetPage(

            "<form id='form1' name='form1'
method='get' action=''>"
            "  <p><input type='text' name='name'>"
            "  <p><input type='text' name='email'>"
            "  <input type='submit' name='Submit'
value='Submit'>"
            "</form>"

            )


    def OnFormSubmit(self, event):
        print "submit!"


app = wx.App(redirect=0)
frm = MyHtmlFrame(None, "Simple HTML")
frm.Show()
app.MainLoop()







      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Chris Mellon
On Jan 24, 2008 5:05 PM, Alec Bennett <[hidden email]> wrote:

> Hmm, still can't get the event to fire. Here's my
> code, anything obviously wrong?
>
> import wx
> import wx.html
> import forms
>
> class MyHtmlFrame(wx.Frame):
>
>     def __init__(self, parent, title):
>
>         wx.Frame.__init__(self, parent, -1, title)
>
>         self.Bind(forms.form.EVT_FORM_SUBMIT,
> self.OnFormSubmit)
>
>         html = wx.html.HtmlWindow(self)
>
>         if "gtk2" in wx.PlatformInfo:
>
>             html.SetStandardFonts()
>
>         html.SetPage(
>
>             "<form id='form1' name='form1'
> method='get' action=''>"
>             "  <p><input type='text' name='name'>"
>             "  <p><input type='text' name='email'>"
>             "  <input type='submit' name='Submit'
> value='Submit'>"
>             "</form>"
>
>             )
>
>
>     def OnFormSubmit(self, event):
>         print "submit!"
>
>
> app = wx.App(redirect=0)
> frm = MyHtmlFrame(None, "Simple HTML")
> frm.Show()
> app.MainLoop()
>


I forgot what I'd written and gave you bad advice ;)

The event isn't a command event, and it's delivered to the HTMLWindow,
so you need to bind on that to get the event. It probably should be a
command event though - you can change this by making FormSubmitEvent
inherit from wx.PyCommandEvent instead of wx.PyEvent.


Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Rufus V. Smith
I've been frustrated in that I've not seen throughout the web an example
of processing form data from wx.HtmlWindow.

This thread never got to the final conclusion with a piece of code that worked.

I want to use HtmlWindow and an html form as my GUI, but not have to create
a local server and use a browser, but to just render an html page locally
in my program and capture the activity/changes/submissions.

This thread was headed there but stopped before a full working example
was given.

anyone have a link or can "complete" the example here so it works?  I'll
probably play with this and try to implement the last suggestion and if I get
it to work, I'll post the final working example here, and probably to the Wiki
as well.

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Mario Lacunza-2

Maybe because processing the info got it for the web form isnot job of wxpython,that need to be handled for the web server.

I really don't understand for what reason you can't use wxpython to create the form/gui and process the info with it.

Enviado desde mi smartphone LG G3

El 21/08/2015 03:00, "Rufus V. Smith" <[hidden email]> escribió:
I've been frustrated in that I've not seen throughout the web an example
of processing form data from wx.HtmlWindow.

This thread never got to the final conclusion with a piece of code that
worked.

I want to use HtmlWindow and an html form as my GUI, but not have to create
a local server and use a browser, but to just render an html page locally
in my program and capture the activity/changes/submissions.

This thread was headed there but stopped before a full working example
was given.

anyone have a link or can "complete" the example here so it works?  I'll
probably play with this and try to implement the last suggestion and if I
get
it to work, I'll post the final working example here, and probably to the
Wiki
as well.

Thanks!





--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/how-to-get-user-input-from-wx-html-tp2359459p5724711.html
Sent from the wxPython-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Tim Roberts
In reply to this post by Rufus V. Smith
Rufus V. Smith wrote:
> I've been frustrated in that I've not seen throughout the web an example
> of processing form data from wx.HtmlWindow.
>
> This thread never got to the final conclusion with a piece of code that
> worked.
>
> I want to use HtmlWindow and an html form as my GUI, but not have to create
> a local server and use a browser, but to just render an html page locally
> in my program and capture the activity/changes/submissions.

So, you're trying to use HTML as your UI description language, instead
of something like xrc, right?  I think you're in for a fair amount of
pain.  You're talking about intercepting all of the events that could
cause the form to be submitted, and then parsing the tree of controls to
extract their contents, making sure that you handle the different field
types.  In my humble opinion, it would be a lot easier to embed a simple
web server in your application to catch the requests and respond.  Web
servers just aren't that much work.

The normal thing would be to translate your HTML into normal wx fields
and do it native.  I do understand the appeal of the HTML approach,
however.  It very neatly separates presentation from processing.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Rufus V. Smith
Thanks Tim.

I don't know about xrc so I'll take a look at that.

Also, the embedded web server just sounded daunting.    Perhaps that's just the fear of the unknown.

For background,  I do a lot of work with embedded processors.     I like to use Python and wxPython
to create GUI testing front-ends for myself:  A few buttons, some data entry fields, some display
fields.  Typically they translate into some form of serial command, or message on a CAN bus, etc.

The allure of html is the ability to quickly reformat my GUI and add/remove pieces either with
an editor or even real-time.  Like adding a panel button that is the picture of a toggle switch, when
clicked, changes to a picture of a toggle switch in the other position, etc.

I don't know what's best:  htmlwindow,  webview, or something else.  (I've no significant experience
with Javascript and html, which hampers my decision too).

I think I'll Google xrc, and "python embedded web server" and see where I can go from there.

Rufus



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Tim Roberts
Sent: Friday, August 21, 2015 12:44 PM
To: [hidden email]
Subject: Re: [wxPython-users] Re: how to get user input from wx.html?

Rufus V. Smith wrote:
> I've been frustrated in that I've not seen throughout the web an
> example of processing form data from wx.HtmlWindow.
>
> This thread never got to the final conclusion with a piece of code
> that worked.
>
> I want to use HtmlWindow and an html form as my GUI, but not have to
> create a local server and use a browser, but to just render an html
> page locally in my program and capture the activity/changes/submissions.

So, you're trying to use HTML as your UI description language, instead of something like xrc, right?  I think you're in for a fair amount of pain.  You're talking about intercepting all of the events that could cause the form to be submitted, and then parsing the tree of controls to extract their contents, making sure that you handle the different field types.  In my humble opinion, it would be a lot easier to embed a simple web server in your application to catch the requests and respond.  Web servers just aren't that much work.

The normal thing would be to translate your HTML into normal wx fields and do it native.  I do understand the appeal of the HTML approach, however.  It very neatly separates presentation from processing.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Mario Lacunza-2
If you want to quickly make changes in the GUI try wxFormBuilder

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Skype: mlacunzav

Lima - Peru

2015-08-24 10:28 GMT-05:00 Rufus V. Smith <[hidden email]>:
Thanks Tim.

I don't know about xrc so I'll take a look at that.

Also, the embedded web server just sounded daunting.    Perhaps that's just the fear of the unknown.

For background,  I do a lot of work with embedded processors.     I like to use Python and wxPython
to create GUI testing front-ends for myself:  A few buttons, some data entry fields, some display
fields.  Typically they translate into some form of serial command, or message on a CAN bus, etc.

The allure of html is the ability to quickly reformat my GUI and add/remove pieces either with
an editor or even real-time.  Like adding a panel button that is the picture of a toggle switch, when
clicked, changes to a picture of a toggle switch in the other position, etc.

I don't know what's best:  htmlwindow,  webview, or something else.  (I've no significant experience
with Javascript and html, which hampers my decision too).

I think I'll Google xrc, and "python embedded web server" and see where I can go from there.

Rufus



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Tim Roberts
Sent: Friday, August 21, 2015 12:44 PM
To: [hidden email]
Subject: Re: [wxPython-users] Re: how to get user input from wx.html?

Rufus V. Smith wrote:
> I've been frustrated in that I've not seen throughout the web an
> example of processing form data from wx.HtmlWindow.
>
> This thread never got to the final conclusion with a piece of code
> that worked.
>
> I want to use HtmlWindow and an html form as my GUI, but not have to
> create a local server and use a browser, but to just render an html
> page locally in my program and capture the activity/changes/submissions.

So, you're trying to use HTML as your UI description language, instead of something like xrc, right?  I think you're in for a fair amount of pain.  You're talking about intercepting all of the events that could cause the form to be submitted, and then parsing the tree of controls to extract their contents, making sure that you handle the different field types.  In my humble opinion, it would be a lot easier to embed a simple web server in your application to catch the requests and respond.  Web servers just aren't that much work.

The normal thing would be to translate your HTML into normal wx fields and do it native.  I do understand the appeal of the HTML approach, however.  It very neatly separates presentation from processing.

--
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to get user input from wx.html?

Rufus V. Smith
In reply to this post by Rufus V. Smith
I finally got back to looking at that code that was in the wiki and modified the
short example to make this minimal working code.   This should be a good jump start
for someone trying to use the forms module downloaded from the wiki here

Short Example:
import wx
import wx.html
import forms

class MyHtmlFrame(wx.Frame):
   
def __init__(self, parent, title):
       
super(MyHtmlFrame,self).__init__(parent, wx.ID_ANY, title)
        html
= wx.html.HtmlWindow(self)
        html
.Bind(forms.form.EVT_FORM_SUBMIT, self.OnFormSubmit)
        html
.SetPage(
           
"<form id='form1' name='form1' method='get' action='doAction'>"
           
"  <p>Enter Name: <input type='text' name='name'>"
           
"  <p>Email: <input type='text' name='email'>"
           
"  <p><input type='submit' name='Submit' value='Submit'>"
           
"</form>"
           
)

   
def OnFormSubmit(self, evt):
       
print "Submitting to %s via %s with args %s"% (
               evt
.form.action, evt.form.method, evt.args)

app
= wx.App()
frm
= MyHtmlFrame(None, "Simple HTML")
frm
.Show()
app
.MainLoop()



On Monday, August 24, 2015 at 11:28:08 AM UTC-4, Rufus wrote:
Thanks Tim.
 
Rufus V. Smith wrote:
> I've been frustrated in that I've not seen throughout the web an
> example of processing form data from wx.HtmlWindow.
>
> This thread never got to the final conclusion with a piece of code
> that worked.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.