Jump to content


Photo

python source code


  • Please log in to reply
4 replies to this topic

#1 deepspace221

  • Senior Member
  • 99 posts

0
Neutral

Posted 28 January 2016 - 01:05

Starting with python. Would like to view the source code to learn a bit more.

I've python v2.7.9.

 

Should I get the source from here as it is?

https://www.python.o...ython-2.7.9.tgz

 

I just see all these patches with the python-src package (v2.7.3):

Source: http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 file://01-use-proper-tools-for-cross-build.patch file://03-fix-tkinter-detection.patch file://05-enable-ctypes-cross-build.patch file://06-ctypes-libffi-fix-configure.patch file://06-avoid_usr_lib_termcap_path_in_linking.patch file://sitecustomize.py file://multilib.patch file://cgi_py.patch file://remove_sqlite_rpath.patch file://setup_py_skip_cross_import_check.patch file://add-md5module-support.patch file://host_include_contamination.patch file://fix_for_using_different_libdir.patch file://setuptweaks.patch file://check-if-target-is-64b-not-host.patch file://search_db_h_in_inc_dirs_and_avoid_warning.patch file://avoid_warning_about_tkinter.patch file://avoid_warning_for_sunos_specific_module.patch file://python-2.7.3-berkeley-db-5.3.patch file://python-2.7.3-remove-bsdb-rpath.patch file://builddir.patch file://python-2.7.3-CVE-2012-2135.patch file://gcc-4.8-fix-configure-Wformat.patch file://fix-makefile-for-ptest.patch file://run-ptest file://CVE-2013-4073_py27.patch file://pypirc-secure.patch file://parallel-makeinst-create-bindir.patch file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch file://python-fix-build-error-with-Readline-6.3.patch file://python-2.7.3-CVE-2014-1912.patch file://json-flaw-fix.patch file://posix_close.patch file://remove-BOM-insection-code.patch file://python-2.7.3-CVE-2014-7185.patch file://python2.7.3-nossl3.patch file://04-default-is-optimized.patch file://99-ignore-optimization-flag.patch file://some_configure_fixes.patch;striplevel=0 file://fix_pthread_site.patch;striplevel=0 file://no-ldconfig.patch file://ctypes-error-handling-fix.patch file://setuptweaks-2.patch file://pgettext.patch

What exactly is the resolved path for these patch files?


Edited by deepspace221, 28 January 2016 - 01:06.


Re: python source code #2 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 28 January 2016 - 10:11

Python is a programming language.

Learning Python from the Python source is like learning C++ from the GCC source code.

What is it you want to do? Learn Python or create an E2 plugin?
Real musicians never die - they just decompose

Re: python source code #3 deepspace221

  • Senior Member
  • 99 posts

0
Neutral

Posted 28 January 2016 - 11:27

I've forked webif and digging a bit into the code as I want to learn and modify it.
I'm following the import statements and would like to read the code from the box and play with it.
I want everything that is being called to have its source code presented, so I can inspect it, modify it, and see what's what.
 
I've source code for webif and enigma2 and I would like also for python to be there.
There are also some py files like the enigma.pyo I didn't find, even though I've cloned the repo.
 
For python, I figured I can copy the lib files from the link, but wasn't sure if they need to be patched in some way first.
 
btw, can I install git directly on the box, or do I have to ftp the files?
 
Thank you for helping me setup and getting started.

Edited by deepspace221, 28 January 2016 - 11:29.


Re: python source code #4 MiLo

  • PLi® Core member
  • 14,055 posts

+298
Excellent

Posted 28 January 2016 - 11:33

The box just runs Linux, so in theory, you can install whatever you want.

However, since the box isn't a very friendly development platform, it's much easier to do the development on a PC.

You can install the same packages on the PC, and inspect the source code from there. All source code is on github.

"enigma" is a module that was automatically generated from the Enigma2 C++ source code. The corresponding ".py" code is of no use to anyone.
Real musicians never die - they just decompose

Re: python source code #5 deepspace221

  • Senior Member
  • 99 posts

0
Neutral

Posted 28 January 2016 - 23:10

It was a hint to add git to the repositories, if possible, as I was looking for it there...

 

I've installed enigma on the pc (a long time ago). 

Currently, I'll need to use vmware, and it would be a hassle... 

I'm mostly reading now and experimenting with only small changes, anyway. 

But when I'll have more to contribute, I'll deferentially do it again.


Edited by deepspace221, 28 January 2016 - 23:10.



3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users