Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [perl-python] 20050113 looking up syntax

Reply
Thread Tools

[perl-python] 20050113 looking up syntax

 
 
Xah Lee
Guest
Posts: n/a
 
      01-14-2005
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 http://www.velocityreviews.com/forums/(E-Mail Removed)
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
(E-Mail Removed)
http://xahlee.org/PageTwo_dir/more.html

 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      01-14-2005
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 (E-Mail Removed)


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
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      01-14-2005
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



 
Reply With Quote
 
Istvan Albert
Guest
Posts: n/a
 
      01-14-2005
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.
 
Reply With Quote
 
Erik Max Francis
Guest
Posts: n/a
 
      01-15-2005
Peter Hansen wrote:

> So why duplicate the posts by posting them to the newsgroups?


Because he's a well-known pest.

--
Erik Max Francis && (E-Mail Removed) && 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax Checker that's better than the normal syntax checker Jacob Grover Ruby 5 07-18-2008 05:07 AM
Syntax bug, in 1.8.5? return not (some expr) <-- syntax error vsreturn (not (some expr)) <-- fine Good Night Moon Ruby 9 07-25-2007 04:51 PM
[ANN] SqlStatement 1.0.0 - hide the syntax of SQL behind familiarruby syntax Ken Bloom Ruby 3 10-09-2006 06:46 PM
Syntax highligth with textile: Syntax+RedCloth ? gabriele renzi Ruby 2 12-31-2005 02:44 AM
[perl-python] 20050113 looking up syntax Xah Lee Perl Misc 2 01-14-2005 04:24 PM



Advertisments