Here's the scenario:
I am writing a program that will run inside a Telit HE910 GSM module, which has an on-board python interpreter. I would like my program to be able to read and store some parameters inside a configuration file onboard the GSM module. The file may occasionally be transferred into a separate machine for viewing and changing, so it should be both machine-readable and writeable on multiple platforms.
So far, there are multiple solutions for this issue. Here's the kicker though:
- The GSM module does not have any python modules for parsing / writing configuration files (so I can't simply use
import yaml
,import json
,import configparser
, or evenimport csv
) - The GSM module does not allow the creation of subdirectories. From my limited understanding, this prevents me from simply dumping the contents of say, the PyYAML python module into the GSM module and calling it from my program.
I found a similar question here, but I don't even know where in the GSM module's filesystem I am. import os
doesn't seem to work, which is strange (contrary to documentation).
I know I can use a Python file to store some read-only configurations, but I also want to be able to write to the config file (redesigning the system to avoid this is really undesirable).
I think my best bet so far seems to be to write a simple csv parser / writer myself, unless someone has a better idea (or know how to utilise Python modules without any subdirectories).
PS: The documentation below has a list of supported modules. None of the config-related modules seem to be available however.
- GSM Module homepage: http://www.telit.com/en/products/umts-hsdpa.php?p_ac=show&p=108
- Python interpreter manual : http://www.telit.com/module/infopool/download.php?id=4378
EDIT: I should have mentioned, the configuration file needs to be readable / writeable from a c# .NET application, not another python interpreter on the desktop.