pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Wiki

SettingWindowPosition

      
Search:  
 
 
You can set the position of the window by using SDL environment variables before you initialise pygame. Environment variables can be set with the os.environ dict in python.
x = 100
y = 0
import os
os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (x,y)
 
import pygame
pygame.init()
screen = pygame.display.set_mode((100,100))
 
# wait for a while to show the window.
import time
time.sleep(2)
A full list of SDL environment variables can be found here:
http://www.libsdl.org/cgi/docwiki.cgi/Environment_20variables

newer link
https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlenvvars.html
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
May 1, 2016

Apr 6, 2016


Mar 27, 2016

Mar 26, 2016

Mar 22, 2016

Mar 19, 2016

Mar 17, 2016

Mar 13, 2016

Feb 27, 2016

Feb 21, 2016

Feb 12, 2016

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)