man pages are a phenomenal resource while programming in C on Linux. While looking at someone else's code, if you see something foreign you can immediate research it in another terminal with

$ man 3 fileno

or whatever the syntax you don't understand is.

Is there a standard way to get "man" pages for other programming languages like Python, R, Javascript, or anything else? It doesn't actually have to be man, but some program I can quickly call to research something like

$ man-python numpy.random.rand

instead of having to Google it and use HTML documentation. The same question holds generally for other programming languages.

  • At least python has the pydoc, pydoc2, pydoc3 tools for viewing information. However, they do not process RST markup in the docstrings. IIRC Perl and Tcl also contain information in the form of man pages. – Wieland Oct 11 '15 at 15:32
  • Great question... I'd love if I had man pages for JavaScript and NodeJS :( – Gui Prá Nov 3 '15 at 1:34
  • @n2liquid-GuilhermeVieira, if you use ddg.gg as a search engine, I have found other languages basically work like man pages with bang syntax (e.g., type !php get_headers to get the PHP documentation). Unfortunately, !js leads to the MDN documentation, which is horribly unsearchable. – user1717828 Nov 3 '15 at 3:04

Not reliably (or portably); on OpenBSD man -s ... lets you search by section, though outside of system or C related things, there are only sections for Fortran, Perl, and Tcl/Tk. Still, a search for say strftime in the Perl section will not find anything, as that call is hiding inside POSIX (or various other modules), and will not appear anywhere a man -k search can find it.

% man -k -s 3p strftime
% man -k -s 3p POSIX   
locale(3p) - Perl pragma to use or avoid POSIX locales for built-in operations
POSIX(3p) - Perl interface to IEEE Std 1003.1

Meanwhile, man over on Mac OS X lacks -s, and the quality and quantity of the man pages is quite poor (missing, or a random pilfering from some vintage of (Free|Open|Net)BSD). Linux likewise has a dubious record of man page maintenance ("see the info page, lol!", etc).

In theory the manual pages could have been a well-maintained resource, and in theory there could be searchable sections for R or other such languages, but that's generally not what happened.

  • I didn't use this answer, but since you were the only one nice enough to reply I marked as solved. Thanks. – user1717828 Oct 28 '15 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.