Python and Blocs

Python seems to be getting much attention. I recently had a meeting with an expert in that field. He strongly believes Python is the future of coding. If that is the case, will there be any known issues with Blocs 3?

Python is more about backend programming rather than front-end coding in the browser. It’s possible that may change, but I don’t see javascript going away anytime soon.

Python & Django are often replacements for PHP in dynamically generated pages. I used to use Java Server Pages - there are loads of technologies out there for the web server coding for dynamic pages, Python is very popular right now, particularly with library support for AI and data analysis.

I’m sure Norm will chime in but I don’t see Python as relevant for Blocs 3. Javascript is king on the front-end.

I am currently using blocs with python django framework.

I still have some issues, particularly for managing static files but It works

Jerome are you using blocs designs as a template for use with python on the backend (as per PHP or JSP)?

Nope,
Only front so far.

I don’t know what is your purpose here but I can tell you this.

Frontend and Backend is totally different things. JavaScript is the only language that has the capability to work on both sides.

If you are looking for data analysis and machine learning coding then you should use Python and R because these are the first choice for all the developers. Jupyter notebook is the best tool here and Visual Studio Code is the best editor out there.

I hope this helps,

Best regards,

1 Like

Python is indeed a generally solid language. Used it in prior work to build chunks of enterprise apps at scale (it’s not just a scripting language as some seem to think :wink: ), as well as doing some Pylons/Pyramid (like django) some time ago - which is a web MVC framework.

As others stated, python isn’t inherently a web front end language, but can be used to replace PHP to an extent for backend code, calls into DBs, or pretty much anything else not directly web UI. Frameworks like Django, Turbogears, Pyramid/Pylons etc. let you basically templatize a LAMP/WAMP app in a reasonably sane fashion using a MVC (Model / view / controller) model model, stubbing out schema and site routing etc. Basically - pretty much overkill for most small static type sites, but becomes useful when considering something more DB or backend driven.

Not sure what problem you’re trying to solve here, but I also highly recommend Python as a first programming language, as it’s less clunky than Java to get going on, less complicated in obscure ways than C++, more readable than both, and can be leveraged almost immediately for scripting of simple things and growing into more complex apps, object oriented, … - as well as someone mentioned, used heavily in machine learning along with Ruby.

Hi Pauland,
now i use Blocs with Django as templates indeed.
I rewrite a bit the HTML & CSS in a proper Django way, mostly for links (avoid hard coding) & static assets {% static %}.
It works pretty well.
You can also directly integrate CSS classes in your template as a ‘context’ in your def or class.

Finally, check your CSS for your background images & rewrite these in ‘static’ links as well & all will run smoothly. )

This is an interesting article