-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello_world_2.py
More file actions
47 lines (30 loc) · 853 Bytes
/
hello_world_2.py
File metadata and controls
47 lines (30 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -*- coding: utf-8 -*-
import pygtk;
pygtk.require( '2.0' );
import gtk;
# ... #
def delete_event( widget, data ):
return False;
def destroy( widget, data = None ):
gtk.main_quit();
# ... #
window = gtk.Window( gtk.WINDOW_TOPLEVEL );
window.set_title( "مرحباً بالعالم" );
window.connect( 'delete_event', delete_event );
window.connect( 'destroy', destroy );
# ... #
box1 = gtk.HBox(); # New line
window.add( box1 ); # New line
# ... #
hello_world_button = gtk.Button( "مرحباً بالعالم" );
box1.pack_start( hello_world_button ); # New line
hello_world_button.show();
# ... #
hello_world_button_2 = gtk.Button( "الزر الثاني" ); # New line
box1.pack_start( hello_world_button_2 ); # New line
hello_world_button_2.show(); # New line
# ... #
box1.show(); # New line
window.show();
# ... #
gtk.main();