|
by: Matthew Barnes |
last post by:
I'm considering submitting a patch for Python 2.4 to allow environment
variable expansion in ConfigParser files. The use cases for this
should be obvious. I'd like to be able to specify something like the
following in a configuration file:
data_file=${HOME}/mydata.dat
....(where HOME=/home/matt) and have ConfigParser automatically expand
it to:
|
by: Gert Van den Eynde |
last post by:
Hi all,
Could you give me some pointers on how to parse a text input file in C++?
Most will be config-file style input (keyword = data), but some maybe
'structures' like material{ name = n, position = x,y,z}.
Things that I have in my mind now are: 1) simply reading in strings,
analysing the strings myself, 2) writing a lexer/parser, 3) xml parsing, 4)
line by line and RegExp.
|
by: ralphNOSPAM |
last post by:
Is there a function or otherwise some way to pull out the target text
within an XML tag?
For example, in the XML tag below, I want to pull out 'CALIFORNIA'.
<txtNameUSState>CALIFORNIA</txtNameUSState>
|
by: John Doe |
last post by:
I've been doing some reading/research on parsing simple configuration
files through C, and have heard various opinions on the matter. I'd like
to solicit some opinions and design criteria (as well as "gotchas") for
doing this.
I'm implementing a program that needs to read a standard configuration
file, in key=value pairs for starters (though I'm open to other ideas).
Basically it would be no more than about 20 lines total, one key per...
|
by: Mantorok Redgormor |
last post by:
If I am parsing a config file that uses '#' for comments and the
config file itself is 1640 bytes, and the format is VARIABLE=VALUE, is
it recommended to use
a) fgetc (parse a character at a time)
b) fgets (read in blocks of whatever size)
c) fread (get the size of the file and fread the entire thing into
memory)
and when would it be appropriate to use either a, b, or c?
|
|
by: Marc Dubois |
last post by:
hi,
is it possible to parse an XML file in C so that i can fulfill these
requirements :
1) replace all "<" and ">" signs inside the body of tag by a space, e.g. :
Example 1:
<fooblabla < bla </foo>
becomes
<fooblabla bla </foo>
|
by: nedelm |
last post by:
My problem's with parsing. I have this (arbitrary, from a file)
string, lets
say:
"Directory: /file{File:/filename(/size) }"
I would like it to behave similar to LaTeX. I parse it, and then I
write it
out for diferent variables, like:
|
by: Chris Carlen |
last post by:
Hi:
Having completed enough serial driver code for a TMS320F2812
microcontroller to talk to a terminal, I am now trying different
approaches to command interpretation.
I have a very simple command set consisting of several single letter
commands which take no arguments. A few additional single letter
commands take arguments:
|
by: amjadcsu |
last post by:
I am a newbie in python
I am trying to parse a xml file and write its content in a txt file.
The txt contains null elements. Any reason what iam doing wrong here
Here is the code that i wrote
import sys,os
import xml.sax
import xml.sax.handler
|
by: Damon Getsman |
last post by:
Okay so I'm writing a script in python right now as a dirty fix for a
problem we're having at work.. Unfortunately this is the first really
non-trivial script that I've had to work with in python and the book
that I have on it really kind of sucks.
I'm having an issue parsing lines of 'last' output that I have stored
in a /tmp file. The first time it does a .readline() I get the full
line of output, which I'm then able to split() and...
|
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...
|
|
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,...
|
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...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|