Python scripting

Hello everyone,

Pretty unusual question here :slight_smile:

I was wondering what would be the best and the quick way for me to learn python in order to be able to read frappe/erpnext python codes and master customizations.

Which libraries? which aspects should one focus on? knowing that I am familiar with programming in general and MATLAB in particular. The goal here is to understand the python codes of frappe/erpnext.

Thank you in advance for your answers

Cheers

some basic python video course/tutorial. youtube, udemy whatever. probably invest a day.
then start working on frappe/erpnext problems and tasks.
read/analyse the existing codebase. try to adapt stuff. try to create new functionality.

I have also never worked with python before. just java.
still dont like it, but manage to handle it… :wink:

2 Likes

I was a .Net guy who develops desktop apps with C#, SQL Server, Windows Server for a proprietary ERP system etc. So I was completely belong to other side.
I think Python is closer to the human language then other languages. So I would invest in learning Python with ERPNext. Python have 5 or 10 gotchas. If you can code anything in any language you will see that it is also readible.

1 Like

I also started my ERPNext journey without really knowing Python. I’d written desktop and server applications in other languages since I was a kid. And like Türker, was a proprietary ERP developer for a long time.

I cannot remember how I learned Python. However, I’m a generally a fan of the “Head First” book series here. They are normally of good quality, useful for both new programmers, but also people learning Python as a 2nd or 3rd language.

I agree with my peers above. Python has 5 or 10 gotchas. I have an alternating love-hate relationship with the language (it depends on the day!)

I also agree that a great way to learn Frappe-flavored Python = reading what already exists, making small changes, and building on them. Trying to duplicate what someone has already done, then do your own experiements.

Use the global search here on the forums. There’s a ton of information stored here.
image

For the longest time (and it still happens) one my biggest challenges wasn’t Python. It was the particular Frappe terminology. You’ll encounter a variety of words and phrases that are used often, but rarely fully explained for a newcomer. Things like hooks, fixtures, Scripts, multitenant, and a bunch more.

“Sites” is not the same thing as “Web Sites”. “Web Pages” are different from “Pages”. And though both of those might be “pages”, you could say that parent Documents are “pages” too.

‘Customize’ is a completely loaded term with special meaning. It’s not-at-all the same thing as “modify” or “change” or “develop.”

Someday, you will see the words “Is Standard”. When you do, please immediately erase those words from your mind, and substitute with “Stored as JSON on Disk”. That will save you some headaches. :smile:

4 Likes

precise “description” for the field.

1 Like