mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 02:35:22 +08:00
Merge branch 'master' into eop
This commit is contained in:
@ -129,6 +129,7 @@ def get_configuration():
|
||||
return config
|
||||
|
||||
def handle_scene(scene, **config):
|
||||
import platform
|
||||
if config["quiet"]:
|
||||
curr_stdout = sys.stdout
|
||||
sys.stdout = open(os.devnull, "w")
|
||||
@ -142,6 +143,9 @@ def handle_scene(scene, **config):
|
||||
])
|
||||
if open_file:
|
||||
commands = ["open"]
|
||||
if (platform.system() == "Linux"):
|
||||
commands = ["xdg-open"]
|
||||
|
||||
if config["show_file_in_finder"]:
|
||||
commands.append("-R")
|
||||
#
|
||||
@ -149,7 +153,9 @@ def handle_scene(scene, **config):
|
||||
commands.append(scene.get_image_file_path())
|
||||
else:
|
||||
commands.append(scene.get_movie_file_path())
|
||||
sp.call(commands)
|
||||
FNULL = open(os.devnull, 'w')
|
||||
sp.call(commands, stdout=FNULL, stderr=sp.STDOUT)
|
||||
FNULL.close()
|
||||
|
||||
if config["quiet"]:
|
||||
sys.stdout.close()
|
||||
@ -261,4 +267,4 @@ def main():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
@ -4,4 +4,5 @@ Pillow==3.4.2
|
||||
progressbar==2.3
|
||||
scipy==0.17.1
|
||||
tqdm==4.7.1
|
||||
opencv-python==3.1.0
|
||||
git+https://github.com/scottopell/aggdraw-64bits@c95aac4369038706943fd0effb7d888683860e5a#egg=aggdraw
|
||||
|
Reference in New Issue
Block a user