Python Forum
Updating a config file [solved]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating a config file [solved]
#4
I'm not sure I understand the environment, but I think you can modify them before you hand the config off to the client. Are you using it something like this?
from mqtt_as import MQTTClient, config
...
client = MQTTClient(config)
If so, you can modify them before handing to the client.

from mqtt_as import MQTTClient, config

ssid, password = get_from_wifimgr() 
config["ssid"] = ssid
config["ssid_pw"] = password
client = MQTTClient(config)
Reply


Messages In This Thread
Updating a config file [solved] - by ebolisa - Nov-03-2021, 11:49 PM
RE: Updating a config file - by bowlofred - Nov-04-2021, 12:30 AM
RE: Updating a config file - by ebolisa - Nov-04-2021, 12:35 AM
RE: Updating a config file - by bowlofred - Nov-04-2021, 12:53 AM
RE: Updating a config file - by ebolisa - Nov-04-2021, 08:13 AM
RE: Updating a config file - by Gribouillis - Nov-04-2021, 09:18 AM
RE: Updating a config file - by ebolisa - Nov-04-2021, 09:31 AM
RE: Updating a config file - by ebolisa - Nov-04-2021, 09:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python openyxl not updating Excel file MrBean12 1 314 Mar-03-2024, 12:16 AM
Last Post: MrBean12
Question [SOLVED] Correct way to convert file from cp-1252 to utf-8? Winfried 8 791 Feb-29-2024, 12:30 AM
Last Post: Winfried
  Updating sharepoint excel file odd results cubangt 1 820 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  Loop through json file and reset values [SOLVED] AlphaInc 2 2,092 Apr-06-2023, 11:15 AM
Last Post: AlphaInc
  [Solved by deanhystad] Create a zip file using zipfile library DZ_Galaxy 2 1,151 Aug-17-2022, 04:57 PM
Last Post: DZ_Galaxy
  Initializing, reading and updating a large JSON file medatib531 0 1,767 Mar-10-2022, 07:58 PM
Last Post: medatib531
  |SOLVED] Glob JPGs, read EXIF, update file timestamp? Winfried 5 2,470 Oct-21-2021, 03:29 AM
Last Post: buran
  [SOLVED] Read text file from some point till EOF? Winfried 1 1,949 Oct-10-2021, 10:29 PM
Last Post: Winfried
  [SOLVED] Input parameter: Single file or glob? Winfried 0 1,579 Sep-10-2021, 11:54 AM
Last Post: Winfried
Thumbs Up [SOLVED] Find last occurence of pattern in text file? Winfried 4 4,381 Aug-13-2021, 08:21 PM
Last Post: Winfried

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020