Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36219 > unrolled thread

Re: Python programming philosophy

Started bychaouche yacine <yacinechaouche@yahoo.com>
First post2013-01-05 14:34 -0800
Last post2013-01-05 19:41 -0800
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python programming philosophy chaouche yacine <yacinechaouche@yahoo.com> - 2013-01-05 14:34 -0800
    Re: Python programming philosophy 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-05 19:41 -0800
    Re: Python programming philosophy 88888 Dihedral <dihedral88888@googlemail.com> - 2013-01-05 19:41 -0800

#36219 — Re: Python programming philosophy

Fromchaouche yacine <yacinechaouche@yahoo.com>
Date2013-01-05 14:34 -0800
SubjectRe: Python programming philosophy
Message-ID<mailman.153.1357425282.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

The compiler reads your source code and parses it into parse trees. This is first step. It then takes the parse trees and transform them into abstract syntax trees, which are like a DOM tree in an HTML file, and then transform that AST into a control flow graph, and finally a bytecode is produced out of that control flow graph. The pyc files you see are this bytecode, so they are produced at the end. Anytime you edit your .py file, a new .pyc file is created if you invoke the python interpreter myfile.py on the former. If your .py file doesn't change, the .pyc file stays the same.
Just like with java, this allows you to write a single .py file that can work on any platform without changing the source file, because all the cross platform issues are handled by the virtual machine.



________________________________
From: Nac Temha <naccttemha@gmail.com>
To: python-list@python.org 
Sent: Saturday, January 5, 2013 11:05 PM
Subject: Python programming philosophy


Hello,



I want to learn working principle of python as broadly. How to interpret the python?  For example, what is pyc files and when does it occur?
Can you explain them? Thanks in advance.
-- 
http://mail.python.org/mailman/listinfo/python-list

[toc] | [next] | [standalone]


#36221

From88888 Dihedral <dihedral88888@googlemail.com>
Date2013-01-05 19:41 -0800
Message-ID<daeba967-0123-4cdd-a453-cc912e779861@googlegroups.com>
In reply to#36219
chaouche yacine於 2013年1月6日星期日UTC+8上午6時34分38秒寫道:
> The compiler reads your source code and parses it into parse trees. This is first step. It then takes the parse trees and transform them into abstract syntax trees, which are like a DOM tree in an HTML file, and then transform that AST into a control flow graph, and finally a bytecode is produced out of that control flow graph. The pyc files you see are this bytecode, so they are produced at the end. Anytime you edit your .py file, a new .pyc file is created if you invoke the python interpreter myfile.py on the former. If your .py file doesn't change, the .pyc file stays the same.
> 
> Just like with java, this allows you to write a single .py file that can work on any platform without changing the source file, because all the cross platform issues are handled by the virtual machine.
> 
> 
> 
> 
> ________________________________
>  From: Nac Temha <nacct...@gmail.com>
> To: pytho...@python.org 
> Sent: Saturday, January 5, 2013 11:05 PM
> Subject: Python programming philosophy
> 
> 
> Hello,
> 
> 
> 
> I want to learn working principle of python as broadly. How to interpret the python?  For example, what is pyc files and when does it occur?
> Can you explain them? Thanks in advance.
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Yes, check JYTHON tutorials to understand dynamic types.

Java is still a fixed type computer language.

[toc] | [prev] | [next] | [standalone]


#36222

From88888 Dihedral <dihedral88888@googlemail.com>
Date2013-01-05 19:41 -0800
Message-ID<mailman.154.1357443716.2939.python-list@python.org>
In reply to#36219
chaouche yacine於 2013年1月6日星期日UTC+8上午6時34分38秒寫道:
> The compiler reads your source code and parses it into parse trees. This is first step. It then takes the parse trees and transform them into abstract syntax trees, which are like a DOM tree in an HTML file, and then transform that AST into a control flow graph, and finally a bytecode is produced out of that control flow graph. The pyc files you see are this bytecode, so they are produced at the end. Anytime you edit your .py file, a new .pyc file is created if you invoke the python interpreter myfile.py on the former. If your .py file doesn't change, the .pyc file stays the same.
> 
> Just like with java, this allows you to write a single .py file that can work on any platform without changing the source file, because all the cross platform issues are handled by the virtual machine.
> 
> 
> 
> 
> ________________________________
>  From: Nac Temha <nacct...@gmail.com>
> To: pytho...@python.org 
> Sent: Saturday, January 5, 2013 11:05 PM
> Subject: Python programming philosophy
> 
> 
> Hello,
> 
> 
> 
> I want to learn working principle of python as broadly. How to interpret the python?  For example, what is pyc files and when does it occur?
> Can you explain them? Thanks in advance.
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Yes, check JYTHON tutorials to understand dynamic types.

Java is still a fixed type computer language.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web