Windows: checking for available packages?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows: checking for available packages?

egarrulo
Hello,

I apologize if this question gets posted twice, but I've tried the
Google Groups interface and it seemed to not work.

I'd like to know how you can learn whether a package is available in
your Erlang installation. To be specific, I'd like to know whether wx,
ssl and database support is available into precompiled Erlang setup
for Windows.

I've tried to import such packages from the Erlang console, but that
fails. OTOH, "-import(lists)." fails too, and AFAIK "lists" is a
standard package.

What I'm doing wrong?

Thanks.

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Windows: checking for available packages?

Richard Andrews-5
If you think you know the name of the module you can try

1> code:load_file(mnesia).
{module,mnesia}
2> code:load_file(kjhsdfsadf).
{error,nofile}

or if it's an application you could try application:start(appName).

I find the most reliable way is to search the erlang installed
filesystem tree for files that look like what I want.

On Fri, Aug 7, 2009 at 9:48 PM, Elena Garrulo<[hidden email]> wrote:

> Hello,
>
> I apologize if this question gets posted twice, but I've tried the
> Google Groups interface and it seemed to not work.
>
> I'd like to know how you can learn whether a package is available in
> your Erlang installation. To be specific, I'd like to know whether wx,
> ssl and database support is available into precompiled Erlang setup
> for Windows.
>
> I've tried to import such packages from the Erlang console, but that
> fails. OTOH, "-import(lists)." fails too, and AFAIK "lists" is a
> standard package.

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Windows: checking for available packages?

Bengt Kleberg
In reply to this post by egarrulo
Greetings,

When you say package do you mean application or do you mean module?

If you mean module you can do:
code:all_loaded{} and get all loaded modules. That gives you a property
list that can be searched like this:
proplists:get_value( lists, code:all_loaded()).
"/vobs/otp/otp_delivery/suse_x86/lib/stdlib-1.14.5.3/ebin/lists.beam"


bengt

 On Fri, 2009-08-07 at 11:48 +0000, Elena Garrulo wrote:

> Hello,
>
> I apologize if this question gets posted twice, but I've tried the
> Google Groups interface and it seemed to not work.
>
> I'd like to know how you can learn whether a package is available in
> your Erlang installation. To be specific, I'd like to know whether wx,
> ssl and database support is available into precompiled Erlang setup
> for Windows.
>
> I've tried to import such packages from the Erlang console, but that
> fails. OTOH, "-import(lists)." fails too, and AFAIK "lists" is a
> standard package.
>
> What I'm doing wrong?
>
> Thanks.
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>


________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Windows: checking for available packages?

egarrulo
In reply to this post by Richard Andrews-5
That seems a quick way to check for available packages. I've found out
that everything I was looking for is there.

Thanks


2009/8/7 Richard Andrews <[hidden email]>:

> If you think you know the name of the module you can try
>
> 1> code:load_file(mnesia).
> {module,mnesia}
> 2> code:load_file(kjhsdfsadf).
> {error,nofile}
>
> or if it's an application you could try application:start(appName).
>
> I find the most reliable way is to search the erlang installed
> filesystem tree for files that look like what I want.
>
> On Fri, Aug 7, 2009 at 9:48 PM, Elena Garrulo<[hidden email]> wrote:
>> Hello,
>>
>> I apologize if this question gets posted twice, but I've tried the
>> Google Groups interface and it seemed to not work.
>>
>> I'd like to know how you can learn whether a package is available in
>> your Erlang installation. To be specific, I'd like to know whether wx,
>> ssl and database support is available into precompiled Erlang setup
>> for Windows.
>>
>> I've tried to import such packages from the Erlang console, but that
>> fails. OTOH, "-import(lists)." fails too, and AFAIK "lists" is a
>> standard package.
>

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Reply | Threaded
Open this post in threaded view
|

Re: Windows: checking for available packages?

egarrulo
In reply to this post by Richard Andrews-5
BTW, using code:load seems a clean way to do that. It loads every
module I was looking for.

Thanks again.


2009/8/7 Richard Andrews <[hidden email]>:

> If you think you know the name of the module you can try
>
> 1> code:load_file(mnesia).
> {module,mnesia}
> 2> code:load_file(kjhsdfsadf).
> {error,nofile}
>
> or if it's an application you could try application:start(appName).
>
> I find the most reliable way is to search the erlang installed
> filesystem tree for files that look like what I want.
>
> On Fri, Aug 7, 2009 at 9:48 PM, Elena Garrulo<[hidden email]> wrote:
>> Hello,
>>
>> I apologize if this question gets posted twice, but I've tried the
>> Google Groups interface and it seemed to not work.
>>
>> I'd like to know how you can learn whether a package is available in
>> your Erlang installation. To be specific, I'd like to know whether wx,
>> ssl and database support is available into precompiled Erlang setup
>> for Windows.
>>
>> I've tried to import such packages from the Erlang console, but that
>> fails. OTOH, "-import(lists)." fails too, and AFAIK "lists" is a
>> standard package.
>

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org