-1

ok this is what i have a very simple program

import tkinter as tk 
from tkinter import ttk
from tkinter import * 
import os
import webbrowser

# this is the function called when the button is clicked

def Jazz():
    browserExe = "chrome"
    os.system("pkill "+browserExe)
    webbrowser.open("http://us4.internet-radio.com:8266/listen.pls&title=Smooth%20Jazz%20Florida&website=http://www.SmoothJazzFlorida.com")


def Oldies():
    browserExe = "chrome"
    os.system("pkill "+browserExe )
    webbrowser.open("https://www.internet-radio.com/player/?mount=http://uk3.internet-radio.com:8405/live.m3u&title=Majestic%20Jukebox%20Radio%20#HIGH%20QUALITY%20SOUND&website=https://www.majesticjukeboxradio.com/")

def ClassicRock():
    browserExe = "chrome"
    os.system("pkill "+browserExe )
    webbrowser.open("https://www.internet-radio.com/player/?mount=http://us4.internet-radio.com:8258/listen.pls&title=Classic%20Rock%20Florida%20HD&website=http://www.classicrockflorida.com")

def Top40():
    browserExe = "chrome"
    os.system("pkill "+browserExe )
    webbrowser.open("https://www.internet-radio.com/player/?mount=http://uk7.internet-radio.com:8226/listen.pls&title=Box%20UK%20Radio%20danceradiouk&website=https://www.danceradiouk.com")

root = Tk()

# This is the section of code which creates the main window
root.geometry('690x530')
root.configure(background='#F0F8F0')
root.title('Radio')


# This is the section of code which creates a button
Button(root, text='Jazz', bg='#F0F8FF', font=('arial', 22, 'normal'), command=Jazz).place(x=8, y=32)
Button(root, text='Oldies', bg='#F0F8FF', font=('arial', 22, 'normal'), command=Oldies).place(x=8, y=96)
Button(root, text='Classic_Rock', bg='#F0F8FF', font=('arial', 22, 'normal'), command=ClassicRock).place(x=8, y=160)
Button(root, text='Top40', bg='#F0F8FF', font=('arial', 22, 'normal'), command=Top40).place(x=8, y=224)
root.mainloop()

what i want to do is put google on this form/window also using python...

esqew
  • 42,425
  • 27
  • 92
  • 132
hawke
  • 1
  • 1

1 Answers1

-1

There is no way of adding a web browser to a tkinter app. There are other GUI frameworks for python that do have a web browser widget. PyQT and wxPython both have a webview widget for displaying web pages. But this question was already answered here...

Web Browser in Tkinter

I did find a python library called cefpython which might work for you in a tkinter app.

TeddyBearSuicide
  • 1,377
  • 1
  • 6
  • 11