Server IP : 127.0.0.2 / Your IP : 3.144.103.205 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.7/dist-packages/reportlab/lib/ |
Upload File : |
#Copyright ReportLab Europe Ltd. 2000-2016 #see license.txt for license details # $URI:$ __version__='3.3.0' __doc__='''Helper for the test suite - determines where to write output. When our test suite runs as source, a script "test_foo.py" will typically create "test_foo.pdf" alongside it. But if you are testing a package of compiled code inside a zip archive, this won't work. This determines where to write test suite output, creating a subdirectory of /tmp/ or whatever if needed. ''' _rl_tempdir=None __all__ = ('get_rl_tempdir', 'get_rl_tempdir') import os, tempfile def _rl_getuid(): if hasattr(os,'getuid'): return os.getuid() else: return '' def get_rl_tempdir(*subdirs): global _rl_tempdir if _rl_tempdir is None: _rl_tempdir = os.path.join(tempfile.gettempdir(),'ReportLab_tmp%s' % str(_rl_getuid())) d = _rl_tempdir if subdirs: d = os.path.join(*((d,)+subdirs)) try: os.makedirs(d) except: pass return d def get_rl_tempfile(fn=None): if not fn: fn = tempfile.mktemp() return os.path.join(get_rl_tempdir(),fn)