Use wificonfig.py without QT.

Asked by Thierry FR

Hi All,

I needed to be able to configure the printer's wifi through the console usb port.
Here are the changes I made:

File added :
/usr/share/hplip/wificmd.py => https://pastebin.com/jP4P46sp

Modified file :
////////////////////////////////////////////// BEGIN /////////////////////////////////////////////////////////////
--- a/usr/share/hplip/wificonfig.py 2020-03-11 15:18:14.000000000 +0100
+++ b/usr/share/hplip/wificonfig.py 2020-09-30 14:19:37.721353738 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 #
 # (c) Copyright 2003-2015 HP Development Company, L.P.
@@ -32,7 +32,7 @@
 import time
 import operator
 import os
-
+from wificmd import *
 # Local
 from base.g import *
 from base import device, utils, maint, tui, module
@@ -61,8 +61,9 @@

     device_uri = None
     if not utils.canEnterGUIMode4():
- log.error("%s -u/--gui requires Qt4 GUI support. Exiting." % __mod__)
- sys.exit(1)
+ log.warning("%s -u/--gui requires Qt4 GUI support. Switching to console mode:" % __mod__)
+ WifiCmd()
+ sys.exit(0)

     # try:
     # from PyQt4.QtGui import QApplication
////////////////////////////////////////////// END /////////////////////////////////////////////////////////////

Thierry

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
brian_p
Solved:
Last query:
Last reply:
Revision history for this message
Thierry FR (thierry-f) said :
#1

How do I submit a patch to HPLIP?

Revision history for this message
Best brian_p (claremont102) said :
#2

> How do I submit a patch to HPLIP?

Hello Thierry,

Go here:

  https://bugs.launchpad.net/hplip/+bugs

Cheers,

Brian.

Revision history for this message
Thierry FR (thierry-f) said :
#3

Thanks brian_p, that solved my question.