Python _ + django, is this compiled code?

Just take a peek into python from the .net background.

Is python compiled as .net? If so, could it be confusing and more or less secure than compiled .net code which is confusing?

does almost all web hosts (unix) supporting django and python?

+2


source to share


6 answers


There are many Python implementations; three that are definitely solid, mature, and complete enough for production use, CPython , IronPython, and Jython . They are all usually compiled into some form of bytecode, also called intermediate code. Compilation from source to bytecode can be done as needed, but you can also do it ahead of time if you want; however Google App Engine, which allows you to run small Python web applications, including Django, for free, as one of its limitations requires you to download the source and not compile the code (I donโ€™t know which other host imposed the same limitation, but then I know none of you give you so many resources for free in exchange ;-).

You can be at home with IronPython, which is a Microsoft product (although I believe the first Microsoft product is completely open source): in that case, you can be sure that it is "compiled as .net" because(part of) .net (more precisely .net and silverlight). Therefore, it cannot be any more or less confusing and / or secure than .net (which means any other .net language).

Jython runs on the JVM, the Java Virtual Machine, in the same way that IronPython runs on the Microsoft Common Language Runtime known as the CLR. CPython has its own dedicated virtual machine.



For completeness, other implementations (not yet recommended for use in production) include pypy , a very flexible implementation that supports many possible reverse operations, ends (including but not limited to .net); odorless to assimilate , targeting evolving CPython to make it faster; pynie , a Python compiler for the Parrot virtual machine wpython , a re-implementation based on dictionary code instead of "bytecode"; and undoubtedly many, many others.

CPython, IronPython, Jython, and pypy can run Django (other implementations may be sufficient for this, but I'm not sure).

+9


source


I don't know about the security part, but.



  • Python is interpreted. Like PHP. (It turned into bytecode that CPython reads)
  • Django is just a framework on top of Python.
  • Python can be compiled.
  • And not all hosts support python + django.
+2


source


You don't need to worry about obfuscating your code, especially since it will run on your server.

In any case, you shouldn't put your code in a public directory. The correct approach to django (like PHP) is to make the code available to the web server, but not to the public.

And if your server security has been compromised, you'll have to worry about other things ...

+2


source


Obfuscation is a false defense. And the only thing worse than security is false security. Why are you obfuscating the web app anyway?

Python is compiled to bytecode and runs on a virtual machine, but is usually distributed as source code.

If you really plan on running your webapp on "almost every web host" this question is irrelevant. There are many good hosts out there that support python and django.

+1


source


Code obfuscation in .NET is mainly about changing variable names to make the parsed code difficult to understand. Yes, you can use these methods with CPython as well.

Now why don't you want to, this is another question. It does not actually provide you with any security or stop anyone from stealing your software.

0


source


Python is interpreted as a language. But you can compile a python program to a Unix executable using Freeze .

-1


source







All Articles