Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > placing text at point on console

Reply
Thread Tools

placing text at point on console

 
 
bart
Guest
Posts: n/a
 
      07-01-2003
I'm trying to place text at a certain point on the console. But I can't
figure out any way to do this. For instance place a '@' at point 6,8.
Any hints?

(I'm trying to display a 'map'. Think nethack)

Thanks,
Bart

 
Reply With Quote
 
 
 
 
Irmen de Jong
Guest
Posts: n/a
 
      07-01-2003
bart wrote:

> I'm trying to place text at a certain point on the console. But I can't
> figure out any way to do this. For instance place a '@' at point 6,8.
> Any hints?
>
> (I'm trying to display a 'map'. Think nethack)


You didn't say which system you use. This is important information
because what you want to do is not system independent.

For Unixes/Linux, try the curses module:
http://www.python.org/doc/current/li...le-curses.html

import curses
s=curses.initscr()
s.addch(6,9,'#')
s.refresh()


For Windows, try the (non-standard) WConIO module:
http://newcenturycomputers.net/projects/wconio.html

import WConio
WConio.gotoxy(6,
WConio.cputs('@')



--Irmen

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Scenario 5: IS-IS routing on Frame Relay Multi-point and Point-to-Point David Sudjiman Cisco 0 06-08-2006 09:11 AM
Placing the form tag within dynamically generated text... Stu ASP .Net 4 01-06-2005 03:31 PM
Any problems in placing an access point on a computer? S.V.Proff Computer Support 2 05-22-2004 06:37 AM
Placing photo and text with CSS. Luigi Donatello Asero HTML 1 01-06-2004 10:45 PM



Advertisments