Project

General

Profile

differenceLinWin.txt

Différences de code entre les versions Linux et Windows - vincent.mbg, 02/07/2010 11:06 PM

 
1
 
2
                         +-----------------------------------------------------+
3
                        /                                                       \
4
                        |  Les différences entre les versions Linux et Windows  |
5
                        \                                                       /
6
                         +-----------------------------------------------------+
7

    
8

    
9

    
10
+---------------------+
11
| Dans ohraimeir.py : |
12
+---------------------+
13
  
14
  1)
15
    Linux :
16
        sys.path.append("/usr/local/share/ohraimeur/lib/")
17
    
18
    Windows :
19
        sys.path.append("share")
20

    
21
  2)  
22
    Linux :
23
        gettext.install("messages", "/usr/local/share/ohraimeur/locale" )
24
        
25
    Windows :
26
        APP_NAME = "messages"
27
        local_path = os.path.realpath( os.path.dirname( sys.argv[0] ) )
28
        local_path = os.path.join( local_path, 'locale' ) 
29

    
30
        lc, encoding = locale.getdefaultlocale()
31

    
32
        gettext.bindtextdomain( APP_NAME, local_path )
33
        gettext.textdomain( APP_NAME )
34

    
35
        lang = gettext.translation( APP_NAME, local_path,
36
        languages=[ lc ], fallback = True)
37

    
38

    
39
        _ = lang.gettext
40
        __builtins__._ = _
41

    
42

    
43
+-----------------------------------------------------+
44
| Dans search_connect.py, ohraimeur, remise_a_zero.py |
45
+-----------------------------------------------------+
46

    
47
    Linux :
48
        self.path_file_con = os.path.join( os.environ['HOME'], ".ohraimeur", "data.pkl" )
49
    Windows :
50
        self.path_file_con = os.path.join( os.environ['HOMEDRIVE'], os.environ['HOMEPATH'], ".ohraimeur", "data.pkl" )  
51

    
52

    
53
+----------------+
54
| Dans client.py |
55
+----------------+
56

    
57
    Linux :
58
        t1 = time.time()
59
        t2 = time.time()
60
    Windows :
61
        t1 = time.clock()
62
        t2 = time.clock()
63

    
64