~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/modules/console_shell.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
import bpy
22
22
 
23
 
language_id = 'shell'
 
23
language_id = "shell"
24
24
 
25
25
 
26
26
def add_scrollback(text, text_type):
27
 
    for l in text.split('\n'):
28
 
        bpy.ops.console.scrollback_append(text=l.replace('\t', '    '),
29
 
            type=text_type)
 
27
    for l in text.split("\n"):
 
28
        bpy.ops.console.scrollback_append(text=l.replace("\t", "    "),
 
29
                                          type=text_type)
30
30
 
31
31
 
32
32
def shell_run(text):
40
40
 
41
41
    add_scrollback(output, style)
42
42
 
43
 
PROMPT = '$ '
 
43
PROMPT = "$ "
44
44
 
45
45
 
46
46
def execute(context):
57
57
 
58
58
    # insert a new blank line
59
59
    bpy.ops.console.history_append(text="", current_character=0,
60
 
        remove_duplicates=True)
 
60
                                   remove_duplicates=True)
61
61
 
62
62
    sc.prompt = os.getcwd() + PROMPT
63
63
    return {'FINISHED'}