[perl-python] 20050125 standard modules

X

Xah Lee

# -*- coding: utf-8 -*-
# Python

# some venture into standard modules

import os

# print all names exported by the module
print dir(os)

# print the module's online manual
print help(os)
# the above is also available in
# interactive mode in Python terminal

# example of using a function
print 'current dir is:', os.getcwd()

# this prints a list of existing modules
print help('modules')

# referecnce
# http://python.org/doc/2.3.4/tut/node12.html

# in Python terminal, type help() then
# modules
# to get a list
# then a module name to see its doc.

# take a gander of its richness and
# suitability

--------------------------
in perl, i don't think there is one way to
list available modules.

one can write a program to find out. Start by
use Data::Dumper; print Dumper \@INC;
to see where is the standard modules located,
then search for *.pm files to get an idea.

-------------------------
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 perl-python-subscribe @ yahoogroups.com
if you are reading it on a web page, program examples may not run
because html conversion often breaks the code.
Xah
(e-mail address removed)
http://xahlee.org/PageTwo_dir/more.html
 
D

Dan Perl

I sent the following feedback message to Yahoo! Groups about this abusive
use of their service.

Feel free to also report this as an abuse of the Yahoo! Groups service until
the problem is resolved.

Dan

-----------
As the owner of the perl-python group, p0lyglut (aka Xah Lee), has added two
newsgroups to the mailing list of the group: comp.lang.perl.misc and
comp.lang.python.

First of all, I don't think anyone could have given Xah Lee an authorization
on behalf of the newsgroups. I am not sure, but that is probably a
violation of the Terms of Service in itself. I will leave this matter up to
you to investigate.

The daily messages of the perl-python group are unwanted by the two
newsgroups. Just take a look at the follow-ups in the newsgroups that the
perl-python postings have generated.

I hope that not only the newsgroups will be removed from the perl-python
group but that such an abuse will also be prevented in the future.

Thanks,

Dan Perl
 
D

Dan Perl

I was wrong. He is just crossposting to the newsgroups without having them
as members of the group.

I wish there was a good way like that to stop these daily postings!

Dan
 
P

Peter Nuttall

I was wrong. He is just crossposting to the newsgroups without having
them as members of the group.

I wish there was a good way like that to stop these daily postings!

You can just filter on [perl-python]

Pete
 
P

Paul Lalli

--------------------------
in perl, i don't think there is one way to
list available modules.

<set followups to c.l.p.m, as this reply deals only with Perl>

I'm torn between knowing that I shouldn't feed trolls, and my hatred of
leaving faulty information about Perl unchecked, where some unsuspecting
newbie might stumble across it.

So to those newbies, you should know that just because this clown
doesn't think there's a way, does not in any way imply that there
actually isn't a way.

For a list of standard modules included in your distribution of Perl,
run the following command in your shell:
perldoc perlmodlib

To get a list of non-standard modules that have already been installed,
read the documentation for the ExtUtils::Installed module:
perldoc ExtUtils::Installed

To see what other modules are available to be downloaded, visit
http://www.cpan.org

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top