Browse Source

Removed function wrappers

No need to write wrappers if you can import them with custom names
doc-issue-template
Henrique Pereira 10 years ago
parent
commit
9fc2068b27
1 changed files with 6 additions and 9 deletions
  1. 15
      youtube_dl_gui/Utils.py

15
youtube_dl_gui/Utils.py

@ -5,6 +5,12 @@ import sys
import locale import locale
import subprocess import subprocess
import os.remove as remove_file
import os.path.exists as file_exist
import os.path.getsize as get_file_size
import os.makedirs as make_dir
def remove_empty_items(array): def remove_empty_items(array):
return [x for x in array if x != ''] return [x for x in array if x != '']
@ -39,9 +45,6 @@ def video_is_dash(video):
def have_dash_audio(audio): def have_dash_audio(audio):
return audio != "NO SOUND" return audio != "NO SOUND"
def remove_file(filename):
os.remove(filename)
def get_path_seperator(): def get_path_seperator():
return '\\' if os.name == 'nt' else '/' return '\\' if os.name == 'nt' else '/'
@ -65,18 +68,12 @@ def abs_path(filename):
path.pop() path.pop()
return get_path_seperator().join(path) return get_path_seperator().join(path)
def file_exist(filename):
return os.path.exists(filename)
def get_os_type(): def get_os_type():
return os.name return os.name
def get_filesize(path): def get_filesize(path):
return os.path.getsize(path) return os.path.getsize(path)
def makedir(path):
os.makedirs(path)
def get_filename(path): def get_filename(path):
return path.split(get_path_seperator())[-1] return path.split(get_path_seperator())[-1]

Loading…
Cancel
Save