Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you manage script?
#5
I think that in case of string methods it's much easier to use help which is built-in into Python interactive interpreter:

>>> str. # two times TAB
str.capitalize(   str.find(         str.isdecimal(    str.istitle(      str.mro()         str.rjust(        str.strip(
str.casefold(     str.format(       str.isdigit(      str.isupper(      str.partition(    str.rpartition(   str.swapcase(
str.center(       str.format_map(   str.isidentifier( str.join(         str.removeprefix( str.rsplit(       str.title(
str.count(        str.index(        str.islower(      str.ljust(        str.removesuffix( str.rstrip(       str.translate(
str.encode(       str.isalnum(      str.isnumeric(    str.lower(        str.replace(      str.split(        str.upper(
str.endswith(     str.isalpha(      str.isprintable(  str.lstrip(       str.rfind(        str.splitlines(   str.zfill(
str.expandtabs(   str.isascii(      str.isspace(      str.maketrans(    str.rindex(       str.startswith(
String method names are quite descriptive. If you find some promising name(s) you can inspect it closer. What exactly does capitalize do?

>>> help(str.capitalize)
Help on method_descriptor:

capitalize(self, /)
    Return a capitalized version of the string.

    More specifically, make the first character have upper case and the rest lower
    case.
For real snippets of code one can build wiki-like solution. One can use Jupiter notebook, Obsidian or just plain .py files in one folder. In latter case describe/comment your code snippet (what it does, what problem does it solve). Then from terminal you can grep or ack appropriate keywords, get file name(s) and open. It should not take more than 5-10 seconds.

If you have several snippets per file then ack gives row number and then you should learn whether your editor is able to open file on specific row (mine does) or you can provide ack with -C (which gives context i.e surrounding lines too) so that you don't need to open the file.
ndc85430 likes this post
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
How do you manage script? - by kucingkembar - Oct-13-2022, 04:35 AM
RE: How do you manage script? - by perfringo - Oct-13-2022, 06:56 AM
RE: How do you manage script? - by Larz60+ - Oct-13-2022, 06:57 AM
RE: How do you manage script? - by kucingkembar - Oct-13-2022, 04:05 PM
RE: How do you manage script? - by rob101 - Oct-13-2022, 08:44 AM
RE: How do you manage script? - by perfringo - Oct-13-2022, 09:01 AM
RE: How do you manage script? - by snippsat - Oct-13-2022, 10:14 AM
RE: How do you manage script? - by kucingkembar - Oct-13-2022, 04:01 PM
RE: How do you manage script? - by kucingkembar - Oct-13-2022, 04:07 PM
RE: How do you manage script? - by kucingkembar - Oct-13-2022, 04:11 PM
RE: How do you manage script? - by kucingkembar - Oct-13-2022, 06:34 PM
RE: How do you manage script? - by rob101 - Oct-13-2022, 07:04 PM
RE: How do you manage script? - by perfringo - Oct-14-2022, 06:16 AM
RE: How do you manage script? - by deanhystad - Oct-14-2022, 08:57 PM
RE: How do you manage script? - by Gribouillis - Oct-15-2022, 06:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python manage variables across project level mg24 1 975 Nov-12-2022, 05:01 AM
Last Post: deanhystad
  Python, how to manage multiple data in list or dictionary with calculations and FIFO Mikeardy 8 2,764 Dec-31-2021, 07:47 AM
Last Post: Mikeardy
  how to manage crypto trading flooding data from exchange servers Mikeardy 0 1,287 Dec-26-2021, 08:31 PM
Last Post: Mikeardy
  API Gateway to manage multiple API's get put data robsuttonjr 2 2,604 Mar-09-2021, 04:09 PM
Last Post: robsuttonjr
  Manage user names in TRAC susja 3 6,452 Dec-06-2020, 09:34 PM
Last Post: susja
  How to manage multiple datasets in Python ThePhantom 2 1,982 May-06-2020, 12:17 AM
Last Post: ThePhantom
  how to manage an input() rodrigoH 1 1,699 Mar-16-2020, 12:24 AM
Last Post: jefsummers
  Easier way to manage dependencies? Tylersuard 2 2,417 Jan-01-2020, 09:19 PM
Last Post: Tylersuard

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020