473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Integrate IE in python program

Hi,
I begin in python program and I would like to know how I can do to integrate Internet Explorer into my python program without titlebar statusbar etc... Just with the main windows (windows which show web site)
I have already searched documention but i never find something about my problem
Thank you !
Aug 23 '07 #1
7 3239
ilikepython
844 Expert 512MB
Hi,
I begin in python program and I would like to know how I can do to integrate Internet Explorer into my python program without titlebar statusbar etc... Just with the main windows (windows which show web site)
I have already searched documention but i never find something about my problem
Thank you !
There is a webbroswer module that might do what you are looking for.
Aug 23 '07 #2
bartonc
6,596 Expert 4TB
Hi,
I begin in python program and I would like to know how I can do to integrate Internet Explorer into my python program without titlebar statusbar etc... Just with the main windows (windows which show web site)
I have already searched documention but i never find something about my problem
Thank you !
You'll need a GUI toolkit that is capable of running an ActiveX component if you really want to run IE (not the best browser in the world). wxPython is such a toolkit, for example.
Aug 23 '07 #3
I have found something about IEHtmlWindow
And I have tried to write something but everything crash
My code
Expand|Select|Wrap|Line Numbers
  1. import wx
  2. if wx.Platform == '__WXMSW__':
  3.     import  wx.lib.iewin    as  iewin
  4.  
  5. class IE(wx.Frame):
  6.     def __init__(self,titre):
  7.         wx.Frame.__init__(self,parent=None, id=-1, title= titre , size=(300, 300) )
  8.  
  9.         self.ie = iewin.IEHtmlWindow(self, id=-1, style = wx.NO_FULL_REPAINT_ON_RESIZE )
  10.         self.current = "http://localhost/"
  11.         self.ie.LoadUrl(self.current)
  12.         return True
  13.  
  14. class Monpp(wx.App):
  15.     def OnInit(self):
  16.         fen = IE("zone")
  17.         fen.Show(True)
  18.         self.SetTopWindow(fen)
  19.         return True
  20.  
  21. app = Monpp()
  22. app.MainLoop()
  23.  
Thanks !
Aug 23 '07 #4
bartonc
6,596 Expert 4TB
Good one! iewin is a special subclass of an ActiveX window. This (modified slightly) works on my system. You do have wxPython, then???
Expand|Select|Wrap|Line Numbers
  1. import wx
  2. if wx.Platform == '__WXMSW__':
  3.     import  wx.lib.iewin    as  iewin
  4.  
  5. class IE(wx.Frame):
  6.     def __init__(self,titre):
  7.         wx.Frame.__init__(self,parent=None, id=-1, title= titre , size=(300, 300) )
  8.  
  9.         self.ie = iewin.IEHtmlWindow(self, id=-1, style = wx.NO_FULL_REPAINT_ON_RESIZE )
  10.         self.current = "http://google.com/"  ### localhost ## won't work!!!
  11.         self.ie.LoadUrl(self.current)
  12.         return True
  13.  
  14. class Monpp(wx.App):
  15.     def OnInit(self):
  16.         fen = IE("zone")
  17.         fen.Show(True)
  18.         self.SetTopWindow(fen)
  19. ##        return True   ## Don't return a value here!!!
  20.  
  21. app = Monpp()
  22. app.MainLoop()
Aug 24 '07 #5
I changed my code so I have already the same errors:
Traceback (most recent call last):
File "D:\aaa\barre\test.py", line 20, in <module>
app = Monpp()
File "C:\Program Files\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7819, in __init__
self._BootstrapApp()
File "C:\Program Files\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7416, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "D:\aaa\barre\test.py", line 16, in OnInit
fen = IE("zone")
TypeError: __init__() should return None, not 'bool'
Aug 24 '07 #6
bartonc
6,596 Expert 4TB
I changed my code so I have already the same errors:
You mean you copied my post and all the errors went away, right?
Aug 24 '07 #7
Before the change i had the same error
Aug 24 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yi-Yu Chou | last post by:
Dear all, I need to integrate python, vtk and my own C++ object. Is it possible to do it by using python/C API ? Or there is a more efficient way to do it. Where can I find the examples taking...
7
by: Philippe C. Martin | last post by:
Hi, I am looking for the pros and cons as to how to integrate a Python module into a Windows native application. So far I have looked at 1) coding the C wrapper myself 2) using Pyrex 3)...
5
by: billiejoex | last post by:
Hi all. I was wondering if it ispossible to integrate C source in a python project. Best regards
5
by: Marcelo | last post by:
How can I integrate c++ programs inside a GUI java interface? I would like to get the results from a c++ program and integrate them inside a java GUI. thanks Marcelo
4
by: Alison | last post by:
Hello, All I am new to improving user interface. I have some questions for all the experts here who could help me out in this aspect. Now, I am in the early stage of developing a new user...
2
by: pdmountaineer | last post by:
hi, I am writing a C program and I would like to integrate some executables (.EXE files) from my C program. Is this possible and how should one do this exactly? kind regards
3
by: pdmountaineer | last post by:
hi, I would like to integrate some executable files (.EXE files) into a new C program. Is this possible and if so, how should it be done exactly??? kind regards
0
by: Christoph Zwerschke | last post by:
I just thought it would be nice to have a standardized place to put the accompanying documentation for Python site packages, and something like a hook to register documentation so that all...
0
by: couge | last post by:
Hi all, I met a weird problem when using scipy.integrate.odeint(). It is followed as: from scipy import * y=integrate.odeint(lambda y,t:sin(y)*y,y0=random.rand(N),t=arange(0,100)) If N>=...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.