2
votes
0answers
27 views

ContextPath and autocompletion with subpackages

I'm developing a larger package which includes several subpackages. My problem is, that I can't introduce the symbols in the subpackages to the autocompletion by loading the main package, but by ...
12
votes
2answers
132 views

How to find out what files are touched when Get is called?

Is there a way to capture all package files touched whenever a package is called via Get, Needs, ...
10
votes
1answer
136 views

Is there a way to find out who is importing a package?

After calling some functions, if I look into $ContextPath, I can see that JLink` is in there. Is there a way to find out what ...
2
votes
1answer
122 views

Errors when using ParallelTable inside a package

I'm developing a package that contains a function that requires evaluation of an expensive Table, so I use ParallelTable ...
5
votes
0answers
68 views

Does one need to be careful about loading multiple (many) contexts or packages in the same session?

I have a number of large pieces of precomputed data which I am considering putting into individual packages in order to load them (via DeclarePackage) and unload ...
14
votes
2answers
161 views

How to find the package file that stores a certain symbol?

Is it possible to figure out in what file a certain packaged symbol lives in (assuming there is no shadowing between multiple identical symbol names)? I would like to have a function that if, given a ...
4
votes
1answer
455 views

FeynCalc “May shadow or be shadowed by other definitions”

So I've downloaded the latest FeynCalc from this site and put the extracted folder in user/me/library/Mathematica/application, but when I write the command ...
6
votes
2answers
130 views

How to define UpValues in a different context from within a package

I'm trying to create a function (in a package) to import a lot of data and create a symbol with UpValues to return specific results about the data. I've got it working fine in a regular notebook, but ...
2
votes
1answer
150 views

How to find full names of all packages already on the $Path?

I'll show one specific example of what I am trying to do, I think it will explain things. On the default $Path there exist (in version 8) the following 4 packages ...
7
votes
1answer
176 views

What is the purpose of Dump contexts?

Motivation I've been trolling through some internal code, trying to glean design practices WRI developers employ when extending Mathematica using top-level code. During my ...
2
votes
2answers
98 views

What is the best way for an application to provide customisation options for the user?

Suppose that an application needs to be configured specifically for a user's system. e.g. the application needs to be told the location of certain data directories. What is the best way to provide ...
10
votes
2answers
160 views

Globally loading packages while using a CellGroup as the default context

I have a notebook I wish to set up where the sections are conceptually related to each other. But, I wish to isolate them from each other programmatically, so that they do not interfere with one ...
7
votes
1answer
2k views

How do I create and use Mathematica packages?

I have created a package following the tutorial in Mathematica 8 virtual book. However this tutorial is quite, let's call it, "short". I have a TestPackage.m file: ...
10
votes
2answers
236 views

How to abbreviate context names?

It's convenient to abbreviate often-used function names, eg Dim = Dimension. Is it possible to abbreviate long context symbols, e.g. Combinatorica when the context ...
19
votes
3answers
745 views

How to load a package without naming conflicts?

This question applies to any package, but I encountered this problem while working with graphs. There are symbols in the Combinatorica package (such as ...
9
votes
1answer
168 views

Future-proofing access to packed array tools

Most of the Mathematica users beyond beginner level will be aware of the phenomenon of Packed Arrays. The user-accessible functions related to packed arrays live in the ...
11
votes
4answers
460 views

Strategies for avoiding and handling shadowing

When dealing with namespaces in Mathematica (BeginPackage, $ContextPath ...) one is unavoidably confronted with the problem of ...