Re: Print Function

2012-09-22 Thread Walter Hurry
On Sat, 22 Sep 2012 01:26:43 +, Steven D'Aprano wrote: > On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: > >> I am currently using Python 3.2.3 . WHen I use the print function by >> typing print "Game Over" , it mentions " SyntaxError : inval

Re: Print Function

2012-09-22 Thread Mark Lawrence
On 22/09/2012 02:26, Steven D'Aprano wrote: On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the prob

Re: Print Function

2012-09-21 Thread Steven D'Aprano
On Fri, 21 Sep 2012 13:20:09 -0700, gengyangcai wrote: > I am currently using Python 3.2.3 . WHen I use the print function by > typing print "Game Over" , it mentions " SyntaxError : invalid syntax > ". Any ideas on what the problem is and how to resolve it ? N

Re: Print Function

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 3:11 PM, Alister wrote: > On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote: > >> On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown >> wrote: >>> Go away troll! >> >> Troll? It looked like a sincere question to me. > > but one that page 1 of the documentation would answer.

Re: Print Function

2012-09-21 Thread John Gordon
In gengyang...@gmail.com writes: > I am currently using Python 3.2.3 . WHen I use the print function by > typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". > Any ideas on what the problem is and how to resolve it ? Thanks a lot . In python

Re: Print Function

2012-09-21 Thread Alister
On Fri, 21 Sep 2012 14:54:14 -0600, Ian Kelly wrote: > On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown > wrote: >> Go away troll! > > Troll? It looked like a sincere question to me. but one that page 1 of the documentation would answer. -- Waste not, get your budget cut next year. -- http:/

Re: Print Function

2012-09-21 Thread Ian Kelly
On Fri, Sep 21, 2012 at 2:28 PM, Rodrick Brown wrote: > Go away troll! Troll? It looked like a sincere question to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Print Function

2012-09-21 Thread Rodrick Brown
Go away troll! Sent from my iPhone On Sep 21, 2012, at 4:27 PM, "gengyang...@gmail.com" wrote: > Hello , > > > I am currently using Python 3.2.3 . WHen I use the print function by typing > print "Game Over" , it mentions " SyntaxError : invalid syntax

Re: Print Function

2012-09-21 Thread Tarek Ziadé
On 9/21/12 10:20 PM, gengyang...@gmail.com wrote: Hello , I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a

Print Function

2012-09-21 Thread gengyangcai
Hello , I am currently using Python 3.2.3 . WHen I use the print function by typing print "Game Over" , it mentions " SyntaxError : invalid syntax ". Any ideas on what the problem is and how to resolve it ? Thanks a lot . GengYang -- http://mail.python.org/mailman/listinfo/python-list

RE: How to print something only if it exists?

2012-09-13 Thread Prasad, Ramit
tinn...@isbd.co.uk wrote: > I want to print a series of list elements some of which may not exist, > e.g. I have a line:- > > print day, fld[1], balance, fld[2] > > fld[2] doesn't always exist (fld is the result of a split) so the > print fails when it isn't

Re: PYODBC Print Cursor Output Question

2012-09-10 Thread MRAB
n searching for several hours but no joy... Thanks. Jamie === cursor.execute("select * from project") row = cursor.fetchone() if row: print row I'd like to actually see SQL output here?) Try this: >>> results

PYODBC Print Cursor Output Question

2012-09-10 Thread james simpson
Thanks. Jamie === >>> cursor.execute("select * from project") row = cursor.fetchone() if row: print row I'd like to actually see SQL output here?) -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-10 Thread Terry Reedy
On 9/10/2012 2:33 AM, Dwight Hutto wrote: On Sun, Sep 9, 2012 at 10:41 AM, Ian Foote mailto:i...@feete.org>> wrote: On 09/09/12 14:23, iMath wrote: 在 2012年3月26日星期一UTC+8下午7时45分26秒,__iMath写道: I know the print statement produces the same result when b

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-10 Thread Benjamin Kaplan
On Sun, Sep 9, 2012 at 11:33 PM, Dwight Hutto wrote: > > > On Sun, Sep 9, 2012 at 10:41 AM, Ian Foote wrote: >> >> On 09/09/12 14:23, iMath wrote: >>> >>> 在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: >>>> >>>> I know the print

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-09 Thread Dwight Hutto
On Sun, Sep 9, 2012 at 10:41 AM, Ian Foote wrote: > On 09/09/12 14:23, iMath wrote: > >> 在 2012年3月26日星期一UTC+8下午7时45分26秒,**iMath写道: >> >>> I know the print statement produces the same result when both of these >>> two instructions are executed ,I just

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-09 Thread Ian Foote
On 09/09/12 14:23, iMath wrote: 在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: I know the print statement produces the same result when both of these two instructions are executed ,I just want to know Is there any difference between print 3 and print '3' in Python ? thx everyone The dif

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-09 Thread iMath
在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: > I know the print statement produces the same result when both of these two > instructions are executed ,I just want to know Is there any difference > between print 3 and print '3' in Python ? thx everyone -- http://mail.python.o

Re: How to print something only if it exists?

2012-09-08 Thread Dave Angel
> > Yes, a I said a simple len(fld) will tell me if fld[2] 'exists' but it > gets messy if I have to do it in the middle of the print sequence. > > >> But perhaps there's another approach. Just what DO you want to print if >> fld(1) exists, but fld(2) does

Re: How to print something only if it exists?

2012-09-08 Thread tinnews
sts' but it gets messy if I have to do it in the middle of the print sequence. > But perhaps there's another approach. Just what DO you want to print if > fld(1) exists, but fld(2) does not? Do you still want to print out day, > fld(1), and balance? Or do you want to skip b

Re: How to print something only if it exists?

2012-09-07 Thread Roy Smith
In article <9s4nh9-8dr@chris.zbmc.eu>, tinn...@isbd.co.uk wrote: > I want to print a series of list elements some of which may not exist, > e.g. I have a line:- > > print day, fld[1], balance, fld[2] > > fld[2] doesn't always exist (fld is the result of

Re: How to print something only if it exists?

2012-09-07 Thread Hans Mulder
On 6/09/12 19:59:05, tinn...@isbd.co.uk wrote: > I want to print a series of list elements some of which may not exist, > e.g. I have a line:- > > print day, fld[1], balance, fld[2] > > fld[2] doesn't always exist (fld is the result of a split) so the > print fai

Re: How to print something only if it exists?

2012-09-06 Thread Joshua Landau
On 6 September 2012 18:59, wrote: > I want to print a series of list elements some of which may not exist, > e.g. I have a line:- > > print day, fld[1], balance, fld[2] > > fld[2] doesn't always exist (fld is the result of a split) so the > print fails when it isn

Re: How to print something only if it exists?

2012-09-06 Thread Terry Reedy
On 9/6/2012 1:59 PM, tinn...@isbd.co.uk wrote: I want to print a series of list elements some of which may not exist, e.g. I have a line:- print day, fld[1], balance, fld[2] fld[2] doesn't always exist (fld is the result of a split) so the print fails when it isn't set. Wha

Re: python docs search for 'print'

2012-09-06 Thread Terry Reedy
On 9/6/2012 10:01 AM, David Hoese wrote: On 9/5/12 3:03 PM, Grant Edwards wrote: On 2012-09-05, Dave Angel wrote: >On 09/05/2012 01:47 PM, Grant Edwards wrote: > >>Making the site's "search" box use Google or somesuch is probably the >>simplest solution. I'm not enough of a web guy to know ho

Re: python docs search for 'print'

2012-09-06 Thread Mark Lawrence
On 06/09/2012 15:01, David Hoese wrote: On 9/5/12 3:03 PM, Grant Edwards wrote: On 2012-09-05, Dave Angel wrote: >On 09/05/2012 01:47 PM, Grant Edwards wrote: > >>Making the site's "search" box use Google or somesuch is probably the >>simplest solution. I'm not enough of a web guy to know how

Re: How to print something only if it exists?

2012-09-06 Thread Dave Angel
On 09/06/2012 01:59 PM, tinn...@isbd.co.uk wrote: > I want to print a series of list elements some of which may not exist, > e.g. I have a line:- > > print day, fld[1], balance, fld[2] > > fld[2] doesn't always exist (fld is the result of a split) so the > print fail

Re: How to print something only if it exists?

2012-09-06 Thread Emile van Sebille
On 9/6/2012 10:59 AM tinn...@isbd.co.uk said... I want to print a series of list elements some of which may not exist, e.g. I have a line:- print day, fld[1], balance, fld[2] fld[2] doesn't always exist (fld is the result of a split) so the print fails when it isn't set. I kn

How to print something only if it exists?

2012-09-06 Thread tinnews
I want to print a series of list elements some of which may not exist, e.g. I have a line:- print day, fld[1], balance, fld[2] fld[2] doesn't always exist (fld is the result of a split) so the print fails when it isn't set. I know I could simply use an if but ultimately there m

python docs search for 'print'

2012-09-06 Thread David Hoese
On 9/5/12 3:03 PM, Grant Edwards wrote: On 2012-09-05, Dave Angel wrote: >On 09/05/2012 01:47 PM, Grant Edwards wrote: > >>Making the site's "search" box use Google or somesuch is probably the >>simplest solution. I'm not enough of a web guy to know how to do >>that, but I do know that some si

Re: python docs search for 'print'

2012-09-06 Thread Ramchandra Apte
On Thursday, 6 September 2012 01:54:45 UTC+5:30, Walter Hurry wrote: > On Wed, 05 Sep 2012 15:03:16 -0400, Terry Reedy wrote: > > > > > On 9/5/2012 8:45 AM, Ramchandra Apte wrote: > > > > > > > These ever increasing extra blank lines with each quote are obnoxious. > > > Consider using a n

Re: python docs search for 'print'

2012-09-05 Thread Walter Hurry
On Wed, 05 Sep 2012 15:03:16 -0400, Terry Reedy wrote: > On 9/5/2012 8:45 AM, Ramchandra Apte wrote: > These ever increasing extra blank lines with each quote are obnoxious. > Consider using a news reader with news.gmane.org instead of google crap. > Or snip heavily. +1. And the duplicated post

Re: python docs search for 'print'

2012-09-05 Thread Terry Reedy
2000$ for 500,000 searches per year and 750$ for 150,000 searches so its quite expensive. Also the print function only comes in the third result (python 3.2) if you search for "site:docs.python.org/release/3.2 print" the print function is not found at all. I think a specialized algor

Mailergate (was: python docs search for 'print')

2012-09-05 Thread Thomas 'PointedEars' Lahn
^^^^^^ | References: <50464153.5090...@gmail.com> | Date: Tue, 4 Sep 2012 14:27:35 -0400 | Subject: Re: python docs search for 'print' | From: Joel Goldstick | To: David Hoese | Content-Type: text/plain; charset=UTF-8 | Cc: python-l

Re: python docs search for 'print'

2012-09-05 Thread Grant Edwards
On 2012-09-05, Dave Angel wrote: > On 09/05/2012 01:47 PM, Grant Edwards wrote: > >> Making the site's "search" box use Google or somesuch is probably the >> simplest solution. I'm not enough of a web guy to know how to do >> that, but I do know that some sites do handle site search that way. >> >

Re: python docs search for 'print'

2012-09-05 Thread Dave Angel
On 09/05/2012 01:47 PM, Grant Edwards wrote: > On 2012-09-05, Terry Reedy wrote: >> On 9/4/2012 11:22 PM, Ramchandra Apte wrote: >> >>> I was actually planning to write a bug on this. >> If you do, find the right place to submit it. >> bugs.python.org is for issues relating to the cpython reposito

Re: python docs search for 'print'

2012-09-05 Thread Grant Edwards
On 2012-09-05, Terry Reedy wrote: > On 9/4/2012 11:22 PM, Ramchandra Apte wrote: > >> I was actually planning to write a bug on this. > > If you do, find the right place to submit it. > bugs.python.org is for issues relating to the cpython repository.' > I fairly sure that the website search code

Re: python docs search for 'print'

2012-09-05 Thread Ramchandra Apte
ve the way to do the easy setup, with that constraint, that would > > be a positive suggestion, accepted or not. > > > > > > -- > > Terry Jan Reedy Google site search costs 2000$ for 500,000 searches per year and 750$ for 150,000 searches so its quite expensive. Also the print function

Re: python docs search for 'print'

2012-09-05 Thread Terry Reedy
On 9/5/2012 1:22 AM, Ramchandra Apte wrote: On Wednesday, 5 September 2012 09:35:43 UTC+5:30, Terry Reedy wrote: If you do find the right place, you should contribute something to an improvement. The current search performance is not a secret, so mere complaints are useless. I was thinking

Re: python docs search for 'print'

2012-09-04 Thread Ramchandra Apte
On Wednesday, 5 September 2012 09:35:43 UTC+5:30, Terry Reedy wrote: > On 9/4/2012 11:22 PM, Ramchandra Apte wrote: > > > > > I was actually planning to write a bug on this. > > > > If you do, find the right place to submit it. > > bugs.python.org is for issues relating to the cpython repos

Re: python docs search for 'print'

2012-09-04 Thread Terry Reedy
On 9/4/2012 11:22 PM, Ramchandra Apte wrote: I was actually planning to write a bug on this. If you do, find the right place to submit it. bugs.python.org is for issues relating to the cpython repository.' I fairly sure that the website search code is not there. If you do find the right place

Re: python docs search for 'print'

2012-09-04 Thread Dwight Hutto
The generated code can be run without Python installed and does not embed Python. For example: print("Hello World to py2c!") would be translated to #include "iostream" using namespace std; //If you want you can make py2c not add this and use std::cout instead of cout i

Re: python docs search for 'print'

2012-09-04 Thread Ramchandra Apte
On Tuesday, 4 September 2012 23:29:26 UTC+5:30, David Hoese wrote: > A friend made me aware of this: > > When a python beginner (2.x) quick searches for "print" on > > docs.python.org, the print function doesn't even come up in the top 20 > > results. T

Re: python docs search for 'print'

2012-09-04 Thread Ben Finney
Steven D'Aprano writes: > Gah! Brain meltdown! DDG does better on searches for Python terms with > fewer extraneous meanings, e.g. "python print" finds many links about > fashion, but https://duckduckgo.com/html/?q=python+tuple is all about > Python tuples :) Addin

Re: python docs search for 'print'

2012-09-04 Thread Steven D'Aprano
On Tue, 04 Sep 2012 18:28:31 +, Steven D'Aprano wrote: > https://www.google.com.au/search?q=python+print > http://duckduckgo.com/html/?q=python+print > > In this case, google hits the right Python documentation on the first > link. Duckduckgo doesn't do nearly so wel

Re: python docs search for 'print'

2012-09-04 Thread Terry Reedy
On 9/4/2012 6:32 PM, Terry Reedy wrote: On Tue, Sep 4, 2012 at 1:58 PM, David Hoese wrote: A friend made me aware of this: When a python beginner (2.x) quick searches for "print" on docs.python.org, the print function doesn't even come up in the top 20 results. In the Windo

Re: python docs search for 'print'

2012-09-04 Thread Terry Reedy
On Tue, Sep 4, 2012 at 1:58 PM, David Hoese wrote: A friend made me aware of this: When a python beginner (2.x) quick searches for "print" on docs.python.org, the print function doesn't even come up in the top 20 results. In the Windows Help version of the docs, enter print i

Re: python docs search for 'print'

2012-09-04 Thread Mark Lawrence
On 04/09/2012 19:38, William R. Wing (Bill Wing) wrote: On Sep 4, 2012, at 1:58 PM, David Hoese wrote: A friend made me aware of this: When a python beginner (2.x) quick searches for "print" on docs.python.org, the print function doesn't even come up in the top 20 resu

Re: python docs search for 'print'

2012-09-04 Thread Grant Edwards
On 2012-09-04, Joel Goldstick wrote: > On Tue, Sep 4, 2012 at 1:58 PM, David Hoese wrote: >> A friend made me aware of this: >> When a python beginner (2.x) quick searches for "print" on >> docs.python.org, the print function doesn't even come up in the

Re: python docs search for 'print'

2012-09-04 Thread Steven D'Aprano
On Tue, 04 Sep 2012 20:27:38 +0200, Thomas 'PointedEars' Lahn wrote: > ¹ The other mess they created (or allowed to be created) is this mashup >of newsgroup and mailing list, neither of which works properly, In what way do they not work properly? >because >the underlying protocols

Re: python docs search for 'print'

2012-09-04 Thread William R. Wing (Bill Wing)
On Sep 4, 2012, at 1:58 PM, David Hoese wrote: > A friend made me aware of this: > When a python beginner (2.x) quick searches for "print" on docs.python.org, > the print function doesn't even come up in the top 20 results. The print > statement isn't even

Re: python docs search for 'print'

2012-09-04 Thread Steven D'Aprano
On Tue, 04 Sep 2012 13:58:43 -0400, David Hoese wrote: > A friend made me aware of this: > When a python beginner (2.x) quick searches for "print" on > docs.python.org, the print function doesn't even come up in the top 20 > results. The print statement isn't even

Re: python docs search for 'print'

2012-09-04 Thread Thomas 'PointedEars' Lahn
David Hoese wrote: > A friend made me aware of this: > When a python beginner (2.x) quick searches for "print" on > docs.python.org, the print function doesn't even come up in the top 20 > results. The print statement isn't even listed as far as I can tell. >

Re: python docs search for 'print'

2012-09-04 Thread Joel Goldstick
On Tue, Sep 4, 2012 at 1:58 PM, David Hoese wrote: > A friend made me aware of this: > When a python beginner (2.x) quick searches for "print" on docs.python.org, > the print function doesn't even come up in the top 20 results. > -Dave > -- > http://mail.python

python docs search for 'print'

2012-09-04 Thread David Hoese
A friend made me aware of this: When a python beginner (2.x) quick searches for "print" on docs.python.org, the print function doesn't even come up in the top 20 results. The print statement isn't even listed as far as I can tell. Is there something that can be done a

Re: newbie ``print`` question

2012-09-02 Thread MRAB
02/2012 03:34 PM, gwhite wrote: >> >>> >> >>> btw, I also thought the default "add a CR LF" to the end was odd too. >> >>> But at least that one had a simple way out. >> >> But it (print on Python 2.x) doesn't, unless you're stuck on Wind

Re: newbie ``print`` question

2012-09-02 Thread gwhite
n 09/02/2012 03:34 PM, gwhite wrote: > > >> >>> > >> >>> btw, I also thought the default "add a CR LF" to the end was odd too. > >> >>> But at least that one had a simple way out. > >> >> But it (print on Python 2.x) doe

Re: newbie ``print`` question

2012-09-02 Thread Chris Angelico
On Mon, Sep 3, 2012 at 9:20 AM, gwhite wrote: > I guess you're saying 3.x will just ignore: > > from __future__ import print_function > > I'll risk being silly, and thus ask: but what if when I get to 3.x > there is no __future__, as it is now "present?" Do I need to strip > out the line? > > Wha

Re: newbie ``print`` question

2012-09-02 Thread gwhite
; > > I'm kinda thinking `write` is likely to be a little more "stable" than > > `print` (if that is the right characterization) when my eventual > > switch from 2.7 to 3.x happens.  You think? > > If you're planning to switch, make use of __future__.

Re: newbie ``print`` question

2012-09-02 Thread MRAB
t; to the end was odd too. >>> But at least that one had a simple way out. >> But it (print on Python 2.x) doesn't, unless you're stuck on Windows. >> And even then, you can prevent it by using a 'b' in the mode. > Yes, I'm using windows. What is "

Re: newbie ``print`` question

2012-09-02 Thread Chris Angelico
e more "stable" than > `print` (if that is the right characterization) when my eventual > switch from 2.7 to 3.x happens. You think? If you're planning to switch, make use of __future__. It's specifically to make that job easier. Once you have a future declaration at the

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 1:49 pm, Terry Reedy wrote: > On 9/2/2012 3:26 PM, gwhite wrote: > > > On the "rework" thing, yes, I suppose I could construct the line as a > > single string prior to print.    There would be things like `for` > > loops and conditionals to do so.  Th

Re: newbie ``print`` question

2012-09-02 Thread gwhite
believes it is positioned at the beginning of > > a line." > > > So it is apparently doing what it is supposed to do. > > > Is there a way to stop this?  Or is there a different function that > > will only print what you have in the formatted string? > > E:\UserData\

Re: newbie ``print`` question

2012-09-02 Thread gwhite
lt "add a CR LF" to the end was odd too. > >>> But at least that one had a simple way out. > >> But it (print on Python 2.x) doesn't, unless you're stuck on Windows. > >> And even then, you can prevent it by using a 'b' in the mode. &g

Re: newbie ``print`` question

2012-09-02 Thread Terry Reedy
On 9/2/2012 3:26 PM, gwhite wrote: On the "rework" thing, yes, I suppose I could construct the line as a single string prior to print.There would be things like `for` loops and conditionals to do so. That isn't so unusual. The usual idiom is to construct a list of piece

Re: newbie ``print`` question

2012-09-02 Thread Chris Rebert
On Sun, Sep 2, 2012 at 1:24 PM, Mark Lawrence wrote: > On 02/09/2012 20:58, me wrote: >> >> Well you can convert the ints to str then concatenate them. >> >> print "1" + "2" >> > > Please post other parts of the thread so people c

Re: newbie ``print`` question

2012-09-02 Thread Mark Lawrence
On 02/09/2012 20:58, me wrote: Well you can convert the ints to str then concatenate them. print "1" + "2" Please post other parts of the thread so people can get the context or don't bother posting at all, thanks. -- Cheers. Mark Lawrence. -- http://mail.py

Re: newbie ``print`` question

2012-09-02 Thread Dave Angel
On 09/02/2012 03:50 PM, gwhite wrote: > On Sep 2, 12:43 pm, Dave Angel wrote: >> On 09/02/2012 03:34 PM, gwhite wrote: >> >>> >>> btw, I also thought the default "add a CR LF" to the end was odd too. >>> But at least that one had a simple way

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 11:33 am, Terry Reedy wrote: > On 9/2/2012 1:23 PM, gwhite wrote: > > > I can't figure out how to stop the "add a space at the beginning" > > behavior of the print function. > > >>>> print 1,;print 2, > > 1 2 > > You have di

Re: newbie ``print`` question

2012-09-02 Thread me
Well you can convert the ints to str then concatenate them. print "1" + "2" -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 12:43 pm, Dave Angel wrote: > On 09/02/2012 03:34 PM, gwhite wrote: > > > > > > btw, I also thought the default "add a CR LF" to the end was odd too. > > But at least that one had a simple way out. > > But it (print on Python 2.x) doesn&#x

Re: How to print a number as if in the python interpreter?

2012-09-02 Thread me
Use repr() print(repr(sum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]))) -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 10:45 am, Joel Goldstick wrote: > On Sun, Sep 2, 2012 at 1:23 PM, gwhite wrote: > > I can't figure out how to stop the "add a space at the beginning" > > behavior of the print function. > > >>>> print 1,;print 2, > > 1 2 > &

Re: newbie ``print`` question

2012-09-02 Thread Dave Angel
On 09/02/2012 03:34 PM, gwhite wrote: > > > btw, I also thought the default "add a CR LF" to the end was odd too. > But at least that one had a simple way out. But it (print on Python 2.x) doesn't, unless you're stuck on Windows. And even then, you can preve

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 12:26 pm, gwhite wrote: > On Sep 2, 10:55 am, Chris Rebert wrote: > > > > > > > > > > > On Sun, Sep 2, 2012 at 10:23 AM, gwhite wrote: > > > I can't figure out how to stop the "add a space at the beginning" > > > b

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 10:55 am, Chris Rebert wrote: > On Sun, Sep 2, 2012 at 10:23 AM, gwhite wrote: > > I can't figure out how to stop the "add a space at the beginning" > > behavior of the print function. > > >>>> print 1,;print 2, > > 1 2 > > &g

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 11:33 am, Terry Reedy wrote: > On 9/2/2012 1:23 PM, gwhite wrote: > > > I can't figure out how to stop the "add a space at the beginning" > > behavior of the print function. > > >>>> print 1,;print 2, > > 1 2 > > You have di

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 10:55 am, Chris Rebert wrote: > On Sun, Sep 2, 2012 at 10:23 AM, gwhite wrote: > > I can't figure out how to stop the "add a space at the beginning" > > behavior of the print function. > > >>>> print 1,;print 2, > > 1 2 > > &g

Re: newbie ``print`` question

2012-09-02 Thread gwhite
On Sep 2, 10:49 am, mblume wrote: > Am Sun, 02 Sep 2012 10:23:53 -0700 schrieb gwhite: > > > > > > > > > > > I can't figure out how to stop the "add a space at the beginning" > > behavior of the print function. > > >>>>

Re: newbie ``print`` question

2012-09-02 Thread Terry Reedy
On 9/2/2012 1:23 PM, gwhite wrote: I can't figure out how to stop the "add a space at the beginning" behavior of the print function. print 1,;print 2, 1 2 You have discovered why print is a function in 3.x. >>> print(1, 2, sep='') 12 >>> print(1,

Re: newbie ``print`` question

2012-09-02 Thread Chris Rebert
On Sun, Sep 2, 2012 at 10:23 AM, gwhite wrote: > I can't figure out how to stop the "add a space at the beginning" > behavior of the print function. > >>>> print 1,;print 2, > 1 2 > > See the space in between the 1 and the 2 at the output print to the

Re: newbie ``print`` question

2012-09-02 Thread mblume
Am Sun, 02 Sep 2012 10:23:53 -0700 schrieb gwhite: > I can't figure out how to stop the "add a space at the beginning" > behavior of the print function. > >>>> print 1,;print 2, > 1 2 > > See the space in between the 1 and the 2 at the output prin

Re: newbie ``print`` question

2012-09-02 Thread Joel Goldstick
On Sun, Sep 2, 2012 at 1:23 PM, gwhite wrote: > I can't figure out how to stop the "add a space at the beginning" > behavior of the print function. > >>>> print 1,;print 2, > 1 2 > > See the space in between the 1 and the 2 at the output print to the

Re: newbie ``print`` question

2012-09-02 Thread Mark Lawrence
On 02/09/2012 18:23, gwhite wrote: I can't figure out how to stop the "add a space at the beginning" behavior of the print function. print 1,;print 2, 1 2 See the space in between the 1 and the 2 at the output print to the command console? The help for print is: "A spa

newbie ``print`` question

2012-09-02 Thread gwhite
I can't figure out how to stop the "add a space at the beginning" behavior of the print function. >>> print 1,;print 2, 1 2 See the space in between the 1 and the 2 at the output print to the command console? The help for print is: "A space is written before

Re: help with simple print statement!

2012-08-26 Thread Hans Mulder
On 24/08/12 21:59:12, Prasad, Ramit wrote: > Also, print doesn't work inside a class. It works for me: > python3 Python 3.3.0a1 (v3.3.0a1:f1a9a6505731, Mar 4 2012, 12:26:12) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright",

RE: help with simple print statement!

2012-08-24 Thread Bruce Krayenhoff
ython-list-bounces+wbrucek=gmail@python.org] On Behalf Of Chris Kaynor Sent: August-24-12 12:54 PM To: python-list@python.org Subject: Re: help with simple print statement! On Fri, Aug 24, 2012 at 12:43 PM, Willem Krayenhoff mailto:wbru...@gmail.com> > wrote: Any idea why print is

proper reply format [was Re: help with simple print statement!]

2012-08-24 Thread Ethan Furman
Prasad, Ramit wrote: Willem Krayenhoff Any idea why print isn't working here? I tried restarting my Command prompt. Also, print doesn't work inside a class. Ramit, The standard for attribution is something along the lines of: Prasad, Ramit wrote: or Willem Kayenhoff wr

RE: help with simple print statement!

2012-08-24 Thread Prasad, Ramit
Willem Krayenhoff Any idea why print isn't working here?   I tried restarting my Command prompt.  Also, print doesn't work inside a class. -- Best Wishes,      Bruce      C: 604-441-5791      My Availability  Just as a note, this is a usenet group that can be accessed via ema

Re: help with simple print statement!

2012-08-24 Thread Zero Piraeus
: On 24 August 2012 15:43, Willem Krayenhoff wrote: > Any idea why print isn't working here? http://docs.python.org/release/3.0.1/whatsnew/3.0.html#print-is-a-function Also, pasting images into emails to this list is unlikely to gain you many friends ... -[]z. -- http://mail.py

Re: help with simple print statement!

2012-08-24 Thread Rob Day
On Fri, 2012-08-24 at 12:43 -0700, Willem Krayenhoff wrote: > Any idea why print isn't working here? You're using Python 3.2, but trying Python 2.7 syntax - http://docs.python.org/release/3.0.1/whatsnew/3.0.html#print-is-a-function should explain the problem adequately. (Incid

Re: help with simple print statement!

2012-08-24 Thread Chris Kaynor
On Fri, Aug 24, 2012 at 12:43 PM, Willem Krayenhoff wrote: > Any idea why print isn't working here? > > I tried restarting my Command prompt. Also, print doesn't work inside a > class. > > [image: Inline image 2] > In Python 3, print was made into a function rath

Re: remote read eval print loop

2012-08-21 Thread Eric Frederich
self.mb_err = MyBuffer() def process(self, s): sys.stdout, sys.stderr = self.mb_out, self.mb_err more = self.push(s) sys.stdout, sys.stderr = sys.__stdout__, sys.__stderr__ return self.mb_out.get(), self.mb_err.get(), more print 'creating new interactive console' mic

Re: remote read eval print loop

2012-08-18 Thread Ramchandra Apte
Not really. Try modifying ast.literal_eval. This will be quite secure. On 17 August 2012 19:36, Chris Angelico wrote: > On Fri, Aug 17, 2012 at 11:28 PM, Eric Frederich > wrote: > > Within the debugging console, after importing all of the bindings, there > > would be no reason to import anythin

Re: remote read eval print loop

2012-08-17 Thread Chris Angelico
On Fri, Aug 17, 2012 at 11:28 PM, Eric Frederich wrote: > Within the debugging console, after importing all of the bindings, there > would be no reason to import anything whatsoever. > With just the bindings I created and the Python language we could do > meaningful debugging. > So if I block the

Re: remote read eval print loop

2012-08-17 Thread Eric Frederich
What I wanted to implement was a debugging console that runs right on the client rather than on the server. You'd have to be logged into the application to do anything meaningful or even start it up. All of the C functions that I created bindings for respect the security of the logged in user. Wit

Re: remote read eval print loop

2012-08-17 Thread rusi
On Aug 17, 12:25 pm, Chris Angelico wrote: > On Fri, Aug 17, 2012 at 12:27 PM, Steven D'Aprano > > wrote: > > There is already awesome protocols for running Python code remotely over > > a network. Please do not re-invent the wheel without good reason. > > > See pyro, twisted, rpyc, rpclib, jpc,

Re: remote read eval print loop

2012-08-17 Thread Chris Angelico
o build your protocol; you still don't need a read/eval/print loop to run across a network. Personally, I'm of the opinion that simple text-based protocols are usually sufficient, and much easier to debug - heavier things like RPC tend to be overkill. But as Alister pointed out, my main

Re: remote read eval print loop

2012-08-16 Thread Alister
3rd party software running on >>> the server side. >>> I can add client side extensions that communicate over some http / xml >>> type requests. >>> So I can define functions that take a string and return a string. I >>> would like to get a simple read eval

Re: remote read eval print loop

2012-08-16 Thread Steven D'Aprano
hat communicate over some http / xml >> type requests. >> So I can define functions that take a string and return a string. I >> would like to get a simple read eval print loop working. > > Let's stop *right there*. You're looking for something that will run on >

<    4   5   6   7   8   9   10   11   12   13   >