472,143 Members | 1,132 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

[perl-python] 20050113 looking up syntax

while programing in Python, one can lookup syntax or info for keywords
or modules within Python.

In the command line, type

python

to get into the python interactive program. then type
help()
From there one can type any keyword or module name to find out the

syntax or info. Everything is self-contained and self-explanatory.

to exit help, type control-d.

if you haven't tried already, you can type 1+1 while running python.
The result will be displayed interactively. So in this way, Python can
be used as a calculator.

---------------------

for perl syntax lookup, use perldoc in the command line. For example:
perldoc perl

use 'perldoc -f functionName' for specific function. example:
perldoc -f qq

note that keywords cannot be looked up with -f. For basic keywords like

if, while..., use
perldoc perlop

Master 'perldoc perl' as a way to get familiar of what info are
available and what subroutine or aspect of perl is in what section of
the documentation associated with what documentation name abbreviation.

Master 'perldoc perldoc' to know all its power of options and
flexibility. If you use emacs, in particular you want to add the -t
option. Master the unix text editor vi to learn the navigation system
of perldoc. The basics are: control-f for page down, control-v for page

up, q for exit. Also, one may wish to peruse 'perldoc perlfaq' to
acquaint yourself about the preamble of nine volumes of perl's FAQ.

---------------------------

Note: this post is from the Perl-Python a-day mailing list at
http://groups.yahoo.com/group/perl-python/
to subscribe, send an email to pe*******************@yahoogroups.com
if you are reading it on a web page, program examples may not run
because they've been changed by yahoo.com or google.com.
Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #1
4 1384
Xah Lee wrote:
[snip]
Note: this post is from the Perl-Python a-day mailing list at
http://groups.yahoo.com/group/perl-python/
to subscribe, send an email to pe*******************@yahoogroups.com


So why duplicate the posts by posting them to the newsgroups?
Now that you've advertised the mailing list (and thank you,
I'll be sure to hurry off now and subscribe) there's no longer
any reason to post to the newsgroups, is there? Please?

-Peter
Jul 18 '05 #2
Xah Lee wrote:
---------------------

for perl syntax lookup, use perldoc in the command line. For example:
perldoc perl
Wrong. That command will give you a high-level overview of Perl but tell you
nothing about the syntax.
To lookup the Perl syntax you would have to use

perldoc perlsyn
use 'perldoc -f functionName' for specific function. example:
perldoc -f qq
BS. That will tell you what a function does, it doesn't tell you anything at
all about the syntax of Perl.
BTW: Why on earth are you using qq() as an example? That doc page just
points you to 'perldoc perlop'.
note that keywords cannot be looked up with -f. For basic keywords
like

if, while..., use
perldoc perlop


BS. What gave you the idea that keywords were operators? Of course keywords
can be found where they belong, in the syntax definition of the language,
but not in the operator section of the documentation.

Why don't you just stop posting this nonsense?

jue

Jul 18 '05 #3
Jürgen Exner wrote:
Why don't you just stop posting this nonsense?


He will, fairly soon. I'm suspecting that the original
intent behind these posts was to stir up a perl vs python
flamewar. That is unlikely to materialize since the
poster does not seem to understand neither of these
languages.

I.
Jul 18 '05 #4
Peter Hansen wrote:
So why duplicate the posts by posting them to the newsgroups?


Because he's a well-known pest.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Yes I'm / Learning from falling / Hard lessons
-- Lamya
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mark Wilson CPU | last post: by
6 posts views Thread by John Smith | last post: by
1 post views Thread by Julia Bell | last post: by
13 posts views Thread by Otto J. Makela | last post: by
223 posts views Thread by Pilcrow | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.