473,657 Members | 2,634 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Integrate IE in python program

19 New Member
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 3257
ilikepython
844 Recognized Expert Contributor
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 Recognized Expert Expert
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
analfabete
19 New Member
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 Recognized Expert Expert
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
analfabete
19 New Member
I changed my code so I have already the same errors:
Traceback (most recent call last):
File "D:\aaa\barre\t est.py", line 20, in <module>
app = Monpp()
File "C:\Program Files\Python25\ lib\site-packages\wx-2.8-msw-unicode\wx\_cor e.py", line 7819, in __init__
self._Bootstrap App()
File "C:\Program Files\Python25\ lib\site-packages\wx-2.8-msw-unicode\wx\_cor e.py", line 7416, in _BootstrapApp
return _core_.PyApp__B ootstrapApp(*ar gs, **kwargs)
File "D:\aaa\barre\t est.py", line 16, in OnInit
fen = IE("zone")
TypeError: __init__() should return None, not 'bool'
Aug 24 '07 #6
bartonc
6,596 Recognized Expert Expert
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
analfabete
19 New Member
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
2387
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 about that ? Thanks in advance !!! Best, YY
7
2235
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) go for pywin32 and COM
5
1374
by: billiejoex | last post by:
Hi all. I was wondering if it ispossible to integrate C source in a python project. Best regards
5
2644
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
2947
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 inteface for a computation intensive application program which has a character-based user interface now. The original program was written in C. For the new graphical interface, I am thinking of using C#. But I am not sure whether it is feasible or too...
2
2214
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
2662
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
933
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 installed site packages can install links to their documentation in the Python Documentation Index. Are there already any thoughts or standards on how to integrate/append documentation of later installed site packages to the standard Python...
0
1802
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>= 73300 or N<=70400, it works well. Yet, within the range(70400,73300), it goes wrong with a error message "MemoryError". I am very confused about that. My python version is "Python2.4.3", scipy version is "scipy 0.5.0.2033". By the way, my computer's...
0
8407
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8612
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.