og.level":"INFO", "log.entity.name":"my-service-name", "message":"test"}
This issue occurs when a new line is present in the message property of the
log i.e. on any error we have a message like "Traceback (most recent call
last):" whi
On Thu, Nov 11, 2021 at 5:00 PM Vijay Karavadra via Python-list
wrote:
>
> Hello Team,
>
> I'm trying to add logs in the new relic platform from a python application.
> For that, I've to add logs in a local file in a specific format which is
>
> '{"log.level":"%(levelname)s", "log.entity.name":"my
ge":"%(message)s"}'
This works fine in normal scenario and generates the below type of
line in log file and logs are added to new relic with expected
properties set like log level, entity name, message etc.
{"log.level":"INFO", "log.entity.name":
On Thursday, May 24, 2018 at 8:51:07 PM UTC-4, asa3...@gmail.com wrote:
> hi just seeing if there is a cleaner way to write this.
>
> s1= "kitti"
> s2= 'kitti'
> i= 3
> print(s1+ "\n" + "="*i + "^" + "\n" +s2)
>
> >
> kitti
> ===^
> kitti
more legible that way... thks
--
https://mail.python.
On Thu, 24 May 2018 17:50:53 -0700, asa32sd23 wrote:
> hi just seeing if there is a cleaner way to write this.
>
> s1= "kitti"
> s2= 'kitti'
> i= 3
> print(s1+ "\n" + "="*i + "^" + "\n" +s2)
s = "kitti"
i = 3
print(s, "="*i + "^", s, sep='\n')
--
Steve
--
https://mail.python.org/mailma
On 2018-05-25 01:50, asa32s...@gmail.com wrote:
hi just seeing if there is a cleaner way to write this.
s1= "kitti"
s2= 'kitti'
i= 3
print(s1+ "\n" + "="*i + "^" + "\n" +s2)
kitti
===^
kitti
When printing, I'd probably just go for something clear and simple:
print(s1)
print("=" * i + "
hi just seeing if there is a cleaner way to write this.
s1= "kitti"
s2= 'kitti'
i= 3
print(s1+ "\n" + "="*i + "^" + "\n" +s2)
>
kitti
===^
kitti
--
https://mail.python.org/mailman/listinfo/python-list
o terminal (pty) made
with pty.openempty and opened with os.fdopen. I noticed that we kept getting a bunch of
extra new line characters.
Duplicate thread, delayed by the vagaries of email and gateways. In
that thread, the problem has been happily resolved.
Any responses, please keep them on
On Thursday, 20 June 2013 11:20:20 UTC+1, Jonathan Harden wrote:
>
...SNIP
>
Sorry about the second post, it took a very long time to show up, long enough I
thought it had been lost.
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday, 20 June 2013 23:04:39 UTC+1, Peter Otten wrote:
> (2) Fiddle with terminal options, e. g.
>
> attrs = termios.tcgetattr(outSlave)
> attrs[1] = attrs[1] & (~termios.ONLCR) | termios.ONLRET
> termios.tcsetattr(outSlave, termios.TCSANOW, attrs)
>
> p = subprocess.Pop
pened with os.fdopen. I noticed
that we kept getting a bunch of extra new line characters.
This is all using python 2.6.4 in a centos6 environment.
After some investigation I realised we needed to use universal_newline support
so I enabled it for the Popen and specified the mode in the fdope
es "things" specified by the client program with each
> line of output. To do this we have been attaching stdout from the
> subprocess.Popen to a pseudo terminal (pty) made with pty.openempty and
> opened with os.fdopen. I noticed that we kept getting a bunch of extra new
&
each line of output. To
do this we have been attaching stdout from the subprocess.Popen to a pseudo
terminal (pty) made with pty.openempty and opened with os.fdopen. I noticed
that we kept getting a bunch of extra new line characters.
This is all using python 2.6.4 in a centos6 environment.
On Mar 19, 8:36 pm, Cathy James wrote:
> Dear All,
> I need some assistance with Python so that values in the "Name" field e.g.
> Murray - James - Leo can be labeled as:
>
> Murray
> James
> Leo
>
> with a new line replacing every dash.
>
> Basically
On 2013-03-19, Cathy James wrote:
> Dear All,
> I need some assistance with Python so that values in the "Name"
> field e.g. Murray - James - Leo can be labeled as:
>
> Murray
> James
> Leo
>
> with a new line replacing every dash.
>
> Basically
On 03/19/2013 11:36 AM, Cathy James wrote:
Dear All,
I need some assistance with Python so that values in the "Name" field e.g.
Murray - James - Leo can be labeled as:
Murray
James
Leo
with a new line replacing every dash.
Basically I need the equivalent of this VB in Python:
repla
On Tue, Mar 19, 2013 at 11:36 AM, Cathy James wrote:
> Dear All,
> I need some assistance with Python so that values in the "Name" field e.g.
> Murray - James - Leo can be labeled as:
>
> Murray
> James
> Leo
>
> with a new line replacing every dash.
>
&
Dear All,
I need some assistance with Python so that values in the "Name" field e.g.
Murray - James - Leo can be labeled as:
Murray
James
Leo
with a new line replacing every dash.
Basically I need the equivalent of this VB in Python:
replace ( [Name] , "-", vbNewLine)
I tr
t; Date: Sat, 5 Jan 2013 03:14:46 +1100
> Subject: Re: 'subprocess.check_output' extra new line?
> From: ros...@gmail.com
> To: python-list@python.org
>
> On Sat, Jan 5, 2013 at 2:50 AM, wrote:
> >
> > Hi
> >
> > I wonder if the additional new line cha
On Sat, Jan 5, 2013 at 2:50 AM, wrote:
>
> Hi
>
> I wonder if the additional new line charachter at the end of the standard
> output capture is on purpose with 'subprocess.check_output'?
>
>>>> subprocess.check_output([ 'cygpath', 'C:\\
Hi
I wonder if the additional new line charachter at the end of the standard
output capture is on purpose with 'subprocess.check_output'?
>>> subprocess.check_output([ 'cygpath', 'C:\\' ])
'/cygdrive/c\n'
If I do the same from the shell there
[EMAIL PROTECTED] wrote:
>
>I am creating a small gui using wxGlade and wxPython. I am using a
>radio button, and the text next to the options needs to be over two
>lines. I tried using a \n character, but it seems to get ignored.
>
>Looking around in the various wikis and the example code also
Hi.
I am creating a small gui using wxGlade and wxPython. I am using a
radio button, and the text next to the options needs to be over two
lines. I tried using a \n character, but it seems to get ignored.
Looking around in the various wikis and the example code also didn't
turn up anything.
tions
> > you have made it this far,just a few more questions then i will be asking
> > you
> > some")
> > I would actually like to add some text but it puts it all on one line.I
> > would
> > like to be able to tell it to start a new line.
>
>
>
nigel wrote:
> somebody recently showed me how to create a new line using \n which was
> great.The thing is when i am creating the programme the text i wish to add is
> quite long.and it ends up stretching the width of several pages,which i think
> looks quite messy.Would it be
somebody recently showed me how to create a new line using \n which was
great.The thing is when i am creating the programme the text i wish to add is
quite long.and it ends up stretching the width of several pages,which i think
looks quite messy.Would it be possible for some one to show me how
uestions then i will be asking you
> some")
> I would actually like to add some text but it puts it all on one line.I would
> like to be able to tell it to start a new line.
Just use \n in your string, e.g.:
w = Label(root, text="Line 1\nLine 2\nLine 3")
Or a triple-
t;)
w.pack()
root.mainloop()
The problem i have is where i have started to write some text"Congratulations
you have made it this far,just a few more questions then i will be asking you
some")
I would actually like to add some text but it puts it all on one line.I would
like to be able to te
John Salerno wrote:
> So I'm wondering, how do you all handle moving around in your code in
> cases like this? Is there some sort of consistency to these things that
> you can write rules for your text editor to know when to outdent? It
> doesn't seem like you can do this reliably, though.
Under
Ok, I'm putting those in my 'todo-list' ;-)
-- keep an eye open for future releases...
Cheers,
Fabio
Jorge Godoy wrote:
>Fabio Zadrozny <[EMAIL PROTECTED]> writes:
>
>
>
>>Which indenting features do you find missing? Note: 1.0.3 -- still unreleased
>>-- has implemented if / elif /else auto
Fabio Zadrozny <[EMAIL PROTECTED]> writes:
> Which indenting features do you find missing? Note: 1.0.3 -- still unreleased
> -- has implemented if / elif /else auto unindent...
The most basic one is not having my code moving forward with sucessive TABs
pressed. When I press TAB on Emacs it use a
Which indenting features do you find missing? Note: 1.0.3 -- still
unreleased -- has implemented if / elif /else auto unindent...
Jorge Godoy wrote:
>Mc Osten <[EMAIL PROTECTED]> writes:
>
>
>
>>Because I tried it and it just lacks a lot of functionality you get with
>>TextMate or Emacs. It is
Mc Osten <[EMAIL PROTECTED]> writes:
> Because I tried it and it just lacks a lot of functionality you get with
> TextMate or Emacs. It is quite stupid when indenting, just to name one.
This is the main motive I don't use PyDev with Eclipse... It is a lot more
stupid than python-mode on Emacs wi
indentation, because this
> makes it easy to outdent when I need to start a new line in column 1. I
> can press backspace once and move 4 spaces to the left.
>
> But I read in the PEP that spaces are recommended over tabs. If this is
> the case, it would involve pressing backspa
On Fri, 03 Mar 2006 16:48:11 GMT, John Salerno wrote:
> Why do you say that?
Because I tried it and it just lacks a lot of functionality you get with
TextMate or Emacs. It is quite stupid when indenting, just to name one.
--
USB Priests for only 10$
--
http://mail.python.org/mailman/listinfo/p
Mc Osten wrote:
> On Thu, 02 Mar 2006 18:58:50 GMT, John Salerno wrote:
>
>> I use UltraEdit right now, and it is possible to convert spaces and tabs
>> back and forth, but it's just an extra step.
>
> I wouldn't definitely suggest UltraEdit to code Python.
Why do you say that?
--
http://mail.
On Linux you can try out Scribes. It has a function to convert tabs to
spaces. Personally, I use tabs in all my projects.
http://scribes.sf.net/snippets.htm
http://scribes.sf.net/
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 02 Mar 2006 18:58:50 GMT, John Salerno wrote:
> I use UltraEdit right now, and it is possible to convert spaces and tabs
> back and forth, but it's just an extra step.
I wouldn't definitely suggest UltraEdit to code Python.
Probably you should try scite.
I'm using TextMate (but it's M
bs for my indentation, because this
> makes it easy to outdent when I need to start a new line in column 1. I
> can press backspace once and move 4 spaces to the left.
>
> But I read in the PEP that spaces are recommended over tabs. If this is
> the case, it would involve pressing
John Salerno wrote:
> But I read in the PEP that spaces are recommended over tabs. If this is
> the case, it would involve pressing backspace 4 times (or 8, etc.) to
> get back to column 1.
In the editor which I use, pressing the tab key indents the current line
under the previous one the firs
> One thing I like to do is use tabs for my indentation, because
> this makes it easy to outdent when I need to start a new line
> in column 1. I can press backspace once and move 4 spaces to
> the left.
Zeus has a Smart Backspace feature (configurable on or off) where
by it will tr
John,
> This is a real small point
No point is small when you apply it hundreds of times a day. I spent
quite a bit of time on this element and ended up allowing conversion
from tabs to spaces and the reverse. Who knows what you'll find in the
world of ASCII.
Historically, Tabs were stops on th
> I use Vim, use spaces, and have no problems. It has a
> shorttabstop option, which causes backspace to backspace
> to the preceding multiple of spaces when the
> curser is after a set of spaces at the beginning of the
> line. It feels like I'm using tabs, but I'm not.
In addition, within in
On Thu, 02 Mar 2006 18:39:55 GMT
John Salerno <[EMAIL PROTECTED]> wrote:
> But I read in the PEP that spaces are recommended over tabs. If this is
> the case, it would involve pressing backspace 4 times (or 8, etc.) to
> get back to column 1.
>
> So I'm wondering, how do you all handle moving ar
Bill Scherer wrote:
> John Salerno wrote:
>
>> I use UltraEdit right now, and it is possible to convert spaces and
>> tabs back and forth, but it's just an extra step. I was thinking about
>> trying vim, as I've heard it's easier to learn than emacs.
>>
>>
> Absolutely. It's also easier to lea
Paul McNett wrote:
> That said, you should be able to tell your editor how to behave in the
> indent/unindent case, no matter whether you use tabs or spaces. If not,
> time to switch editors! ;)
I definitely can, I'm just a little unsure about what the special
outdenting cases might be. The wa
Carl Banks wrote:
> You wouldn't know if Ultraedit has some kind of hook mechanism (whereby
> it can execute a macro or script or something upon loading/saving).
> That could solve your problem. Obviously, having to manually convert
> isn't too helpful.
I'll have to check on that. I know I can d
John Salerno wrote:
>I use UltraEdit right now, and it is possible to convert spaces and tabs
>back and forth, but it's just an extra step. I was thinking about trying
>vim, as I've heard it's easier to learn than emacs.
>
>
Absolutely. It's also easier to learn to ride a Huffy than a Schwinn,
John Salerno wrote:
> Carl Banks wrote:
> > John Salerno wrote:
> >> So I'm wondering, how do you all handle moving around in your code in
> >> cases like this? Is there some sort of consistency to these things that
> >> you can write rules for your text editor to know when to outdent? It
> >> doe
Carl Banks wrote:
> John Salerno wrote:
>> So I'm wondering, how do you all handle moving around in your code in
>> cases like this? Is there some sort of consistency to these things that
>> you can write rules for your text editor to know when to outdent? It
>> doesn't seem like you can do this re
John Salerno wrote:
> So I'm wondering, how do you all handle moving around in your code in
> cases like this? Is there some sort of consistency to these things that
> you can write rules for your text editor to know when to outdent? It
> doesn't seem like you can do this reliably, though.
Emacs,
John Salerno wrote:
> But I read in the PEP that spaces are recommended over tabs. If this is
If you like tabs, stick with tabs. There isn't any reason to use spaces
unless your boss is demanding it. Tabs are the slightly better choice,
in my humble opinion.
That said, you should be able to te
ndentation, because this
> makes it easy to outdent when I need to start a new line in column 1. I
> can press backspace once and move 4 spaces to the left.
>
> But I read in the PEP that spaces are recommended over tabs. If this is
> the case, it would involve pressing backspace 4 ti
outdent when I need to start a new line in column 1. I
can press backspace once and move 4 spaces to the left.
But I read in the PEP that spaces are recommended over tabs. If this is
the case, it would involve pressing backspace 4 times (or 8, etc.) to
get back to column 1.
So I'm wonderi
Kuljo wrote:
> Kuljo wrote:
>
>> Dear friends
>> I'm so sorry to bore you with this trivial problem. Allthou: I have
>> string having 0x0a as new line, but I should have \n instead.
>> How should I solve it?
>> I've tried
>>>>>text_
Kuljo wrote:
> Kuljo wrote:
>>I'm so sorry to bore you with this trivial problem. Allthou: I have string
>>having 0x0a as new line, but I should have \n instead.
> I have found this in the meantime:
>>>>nl="\\"+"n"
Note: this is unnecessa
Kuljo wrote:
> Dear friends
> I'm so sorry to bore you with this trivial problem. Allthou: I have string
> having 0x0a as new line, but I should have \n instead.
> How should I solve it?
> I've tried
>>>>text_new=tex_old.replace(str(0x0a), '\n
Kuljo wrote:
> Dear friends
> I'm so sorry to bore you with this trivial problem. Allthou: I have string
> having 0x0a as new line, but I should have \n instead.
In [9]: '\x0a'
Out[9]: '\n'
They're the same thing.
--
Robert Kern
[EMAIL PROTECTED]
"
"Kuljo" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Dear friends
> I'm so sorry to bore you with this trivial problem. Allthou: I have string
> having 0x0a as new line, but I should have \n instead.
> How should I solve it?
> I'v
Dear friends
I'm so sorry to bore you with this trivial problem. Allthou: I have string
having 0x0a as new line, but I should have \n instead.
How should I solve it?
I've tried
>>>text_new=tex_old.replace(str(0x0a), '\n')
and other things, but none of them worke
On Thu, 21 Apr 2005 21:34:03 +0100, "ionic" <[EMAIL PROTECTED]> wrote:
Open a text editor and write your code. Save the file with a .py
extension, i.e., myprogram.py. From the command line type 'python
myfile.py'
Dan
>
>Ok sorry guys,
>
>using the python gui, if i hit the 'enter' key python ju
ionic wrote:
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
try shift + enter
/Esben
--
http://mail.python.org/mailman/listinfo/python-list
Got it now thanks all
--
"It's all in fun or life isn't worth it!"
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> okay, you type your code in idle, and run your code by hitting the F5
> key?
>
--
http://mail.python.org/mailman/listinfo/python-list
ionic said unto the world upon 2005-04-21 16:34:
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
How do i type several lines without executing after each line?
Cheers
A bit more precision in your question
okay, you type your code in idle, and run your code by hitting the F5
key?
--
http://mail.python.org/mailman/listinfo/python-list
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
How do i type several lines without executing after each line?
Cheers
--
"It's all in fun or life isn't worth it!"
"James Stroud" <[EMAIL PROTECTED]> w
"ionic" wrote:
This is probably going to sound very dull but, how do you get to the next
line after youve finished typing the first line?
Thanks in advance
if you don't know how to get a new line, how did you write that message?
--
http://mail.python.org/mailman/listinfo/python-list
In the absence of any context to this question: Hit the button that says
"Enter".
James
On Thursday 21 April 2005 01:15 pm, ionic wrote:
> Hi all
>
> This is probably going to sound very dull but, how do you get to the next
> line after youve finished typing the first line?
>
> Thanks in advance
Hi all
This is probably going to sound very dull but, how do you get to the next
line after youve finished typing the first line?
Thanks in advance
--
"It's all in fun or life isn't worth it!"
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 30 Jan 2005 20:21:49 -0800, rasdj wrote:
> Thanks Jeremy, something like this would work:
>
> try:
> lines = [ line.replace(",\n;", ")\n;") for line in input ]
>
> If I could figgure out how to:
>
> IF ':' in line
> READ next line in
> lines = [ line.replace(",\n;", ")\n;") for line in
Thanks Jeremy, something like this would work:
try:
lines = [ line.replace(",\n;", ")\n;") for line in input ]
If I could figgure out how to:
IF ':' in line
READ next line in
lines = [ line.replace(",\n;", ")\n;") for line in input ]
output.write(str.join('', lines))
because there are lots of
On Sun, 30 Jan 2005 19:42:22 -0800, rasdj wrote:
> I have a lot of SQL to convert to postgres from oracle. I have most of the
> problems worked out except for this last bit. Many of my tables need the
> last comma replaced with a close parenthesis - they look like this:
>
> create table schema.ta
I have a lot of SQL to convert to postgres from oracle. I have most of
the problems worked out except for this last bit. Many of my tables
need the last comma replaced with a close parenthesis - they look like
this:
create table schema.table (
FLD000 NUMERIC(10,0) NOT NULL,
FLD001 CHAR(3) NOT NULL
73 matches
Mail list logo