title: Python curses getting x and y
body: <p>Okay I am writing a python application using curses and I am trying to center my text in a terminal window from the documentation you can get the x and y using this </p>
  
  <pre><code>curses.LINES and curses.COLS
  </code></pre>
  
  <p>I got this from <a href="https://docs.python.org/3/howto/curses.html" rel="nofollow">here</a></p>
  
  <p>I guess they return the x and y as a integer </p>
  
  <p>Here is how I am doing this </p>
  
  <p><code>screen.addstr(curses.LINES, curses.COLS, 'Please enter a number...', curses.color_pair(1))
  </code></p>
  
  <p>but when I run the program i get this</p>
  
  <pre><code>Traceback (most recent call last):
                                      File "main.py", line 102, in &lt;module&gt;
                                                                               main()
       File "main.py", line 47, in main
                                           screen.addstr(curses.LINES/2, curses.COLS/2, 'Please enter a number...', curses.color_pair(1))
                                                         TypeError: integer argument expected, got float
  </code></pre>
  
  <p>I am dividing by 2 to get the center but it keeps throwing the error</p>