Skip to content

Commit 95452a0

Browse files
committed
allow IPv6 addresses, e.g. d=Xlib.display.Display("::ffff:192.168.2.27:0.0"). As reported in http://sourceforge.net/projects/pykeylogger/forums/forum/493188/topic/3731160
1 parent 163b356 commit 95452a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Xlib/support/unix_connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
uname = platform.uname()
4444
if (uname[0] == 'Darwin') and ([int(x) for x in uname[2].split('.')] >= [9, 0]):
4545

46-
display_re = re.compile(r'^([-a-zA-Z0-9._/]*):([0-9]+)(\.([0-9]+))?$')
46+
display_re = re.compile(r'^([-:a-zA-Z0-9._/]*):([0-9]+)(\.([0-9]+))?$')
4747

4848
else:
4949

50-
display_re = re.compile(r'^([-a-zA-Z0-9._]*):([0-9]+)(\.([0-9]+))?$')
50+
display_re = re.compile(r'^([-:a-zA-Z0-9._]*):([0-9]+)(\.([0-9]+))?$')
5151

5252
def get_display(display):
5353
# Use $DISPLAY if display isn't provided

0 commit comments

Comments
 (0)