File: global_variable.py

package info (click to toggle)
abinit 9.10.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 518,712 kB
  • sloc: xml: 877,568; f90: 577,240; python: 80,760; perl: 7,019; ansic: 4,585; sh: 1,925; javascript: 601; fortran: 557; cpp: 454; objc: 323; makefile: 77; csh: 42; pascal: 31
file content (28 lines) | stat: -rwxr-xr-x 455 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Abinit Post Process Application
author: Martin Alexandre
last edited: May 2013
"""

import sys,os

#Global variable


#path
global_path = os.getcwd()
def path():
    if os.path.exists(global_path) :
        if os.path.isdir(global_path):
            return str(global_path)
        else:
            return str(os.path.dirname(global_path))
    else:
        return "~/"
    

#version
version = "1.0.8"