Changeset 919:2ce8ca39525b for src/mlx/gui/cef.py
- Timestamp:
- 03/24/19 08:15:59 (5 years ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/cef.py
r915 r919 1 from common import *1 from .common import * 2 2 3 3 from mlx.util import secondaryInstallation … … 10 10 import os 11 11 import re 12 import thread12 import _thread 13 13 import threading 14 14 import tempfile 15 15 import traceback 16 import urllib 216 import urllib.request, urllib.error, urllib.parse 17 17 from lxml import etree 18 from StringIOimport StringIO18 from io import StringIO 19 19 import lxml.html 20 20 … … 115 115 """Called when a page has been loaded in the SimBrief browser.""" 116 116 url = frame.GetUrl() 117 print "gui.cef.SimBriefHandler._onLoadEnd", httpCode, url117 print("gui.cef.SimBriefHandler._onLoadEnd", httpCode, url) 118 118 if httpCode>=300: 119 119 self._updateProgress(self._lastProgress, … … 127 127 128 128 js = "form=document.getElementById(\"sbapiform\");" 129 for (name, value) in self._plan.ite ritems():129 for (name, value) in self._plan.items(): 130 130 js += "form." + name + ".value=\"" + value + "\";" 131 for (name, value) in SimBriefHandler._querySettings.ite ritems():131 for (name, value) in SimBriefHandler._querySettings.items(): 132 132 if isinstance(value, bool): 133 133 js += "form." + name + ".checked=" + \ … … 175 175 176 176 thread = threading.Thread(target = self._getResults, args = (link,)) 177 thread.daemon = True178 thread.start()177 _thread.daemon = True 178 _thread.start() 179 179 else: 180 180 self._updateProgress(SIMBRIEF_PROGRESS_RETRIEVING_BRIEFING, … … 219 219 220 220 # Obtaining the xml 221 response = urllib 2.urlopen(link)221 response = urllib.request.urlopen(link) 222 222 xmlContent = response.read() 223 223 # Processing xml … … 242 242 imageLinks.append(imageLink[2]) 243 243 flightInfo["image_links"] = imageLinks 244 print( sorted(availableInfo.keys()))244 print((sorted(availableInfo.keys()))) 245 245 htmlFilePath = "simbrief_plan.html" if self._htmlFilePath is None \ 246 246 else self._htmlFilePath … … 266 266 def _initializeCEF(args, initializedCallback): 267 267 """Perform the actual initialization of CEF using the given arguments.""" 268 print "Initializing CEF with args:", args268 print("Initializing CEF with args:", args) 269 269 270 270 settings = { … … 290 290 switches[arg[2:assignIndex]] = arg[assignIndex+1:] 291 291 else: 292 print "Unhandled switch", arg292 print("Unhandled switch", arg) 293 293 294 294 cefpython.Initialize(settings, switches) … … 296 296 gobject.timeout_add(10, _handleTimeout) 297 297 298 print "Initialized, executing callback..."298 print("Initialized, executing callback...") 299 299 initializedCallback() 300 300 … … 322 322 window = container.get_window() 323 323 if window is None: 324 print "mlx.gui.cef.startInContainer: no window found!"324 print("mlx.gui.cef.startInContainer: no window found!") 325 325 windowID = None 326 326 else:
Note:
See TracChangeset
for help on using the changeset viewer.