Question regarding the standard library?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hussein B

    Question regarding the standard library?

    Hey,
    Is the standard library of Python is compiled (you know, the pyc
    thing)?
    Is it allowed to edit the source code of the standard library?
    I'm not talking about submitting the modified code to Python source
    code repository, I'm just asking if some one can edit the source code
    in his own machine.
    Thanks.
  • Fredrik Lundh

    #2
    Re: Question regarding the standard library?

    Hussein B wrote:
    Is the standard library of Python is compiled (you know, the pyc
    thing)?
    Is it allowed to edit the source code of the standard library?
    I'm not talking about submitting the modified code to Python source
    code repository, I'm just asking if some one can edit the source code
    in his own machine.
    Python ships with the library sources, and you can of course edit them
    in exactly the same way as you'll edit any other Python file. modules
    in the standard library are no different from your own modules in that
    respect.

    whether it's a good idea to edit them (unless you're trying to track
    down bugs or provide patches to the maintainers) is a different issue.

    </F>

    Comment

    • Hussein B

      #3
      Re: Question regarding the standard library?

      On Aug 19, 7:16 am, Fredrik Lundh <fred...@python ware.comwrote:
      Hussein B wrote:
      Is the standard library of Python is compiled (you know, the pyc
      thing)?
      Is it allowed to edit the source code of the standard library?
      I'm not talking about submitting the modified code to Python source
      code repository, I'm just asking if some one can edit the source code
      in his own machine.
      >
      Python ships with the library sources, and you can of course edit them
      in exactly the same way as you'll edit any other Python file. modules
      in the standard library are no different from your own modules in that
      respect.
      >
      whether it's a good idea to edit them (unless you're trying to track
      down bugs or provide patches to the maintainers) is a different issue.
      >
      </F>
      Thanks.
      Is the standard library compiled?

      Comment

      • Fredrik Lundh

        #4
        Re: Question regarding the standard library?

        Hussein B wrote:
        Is the standard library compiled?
        the portions are written in Python are compiled to PYC files, just like
        modules you write yourself are automatically compiled to PYC files when
        you import them.

        (why not just look in the Python installation tree? it's all there for
        you to tinker with.)

        </F>

        Comment

        Working...