Your IP : 216.73.216.134


Current Path : /opt/rh/rh-python35/root/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/rh/rh-python35/root/lib64/python3.5/__pycache__/traceback.cpython-35.opt-1.pyc



���\�V�@s�dZddlZddlZddlZddlZddddddd	d
ddd
ddddddddgZddd�Zdd�Zdddd�Zddd	�Z	ddd�Z
dZdZddddd�Z
ddd d�Zd!d�Zd"d#�Zd$d%�Zdddd&d
�Zddd'd�Zdddd(d
�Zdddd)d�Zddd*d�Zddd+d�Zd,d�ZGd-d�d�Zd.d�Zd/d�ZGd0d�de�ZGd1d�d�ZdS)2z@Extract, format and print information about Python stack traces.�N�
extract_stack�
extract_tb�format_exception�format_exception_only�format_list�format_stack�	format_tb�	print_exc�
format_exc�print_exception�
print_last�print_stack�print_tb�clear_frames�FrameSummary�StackSummary�TracebackException�
walk_stack�walk_tbcCsO|dkrtj}x3tj|�j�D]}t|d|dd�q+WdS)zyPrint the list of tuples as returned by extract_tb() or
    extract_stack() as a formatted stack trace to the given file.N�file�end�)�sys�stderrr�	from_list�format�print)�extracted_listr�item�r�9/opt/rh/rh-python35/root/usr/lib64/python3.5/traceback.py�
print_lists	r!cCstj|�j�S)a�Format a list of traceback entry tuples for printing.

    Given a list of tuples as returned by extract_tb() or
    extract_stack(), return a list of strings ready for printing.
    Each string in the resulting list corresponds to the item with the
    same index in the argument list.  Each string ends in a newline;
    the strings may contain internal newlines as well, for those items
    whose source text line is not None.
    )rrr)rrrr rs
cCs tt|d|�d|�dS)aPrint up to 'limit' stack trace entries from the traceback 'tb'.

    If 'limit' is omitted or None, all entries are printed.  If 'file'
    is omitted or None, the output goes to sys.stderr; otherwise
    'file' should be an open file or file-like object with a write()
    method.
    �limitrN)r!r)�tbr"rrrr r+scCst|d|�j�S)z5A shorthand for 'format_list(extract_tb(tb, limit))'.r")rr)r#r"rrr r5scCstjt|�d|�S)a�Return list of up to limit pre-processed entries from traceback.

    This is useful for alternate formatting of stack traces.  If
    'limit' is omitted or None, all entries are extracted.  A
    pre-processed stack trace entry is a quadruple (filename, line
    number, function name, text) representing the information that is
    usually printed for a stack trace.  The text is a string with
    leading and trailing whitespace stripped; if the source is not
    available it is None.
    r")r�extractr)r#r"rrr r9szG
The above exception was the direct cause of the following exception:

zF
During handling of the above exception, another exception occurred:

TcCsd|dkrtj}xHtt|�||d|�jd|�D]}t|d|dd�q@WdS)a�Print exception up to 'limit' stack trace entries from 'tb' to 'file'.

    This differs from print_tb() in the following ways: (1) if
    traceback is not None, it prints a header "Traceback (most recent
    call last):"; (2) it prints the exception type and value after the
    stack trace; (3) if type is SyntaxError and value has the
    appropriate format, it prints the line where the syntax error
    occurred with a caret on the next line indicating the approximate
    position of the error.
    Nr"�chainrrr)rrr�typerr)�etype�valuer#r"rr%�linerrr rSs
	+cCs.ttt|�||d|�jd|��S)azFormat a stack trace and the exception information.

    The arguments have the same meaning as the corresponding arguments
    to print_exception().  The return value is a list of strings, each
    ending in a newline and some containing internal newlines.  When
    these lines are concatenated and printed, exactly the same text is
    printed as does print_exception().
    r"r%)�listrr&r)r'r(r#r"r%rrr rhscCstt||d�j��S)aFormat the exception part of a traceback.

    The arguments are the exception type and value such as given by
    sys.last_type and sys.last_value. The return value is a list of
    strings, each ending in a newline.

    Normally, the list contains a single string; however, for
    SyntaxError exceptions, it contains several lines that (when
    printed) display detailed information about where the syntax
    error occurred.

    The message indicating which exception occurred is always the last
    string in the list.

    N)r*rr)r'r(rrr rxscCsLt|�}|dks+|dks+|r8d|}nd||f}|S)N�Nonez%s
z%s: %s
)�	_some_str)r'r(�valuestrr)rrr �_format_final_exc_line�s

r.c	Cs.yt|�SWndt|�jSYnXdS)Nz<unprintable %s object>)�strr&�__name__)r(rrr r,�sr,cCs&ttj�d|d|d|�dS)z>Shorthand for 'print_exception(*sys.exc_info(), limit, file)'.r"rr%N)rr�exc_info)r"rr%rrr r	�scCs%djttj�d|d|��S)z%Like print_exc() but return a string.rr"r%)�joinrrr1)r"r%rrr r
�scCsAttd�std��ttjtjtj|||�dS)znThis is a shorthand for 'print_exception(sys.last_type,
    sys.last_value, sys.last_traceback, limit, file)'.�	last_typezno last exceptionN)�hasattrr�
ValueErrorrr3�
last_value�last_traceback)r"rr%rrr r�scCs;|dkrtj�j}tt|d|�d|�dS)z�Print a stack trace from its invocation point.

    The optional 'f' argument can be used to specify an alternate
    stack frame at which to start. The optional 'limit' and 'file'
    arguments have the same meaning as for print_exception().
    Nr"r)r�	_getframe�f_backr!r)�fr"rrrr r
�scCs1|dkrtj�j}tt|d|��S)z5Shorthand for 'format_list(extract_stack(f, limit))'.Nr")rr8r9rr)r:r"rrr r�scCsD|dkrtj�j}tjt|�d|�}|j�|S)asExtract the raw traceback from the current stack frame.

    The return value has the same format as for extract_tb().  The
    optional 'f' and 'limit' arguments have the same meaning as for
    print_stack().  Each item in the list is a quadruple (filename,
    line number, function name, text), and the entries are in order
    from oldest to newest stack frame.
    Nr")rr8r9rr$r�reverse)r:r"�stackrrr r�s
	
cCsFx?|dk	rAy|jj�Wntk
r4YnX|j}qWdS)zEClear all references to local variables in the frames of a traceback.N)�tb_frame�clear�RuntimeError�tb_next)r#rrr r�s
c@s|eZdZdZdZdddd	d
d	dd�Zd
d�Zdd�Zdd�Zdd�Z	e
dd��Zd	S)ra,A single frame from a traceback.

    - :attr:`filename` The filename for the frame.
    - :attr:`lineno` The line within filename for the frame that was
      active when the frame was captured.
    - :attr:`name` The name of the function or method that was executing
      when the frame was captured.
    - :attr:`line` The text from the linecache module for the
      of code that was running when the frame was captured.
    - :attr:`locals` Either None if locals were not supplied, or a dict
      mapping the name to the repr() of the variable.
    �filename�lineno�name�_line�locals�lookup_lineTNr)cCsc||_||_||_||_|r1|j|rVtdd�|j�D��nd|_dS)a�Construct a FrameSummary.

        :param lookup_line: If True, `linecache` is consulted for the source
            code line. Otherwise, the line will be looked up when first needed.
        :param locals: If supplied the frame locals, which will be captured as
            object representations.
        :param line: If provided, use this instead of looking up the line in
            the linecache.
        css'|]\}}|t|�fVqdS)N)�repr)�.0�k�vrrr �	<genexpr>sz(FrameSummary.__init__.<locals>.<genexpr>N)rArBrCrDr)�dict�itemsrE)�selfrArBrCrFrEr)rrr �__init__�s				zFrameSummary.__init__cCs�t|t�rU|j|jkoT|j|jkoT|j|jkoT|j|jkSt|t�r�|j|j|j|jf|kStS)N)	�
isinstancerrArBrCrE�tupler)�NotImplemented)rN�otherrrr �__eq__s"zFrameSummary.__eq__cCs |j|j|j|jf|S)N)rArBrCr))rN�posrrr �__getitem__
szFrameSummary.__getitem__cCs"t|j|j|j|jg�S)N)�iterrArBrCr))rNrrr �__iter__szFrameSummary.__iter__cCs%djd|jd|jd|j�S)Nz7<FrameSummary file {filename}, line {lineno} in {name}>rArBrC)rrArBrC)rNrrr �__repr__s	zFrameSummary.__repr__cCs7|jdkr0tj|j|j�j�|_|jS)N)rD�	linecache�getlinerArB�strip)rNrrr r)s!zFrameSummary.line)zfilenamezlinenoznamez_linezlocals)r0�
__module__�__qualname__�__doc__�	__slots__rOrTrVrXrY�propertyr)rrrr r�s	
ccsL|dkrtj�jj}x'|dk	rG||jfV|j}q!WdS)z�Walk a stack yielding the frame and line number for each frame.

    This will follow f.f_back from the given frame. If no frame is given, the
    current stack is used. Usually used with StackSummary.extract.
    N)rr8r9�f_lineno)r:rrr rs
ccs1x*|dk	r,|j|jfV|j}qWdS)z�Walk a traceback yielding the frame and line number for each frame.

    This will follow tb.tb_next (and thus is in the opposite order to
    walk_stack). Usually used with StackSummary.extract.
    N)r=�	tb_linenor@)r#rrr r+sc	@sXeZdZdZedddddddd	��Zed
d��Zdd
�ZdS)rzA stack of frames.r"N�lookup_linesT�capture_localsFc

Cs`|dkr<ttdd�}|dk	r<|dkr<d}|dk	r|dkritj||�}ntj|d|�}|�}t�}x�|D]�\}}|j}	|	j}
|	j	}|j
|
�tj|
|j
�|r�|j}nd}|jt|
||ddd|��q�Wx|D]}
tj|
�q'W|r\x|D]
}|jqKW|S)a?Create a StackSummary from a traceback or stack object.

        :param frame_gen: A generator that yields (frame, lineno) tuples to
            include in the stack.
        :param limit: None to include all frames or the number of frames to
            include.
        :param lookup_lines: If True, lookup lines for each frame immediately,
            otherwise lookup is deferred until the frame is rendered.
        :param capture_locals: If True, the local variables from each frame will
            be captured as object representations into the FrameSummary.
        N�tracebacklimitr�maxlenrFFrE)�getattrr�	itertools�islice�collections�deque�set�f_code�co_filename�co_name�addrZ�	lazycache�	f_globals�f_locals�appendr�
checkcacher))
�klass�	frame_genr"rdre�result�fnamesr:rB�corArCrtrrr r$9s6					
	 

zStackSummary.extractcCsnt�}x^|D]V}t|t�r5|j|�q|\}}}}|jt|||d|��qW|S)z�Create a StackSummary from a simple list of tuples.

        This method supports the older Python API. Each tuple should be a
        4-tuple with (filename, lineno, name, line) elements.
        r))rrPrru)rw�a_listry�framerArBrCr)rrr ris	
#zStackSummary.from_listcCs�g}x�|D]�}g}|jdj|j|j|j��|jrf|jdj|jj���|jr�xBt|jj	��D]+\}}|jdjd|d|��q�W|jdj
|��q
W|S)aGFormat the stack ready for printing.

        Returns a list of strings ready for printing.  Each string in the
        resulting list corresponds to a single frame from the stack.
        Each string ends in a newline; the strings may contain internal
        newlines as well, for those items with source text lines.
        z  File "{}", line {}, in {}
z    {}
z    {name} = {value}
rCr(r)rurrArBrCr)r\rE�sortedrMr2)rNryr}�rowrCr(rrr r}s
		"#zStackSummary.format)r0r]r^r_�classmethodr$rrrrrr r6s.c
@s�eZdZdZddddddddd	d
�Zedd��Zd
d�Zdd�Zdd�Z	dd�Z
dddd�ZdS)ra�An exception ready for rendering.

    The traceback module captures enough attributes from the original exception
    to this intermediary form to ensure that no references are held, while
    still being able to fully print or format it.

    Use `from_exception` to create TracebackException instances from exception
    objects, or the constructor to create TracebackException instances from
    individual components.

    - :attr:`__cause__` A TracebackException of the original *__cause__*.
    - :attr:`__context__` A TracebackException of the original *__context__*.
    - :attr:`__suppress_context__` The *__suppress_context__* value from the
      original exception.
    - :attr:`stack` A `StackSummary` representing the traceback.
    - :attr:`exc_type` The class of the original traceback.
    - :attr:`filename` For syntax errors - the filename where the error
      occured.
    - :attr:`lineno` For syntax errors - the linenumber where the error
      occured.
    - :attr:`text` For syntax errors - the text where the error
      occured.
    - :attr:`offset` For syntax errors - the offset into the text where the
      error occured.
    - :attr:`msg` For syntax errors - the compiler error message.
    r"NrdTreF�_seenc
Cs�|dkrt�}|j|�|r�|jdk	r�|j|kr�tt|j�|j|jjd|ddd|d|�}nd}|r�|jdk	r�|j|kr�tt|j�|j|jjd|ddd|d|�}	nd}	||_||_|	|_|r|jnd|_t	j
t|�d|d|d|�|_||_
t|�|_|r�t|t�r�|j|_t|j�|_|j|_|j|_|j|_|r�|j�dS)Nr"rdFrer�)rmrq�	__cause__rr&�
__traceback__�__context__�
exc_traceback�__suppress_context__rr$rr<�exc_typer,�_str�
issubclass�SyntaxErrorrAr/rB�text�offset�msg�_load_lines)
rNr��	exc_valuer�r"rdrer��cause�contextrrr rO�sT	
				zTracebackException.__init__cOstt|�||j||�S)z.Create a TracebackException from an exception.)rr&r�)rN�exc�args�kwargsrrr �from_exception�sz!TracebackException.from_exceptioncCsKx|jD]
}|jq
W|jr1|jj�|jrG|jj�dS)z7Private API. force all lines in the stack to be loaded.N)r<r)r�r�r�)rNr}rrr r��s	
	zTracebackException._load_linescCs|j|jkS)N)�__dict__)rNrSrrr rT�szTracebackException.__eq__cCs|jS)N)r�)rNrrr �__str__�szTracebackException.__str__c	cs||jdkr$td|j�VdS|jj}|jj}|dkrV|d|}t|jt�s}t||j�VdS|jp�d}t|j	�p�d}dj
||�V|j}|j}|dk	rXdj
|j
��V|dk	rX|jd	�}tt|�|�d
}|d|�j�}dd�|D�}d
j
dj|��V|jpdd}dj
||�VdS)a�Format the exception part of the traceback.

        The return value is a generator of strings, each ending in a newline.

        Normally, the generator emits a single string; however, for
        SyntaxError exceptions, it emites several lines that (when
        printed) display detailed information about where the syntax
        error occurred.

        The message indicating which exception occurred is always the last
        string in the output.
        N�__main__�builtins�.z<string>�?z  File "{}", line {}
z    {}
�
�css'|]}|j�r|pdVqdS)� N)�isspace)rH�crrr rK&sz;TracebackException.format_exception_only.<locals>.<genexpr>z    {}^
rz<no detail available>z{}: {}
)z__main__zbuiltins)r�r.r�r^r]r�r�rAr/rBrr�r�r\�rstrip�min�len�lstripr2r�)	rN�stype�smodrArB�badliner��
caretspacer�rrr r�s2
		z(TracebackException.format_exception_onlyr%ccs�|rk|jdk	r5|jjd|�EdHtVn6|jdk	rk|jrk|jjd|�EdHtV|jdk	rdV|jj�EdH|j�EdHdS)a�Format the exception.

        If chain is not *True*, *__cause__* and *__context__* will not be formatted.

        The return value is a generator of strings, each ending in a newline and
        some containing internal newlines. `print_exception` is a wrapper around
        this method which just prints the lines to a file.

        The message indicating which exception occurred is always the last
        string in the output.
        Nr%z#Traceback (most recent call last):
)	r�r�_cause_messager�r��_context_messager�r<r)rNr%rrr r+s
zTracebackException.format)r0r]r^r_rOr�r�r�rTr�rrrrrr r�s	9	-)r_rkrirZr�__all__r!rrrrr�r�rrrr.r,r	r
rr
rrrrrrr*rrrrrr �<module>sD			
?
]

Rosenblum TV: Video training, virtual workshops, classes, tutorials
logologologologo
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact
  • About
  • What We Do
  • Our Clients
  • Case Studies
    • The BBC
    • CBS News
    • New York Times Television
    • Spectrum News
    • The Newark Star-Ledger
    • The United Nations
    • McGraw/Hill
    • Oyster Yachts
    • Scottish Environmental Protection Agency
  • The Power of Storytelling
  • Why iPhones?
  • Michael on Media
  • Books
  • Contact

RE-INVENTING THE TELEVISION NEWS BUSINESS*

A revolution in video storytelling

Creating entirely new & cost-effective production methods

From the world leaders in video production training and the creators of Character Driven Storytelling™

*and every other business that uses video

WHAT WE DO

Over the past 35 years, we have designed, built or restructured some of the most powerful news and journalism companies in the world.

We replace the traditional TV news ‘crew’ with one highly trained journalist, working alone with nothing but an iPhone.

No more TV news ‘crews’, no editors and no field producers.

This is television news done the way newspaper journalism is done – one reporter with their electronic pad and pencil.

In doing this, we can cut the cost of production by as much as 75% while increasing ratings and audience engagement.

In the place of conventional TV news ‘packages’ – ie, reporter stand up, interview, b-roll, man on the street, we marry great journalism with Netflix and Hollywood storytelling.

It’s a combination that works.

We have taken most of our clients to #1 in their respective markets.

And it’s not just for news. Any company, any profit, any NGO and anyone else who is online needs to tell their story in compelling yet cost-effective video. We can teach you to do that. Either in person or virtually.

EXAMPLES OF WHAT WE CAN TEACH YOUR STAFF TO PRODUCE

ITAY HOD

Itay Hod, MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2018.

Because he works alone, with only an iPhone, he was able to embed himself with a homeless family.

Here’s the story he produced in a one-day turn.

KIET DO

Kiet Do, an MMJ with KPIX/CBS in San Francisco, took the 5-Day Intensive Video Storytelling Bootcamp in 2021.

Here is a story he produced, all on his own, with only an iPhone and in a one-day turn.

TAYLOR SCHAUB

Taylor Schaub, an MMJ with Spectrum News 1 in LA, took the 5-Day Intensive Video Storytelling Bootcamp in 2023.

Here is a story he turned in only one day, using only an iPhone. It was the first video story he ever did and it was nominated for an Emmy.

THE BOOTCAMP

How do we convert stations and whole networks to working in this way?

Since 1988, we have run intensive 5-Day Video Storytelling Bootcamps

We have done these all over the world.

These are hands-on bootcamps, and participants learn an entirely new way of creating TV news stories.

-We shoot at a 3:1 ratio or lower, so turnaround times are fast.

-We go directly from camera to timelilne and edit – no written scripts.  We work in the medium of pictures and sound.

-We are entirely character-driven.

-We are driven by pictures and real events.

-We are focused almost entirely on ’the viewer experience’.

Since 1988, more than 70,000 journalists around the world have taken our bootcamps, either in person on virtualy.

Case Studies

CBS Case Study Logos
CBS News

We have started to work with CBS News, bringing our ideas of character-driven storytelling to one of the most successful and biggest networks in the United States. Since beginning to work with them ratings have climbed and more importantly, audience engagement is through the ceiling.

Learn More
NYT Case Study Logos
New York Times Television

We started New York Times Television in 1990 and it was the first paper to be brought into the world of TV. It quickly became one of the most successful non-fiction production companies in the United States. The series and documentaries we produced won many awards including multiple Emmys.

Learn More
BBC Case Study Logos
The BBC

We have been working with the BBC since the year 2000 helping to convert their national news network to our visual storytelling technique. Most recently we have trained teams from their sports, documentaries, and comedy divisions to make character-driven stories using only smartphones.

Learn More
Spectrum Case Study Logos
Spectrum News

For the past five years we have worked with Spectrum News to introduce and train their journalists on visual, character driven storytelling using smartphones helping to create a different kind of local news for their network of 24-Hour News Stations across the United States.

Learn More
UN Case Study Logos
The United Nations

In 2006, we were approached by the United Nations. Rather than rely on news outlets, it would be much easier to train the field operatives to produce their own stories. We spent two years working with the UN, training more than 100 of their staff in bootcamps in Geneva and Nairobi.

Learn More
Star Ledger Case Study Logos
The Newark Star-Ledger

We trained 50 print reporters at the paper to shoot and tell their own stories, in conjunction with their print work. We built a TV newsroom in their existing print newsroom – you could not ask for a better set and they began to live stream their stories in conjunction with their print work.

Learn More
Mcgraw Hill Case Study Logos
Mcgraw Hill

We spent two years with McGraw Hill, training more than 150 of their staffers, making them completely video literate. McGraw/Hill media properties we transit included Business Week, Aviation Week, (what was the name of the architecture magazine), and JD Power and Associates.

Learn More
VOA Case Study Logos
Voice of America

In 1990, we were approached by The Voice of America, the official broadcasting agency for the United States Government. When we met with VOA, they were only a short wave radio broadcaster, but working with them, we took them into television, launching VOA-TV.

Learn More
Oyster Case Study Logos
Oyster Yachts

British based Oyster Yachts makes some of the finest yachts in the world. Like every other company, they had to find a way to feed the never-ending video demands of social media – sites like Instagram and TikTok. We trained the Oyster staff to tell their own stories, using only iPhones.

Learn More
SEPA Case Study Logos
Scottish Environmental Protection Agency

We were approached by SEPA, the Scottish Environmental Protection Agency because they had to continually find a way to ‘feed the media beast’. The result was that SEPA was able to tell their own stories, whenever they wanted, and at almost no additional cost.

Learn More
Image 11-11-22 at 6.25 PM

Michael on Media

Michael Rosenblum has been writing about the media since 1988. His work and ideas have appeared in The Guardian, The Huffington Post, Ilkeston Life and many other publications.

He has been blogging regularly for the past 35 years on this subject. Having taught media studies at Columbia University, NYU and now the University of Oxford, he is considered an expert on this subject.

Continue reading this post or look back at previous posts.

Read More

Do You Have Questions About Learning Video Skills?

If you would like to know more about our courses contact us and one of our training advisors will be happy to call you.

Contact Us

Copyright 2024. All rights reserved.