[lttng-dev] [PATCH babeltrace 2/2] CTF writer: Add function to add an integer environment field value

2016-06-18 Thread Simon Marchi
From the Python API, it's only possible to set an environment field value as a string (whatever you pass, it gets stringified). This patch adds a function to the CTF writer to allow setting an integer (int64_t) environment field, an then exposes it in the Python interface. The Python method Write

Re: [lttng-dev] [PATCH babeltrace 2/2] CTF writer: Add function to add an integer environment field value

2016-06-18 Thread Philippe Proulx
On Sat, Jun 18, 2016 at 10:54 PM, Simon Marchi wrote: > > From the Python API, it's only possible to set an environment field > value as a string (whatever you pass, it gets stringified). This patch > adds a function to the CTF writer to allow setting an integer (int64_t) > environment field, an

Re: [lttng-dev] [PATCH babeltrace 2/2] CTF writer: Add function to add an integer environment field value

2016-06-19 Thread Simon Marchi
On 2016-06-19 01:38, Philippe Proulx wrote: Thanks for this, it's a great little addition. Thanks for the feedback! Example: w.add_environment_field("foo", 2) Not directly related, but an interface like `os.environ` would be nice here I think: w.env["foo"] = 2 Sure, not today th

Re: [lttng-dev] [PATCH babeltrace 2/2] CTF writer: Add function to add an integer environment field value

2016-06-19 Thread Philippe Proulx
On Sun, Jun 19, 2016 at 9:07 AM, Simon Marchi wrote: > On 2016-06-19 01:38, Philippe Proulx wrote: >> >> Thanks for this, it's a great little addition. > > > Thanks for the feedback! > >>> Example: >>> >>> w.add_environment_field("foo", 2) >> >> >> Not directly related, but an interface like `os