Re: Breaking new relic format on a new line character in FileHandler appender

2021-11-11 Thread MRAB
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

Re: Breaking new relic format on a new line character in FileHandler appender

2021-11-10 Thread Chris Angelico
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

Breaking new relic format on a new line character in FileHandler appender

2021-11-10 Thread Vijay Karavadra via Python-list
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":

Re: cleaner version of variable, new line

2018-05-24 Thread asa32sd23
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.

Re: cleaner version of variable, new line

2018-05-24 Thread Steven D'Aprano
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

Re: cleaner version of variable, new line

2018-05-24 Thread MRAB
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 + "

cleaner version of variable, new line

2018-05-24 Thread asa32sd23
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

Re: New line conversion with Popen attached to a pty

2013-06-21 Thread Dave Angel
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

Re: New line conversion with Popen attached to a pty

2013-06-21 Thread jfharden
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

Re: New line conversion with Popen attached to a pty

2013-06-21 Thread jfharden
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

New line conversion with Popen attached to a pty

2013-06-21 Thread Jonathan Harden
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

Re: New line conversion with Popen attached to a pty

2013-06-20 Thread Peter Otten
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 &

New line conversion with Popen attached to a pty

2013-06-20 Thread jfharden
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.

Re: Replace "dash" values in a field with new line- VB equivalent of Python

2013-03-19 Thread rusi
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

Re: Replace "dash" values in a field with new line- VB equivalent of Python

2013-03-19 Thread Neil Cerutti
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

Re: Replace "dash" values in a field with new line- VB equivalent of Python

2013-03-19 Thread Dave Angel
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

Re: Replace "dash" values in a field with new line- VB equivalent of Python

2013-03-19 Thread Joel Goldstick
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. > &

Replace "dash" values in a field with new line- VB equivalent of Python

2013-03-19 Thread Cathy James
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

RE: 'subprocess.check_output' extra new line?

2013-01-04 Thread sbremal
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

Re: 'subprocess.check_output' extra new line?

2013-01-04 Thread Chris Angelico
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:\\&#x

'subprocess.check_output' extra new line?

2013-01-04 Thread sbremal
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

Re: wxpython - new line in radiobutton's label?

2006-04-30 Thread Tim Roberts
[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

wxpython - new line in radiobutton's label?

2006-04-29 Thread nuffnough
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.

Re: adding a new line of text in Tk

2006-03-27 Thread Fredrik Lundh
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. > > >

Re: interactive programme (add a new line in Tk)

2006-03-26 Thread James Stroud
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

interactive programme (add a new line in Tk)

2006-03-26 Thread nigel
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

Re: adding a new line of text in Tk

2006-03-26 Thread Ben Cartwright
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-

adding a new line of text in Tk

2006-03-25 Thread nigel
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

Re: how do you move to a new line in your text editor?

2006-03-06 Thread Xavier Morel
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

Re: how do you move to a new line in your text editor?

2006-03-06 Thread Fabio Zadrozny
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

Re: how do you move to a new line in your text editor?

2006-03-06 Thread Jorge Godoy
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

Re: how do you move to a new line in your text editor?

2006-03-06 Thread Fabio Zadrozny
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread Jorge Godoy
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread John Salerno
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread Mc Osten
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread John Salerno
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.

Re: how do you move to a new line in your text editor?

2006-03-03 Thread Mystilleef
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread Mc Osten
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread Eric Deveaud
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

Re: how do you move to a new line in your text editor?

2006-03-03 Thread Duncan Booth
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread jussij
> 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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Sudden Disruption
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Tim Chase
> 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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Michael Ekstrand
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread John Salerno
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread John Salerno
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread John Salerno
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Bill Scherer
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,

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Carl Banks
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread John Salerno
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Carl Banks
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,

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Paul McNett
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

Re: how do you move to a new line in your text editor?

2006-03-02 Thread Bill Scherer
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

how do you move to a new line in your text editor?

2006-03-02 Thread John Salerno
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

Re: new line

2005-08-31 Thread Kuljo
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_

Re: new line

2005-08-29 Thread Peter Hansen
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

Re: new line

2005-08-29 Thread Kuljo
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

Re: new line

2005-08-29 Thread Robert Kern
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] "

Re: new line

2005-08-29 Thread Claudio Grondi
"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

new line

2005-08-29 Thread Kuljo
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

Re: New line

2005-04-21 Thread Dan
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

Re: New line

2005-04-21 Thread Esben Pedersen
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

Re: New line

2005-04-21 Thread ionic
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

Re: New line

2005-04-21 Thread Brian van den Broek
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

Re: New line

2005-04-21 Thread [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

Re: New line

2005-04-21 Thread ionic
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

Re: New line

2005-04-21 Thread Fredrik Lundh
"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

Re: New line

2005-04-21 Thread James Stroud
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

New line

2005-04-21 Thread ionic
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

Re: next line, new line

2005-01-30 Thread Jeremy Bowers
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

Re: next line, new line

2005-01-30 Thread rasdj
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

Re: next line, new line

2005-01-30 Thread Jeremy Bowers
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

next line, new line

2005-01-30 Thread rasdj
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