Is there a published set of coding conventions or guidelines or similar for writing python applications and utilities withing Linux Mint?
I've looked a a few of the python-based applications and utilities as source packages and they all seem to follow a similar but different set of coding behaviors. Am I missing something?
Thanks in advance,
~~~ 0;-Dan
seeking "coding conventions" for python-based project
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- SaintDanBert
- Level 4
- Posts: 449
- Joined: Sat Feb 20, 2010 4:04 pm
- Location: Covington, LA USA
seeking "coding conventions" for python-based project
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: seeking "coding conventions" for python-based project
Here's a link to a pretty basic online Python tutorial, with references and examples. It may be too simple for what you are looking for, but it does have some good info . . (don't miss those green Next buttons, or the link to the official Python website)
https://www.w3schools.com/python/default.asp
https://www.w3schools.com/python/default.asp
- SaintDanBert
- Level 4
- Posts: 449
- Joined: Sat Feb 20, 2010 4:04 pm
- Location: Covington, LA USA
Re: seeking "coding conventions" for python-based project
Thanks for this...richyrich wrote: ⤴Mon Jul 16, 2018 7:04 pm Here's a link to a pretty basic online Python tutorial, with references and examples. It may be too simple for what you are looking for, but it does have some good info . . (don't miss those green Next buttons, or the link to the official Python website)
https://www.w3schools.com/python/default.asp
I'm surprised that the Mint family (Mint<--*buntu<-- Debian) don't have a style guide or similar.
If one exists, I wish someone would tell me where to find it.
ASIDE -- I fetched the source package for mintUpdate. Um, er, very few comments. The modularization seems okay during a quick review.
I taught C/C++ at a major university and would only give the package code a high-C or low-B grade again based on a quick review.
That is one man's opinion -- mine, so please don't flame this posting.
A RELATED QUESTION:
What are folks using as an IDE for python app/util development. I'm using emacs with the python mode extension
during my code review but would like to learn something more mainstream. Yes, I'm working to learn python, but I've been
carving code since the late 70's (MS '79, GA Tech).
Thanks in advance,
~~~ 0;-Dan
Re: seeking "coding conventions" for python-based project
As an IDE I can suggest PyCharm, but I haven't learned python that much to recommend something else. Default IDE for python is IDLE (https://docs.python.org/3/library/idle.html), and it is included in the packages. Default UI toolkit is Tkinter (https://docs.python.org/3/library/tkint ... le-tkinter), although PyQt is a good option.
Re: seeking "coding conventions" for python-based project
What? No coding conventions at the official Python website? . . . I'm shocked!
Re: seeking "coding conventions" for python-based project
Sure there is, always has been: https://www.python.org/dev/peps/pep-0008
edit in response to post below: there really is a Mint-specific style guide? wow
Last edited by gm10 on Thu Jul 19, 2018 4:22 am, edited 1 time in total.
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: seeking "coding conventions" for python-based project
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: seeking "coding conventions" for python-based project
For an IDE, my preference for working is Wing, the debug probe feature is quite powerful:
https://wingware.com/
Eclipse is also good for Python I believe:
https://www.eclipse.org/ide/
https://wingware.com/
Eclipse is also good for Python I believe:
https://www.eclipse.org/ide/
- SaintDanBert
- Level 4
- Posts: 449
- Joined: Sat Feb 20, 2010 4:04 pm
- Location: Covington, LA USA
Re: seeking "coding conventions" for python-based project
Does Mint use the PEP8 style or something else? I'm confused...gm10 wrote: ⤴Wed Jul 18, 2018 8:54 pm ...
Sure there is, always has been: https://www.python.org/dev/peps/pep-0008
edit in response to post below: there really is a Mint-specific style guide? wow
I did fetch the pep8 package and am looking at what it offers.
Thanks in advance,
~~~ 0;-Dan