Re: paste text with newlines into raw_input?

2007-05-31 Thread BartlebyScrivener
Hi, I'm going to post this here in case somebody else searches for an example Tkinter Text Widget for entering multiline text. I don't like GUI and don't even quite understand how it works, but it seems to work. In my case it's part of a program for pasting a quote from the clipboard into a MySQL

Re: paste text with newlines into raw_input?

2007-05-31 Thread BartlebyScrivener
Thanks, I think I need a Tkinter text entry widget, but it will take me a week to learn how to set it up. I'll report back. rick -- http://mail.python.org/mailman/listinfo/python-list

Re: paste text with newlines into raw_input?

2007-05-30 Thread half . italian
On May 30, 2:04 pm, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > Using Python on Debian Etch. > > What is the best way to paste a block of text in at the command > prompt. > > I'm trying something like: > > Quote = raw_input("Paste quote here: ") > > Which works great for one line of text with a

Re: paste text with newlines into raw_input?

2007-05-30 Thread Daniel Gee
#!/usr/bin/python print "paste quote:" emptycount = 0 lines = [] while emptycount < 2: t = raw_input() if len(t) == 0: emptycount +=1 else: emptycount=0 lines.append(t) lines.append("\n") quote = " ".join(lines[:-3])

paste text with newlines into raw_input?

2007-05-30 Thread BartlebyScrivener
Using Python on Debian Etch. What is the best way to paste a block of text in at the command prompt. I'm trying something like: Quote = raw_input("Paste quote here: ") Which works great for one line of text with a single newline. It gets stripped. Okay. Is there a way to paste in a block of te