[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Print to end of line in a terminal

ndlarsen

2/27/2008 6:46:00 PM

Hey.

This might seem as a arbitrary question to some. Anyway, I'm wondering
how I go about printing text to the end of a line in a terminal/console.
I've been googling it for a few days without any success. Any
suggestions will be greatly appreciated.

Regards ndlarsen
4 Answers

Bjoern Schliessmann

2/27/2008 10:29:00 PM

0

ndlarsen wrote:

> This might seem as a arbitrary question to some. Anyway, I'm
> wondering how I go about printing text to the end of a line in a
> terminal/console. I've been googling it for a few days without any
> success. Any suggestions will be greatly appreciated.

Well, just print ${COLUMNS} characters. If you rephrased your
problem with more detail one could give better suggestions.

Regards,


Björn

--
BOFH excuse #202:

kernel panic: write-only-memory (/dev/wom0) capacity exceeded.

jjl

2/28/2008 12:44:00 AM

0

ndlarsen <usenet@ionline.dk> writes:

> Hey.
>
> This might seem as a arbitrary question to some. Anyway, I'm wondering
> how I go about printing text to the end of a line in a
> terminal/console. I've been googling it for a few days without any
> success. Any suggestions will be greatly appreciated.
>
> Regards ndlarsen

Assuming by "end of a line" you mean "right-hand edge of the window",
there's an example here:

http://codespeak.net/svn/user/jjlee/rudolf/trunk/col...


Another alternative would be to use curses.


John

Mitchell Holman

2/4/2013 2:11:00 PM

0

Jason@nospam.com (Jason) wrote in
news:Jason-0402130019250001@66-53-214-158.lsan.mdsg-pacwest.com:

> In article <hlwdjsd2-96744E.19550403022013@news.giganews.com>, Jeanne
> Douglas <hlwdjsd2@NOSPAMgmail.com> wrote:
>
>> In article
>> <Jason-0302131844080001@66-53-212-22.lsan.mdsg-pacwest.com>,
>> Jason@nospam.com (Jason) wrote:
>>
>> > > > > > > >>
>> > > > > > > >>
>> > > > > > > >>
>> > > > > > > >>
>> > > > > > > >> A good friend of mine died yesterday.
>> > > > > > > >>
>> > > > > > > >> Shot 5 times as he was getting out of
>> > > > > > > >> his car, in the parking lot of a rural
>> > > > > > > >> county courthouse. At 8:50 in the morning.
>> > > > > > > >> His name was Mark Hasse, google him up if
>> > > > > > > >> you need to.
>> > > > > > > >>
>> > > > > > > >> Do NOT tell me about rural areas being
>> > > > > > > >> such havens from gun violence.
>> > > > > > > >
>> > > > > > > > I believe you. I am sorry that happened.
>> > > > > > > >
>> > > > > > > > Black market gun sales are illegal in California. I
>> > > > > > > > don't
> know if
>> > > > > > > > black market gun sales are illegal in all states. Do
>> > > > > > > > you know?
>> > > > > > > >
>> > > > > > > > Let's be honest--even if it was totally illegal for
>> > > > > > > > black
> market
>> > > > > > > > gun
>> > > > > > > > sales to happen in every state and at every gun show--
>> > > > > > > >
>> > > > > > > > They still would happen. Criminals don't abide by gun
>> > > > > > > > laws.
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > Criminals don't abide by gun laws in Canada or
>> > > > > > > Australia or Japan either. Yet they don't use guns.
>> > > > > > > Why is that, do you think?
>> > > > > >
>> > > > > > How many people were murdered in Canada, Australia and
>> > > > > > Japan in the
>> > > > year 2012?
>> > > > > >
>> > > > > >
>> > http://www.businessinsider.com/how-many-americans-killed-w...
>> > 012-7
>> > > > >
>> > > > > Let's try 2010; it's way too early for there to be final
>> > > > > numbers:
>> > > > >
>> > > > >
> <http://en.wikipedia.org/wiki/List_of_countries_by_intentiona...
> _
>> > > > > r
>> > > > > ate#By_country>
>> > > > >
>> > > > > US: 14,748 (4.8/100,000)
>> > > > >
>> > > > > UK: 722 (1.2/100,000)
>> > > > >
>> > > > > Canada: 554 (1.6/100,000)
>> > > > >
>> > > > > Australia: 229 (1.0/100,000)
>> > > > >
>> > > > > Japan:506 (0.4/100,000)
>> > > > >
>> > > > > Every time you try to find stats to prove your premise, the
>> > > > > actual numbers prove even more that you are wrong.
>> > > > >
>> > > > > The US is obscenely higher than those other countries in both
> absolute
>> > > > > numbers and rates.
>> > > >
>> > > > If they have such a small number of guns in Japan, how were
>> > > > those 506 people in Japan murdered?
>> > >
>> > > And now you're claiming that guns are the only way people are
>> > > murdered?
>> > >
>> > > Is there no end to your dishonesty?
>> >
>> > You are NOW seeing my point of view. My point is that if Americans
>> > did NOT have any guns, that other weapons would be used to murder
>> > people.
>>
>> So what?
>>
>> I'd rather have 500 murders with no guns than 5,000.
>
> That's a valid point.
>
> I continue to believe that Americans should have the right to use guns
> to defend themselves and their families.
>
> I believe it was in Florida that they passed a right to carry law.
> Thousands of people began to carry concealed handguns. The liberal
> democrats claimed that it would make the murder rate skyrocket.
>
> The murder rate actually went down.


Explain why Florida is tied with S Carolina for
the most violent state in the country. Both of which
are "right to carry guns" states......

http://en.wikipedia.org/wiki/File:US_Violent_Crim...












tirebiter

2/4/2013 11:07:00 PM

0

Jason@nospam.com (Jason) wrote in
news:Jason-0202131613100001@67-150-121-55.lsan.mdsg-pacwest.com:

> In article <XnsA15B49987448Fnomailverizonnet@216.196.121.131>,
> Mitchell Holman <nomailverizon.net> wrote:
>
>> Jason@nospam.com (Jason) wrote in
>> news:Jason-0102132052420001@66-53-223-2.stkn.mdsg-pacwest.com:
>>
>> > In article <XnsA15ADE91B6796nomailverizonnet@216.196.121.131>,
>> > Mitchell Holman <nomailverizon.net> wrote:
>> >
>> >> Jason@nospam.com (Jason) wrote in
>> >> news:Jason-0102131925530001@67-150-170-240.lsan.mdsg-pacwest.com:
>> >>
>> >> > In article
>> >> > <XnsA15AE097930C4dontspammebigfootcom@209.197.15.254>, tirebiter
>> >> > <dontspamme@bigfoot.com> wrote:
>> >> >
>> >> >> Jason@nospam.com (Jason) wrote in
>> >> >> news:Jason-0102131856570001@67-150-170-240.lsan.mdsg-
pacwest.com
>> >> >> :
>> >> >>
>> >> >> > In article
>> >> >> > <e4ad3833-814f-47aa-81ba-
97531bf1e3de@i2g2000pbi.googlegroups.
>> >> >> > com
>> >> >> > >, SkyEyes <skyeyes9@cox.net> wrote:
>> >> >> >
>> >> >>
>> >> >> This protects the sellers too. You never acknowleged how
>> >> >> selling guns out of your garage or the trunk of your car will
>> >> >> easily get you in trouble when the gun is used in a crime and
>> >> >> is traced back to you.
>> >> >>
>> >> >> Why is that?
>> >> >>
>> >> >> ---
>> >> >> a.a. #2273
>> >> >
>> >> > Those things happen mainly about large cities. These sorts of
>> >> > things rarely happens in rural areas where guns are sold to
>> >> > people that they know and in addition know that they are
>> >> > trustworthy.
>> >> >
>> >> > You appear to have spent your entire life in big cities. Life is
>> >> > far different in rural areal.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> A good friend of mine died yesterday.
>> >>
>> >> Shot 5 times as he was getting out of
>> >> his car, in the parking lot of a rural
>> >> county courthouse. At 8:50 in the morning.
>> >> His name was Mark Hasse, google him up if
>> >> you need to.
>> >>
>> >> Do NOT tell me about rural areas being
>> >> such havens from gun violence.
>> >
>> > I believe you. I am sorry that happened.
>> >
>> > Black market gun sales are illegal in California. I don't know if
>> > black market gun sales are illegal in all states. Do you know?
>> >
>> > Let's be honest--even if it was totally illegal for black market
>> > gun sales to happen in every state and at every gun show--
>> >
>> > They still would happen. Criminals don't abide by gun laws.
>>
>>
>>
>> Criminals don't abide by gun laws in Canada or
>> Australia or Japan either. Yet they don't use guns.
>> Why is that, do you think?
>
> How many people were murdered in Canada, Australia and Japan in the
> year 2012?
>
> http://www.businessinsider.com/how-many-americans-killed-...
2012
> -7
>
>
>

And if that number is >0, then that means we don't need gun control?

You are not only stupid but evil too.

---
a.a. #2273