Suppose that you have a scripted namespace that you have downloaded from the internet and that you have installed in your workspace. What would be the procedure to 'unscript-it' (without any text representation of the namespace).

Looks good Vince. The target space must be "named" (created using dyadic ⎕NS) but otherwise is fine. Also rebuilds the hierarchy for a nested script as named container spaces correctly unlike my one-liner above. Well done Dan!

Thanks Phil and Vince this is answering my question. I was looking at something like Phil explained. I did not want to save the namespace to file and recall the file with 'disperse'. But just to show the alternative in case of 'complex' namespace:

I was writing "off the top of my head" and here's a clearer way to do exactly the same thing:

{('n'⎕ns⍵)⊢n←⎕ns''}

but as usual I write before researching and it seems I'm not on top of the latest developments.My reference to nested spaces was because until I last looked the above would only have copied vars, fns and ops and would have left subspaces behind or in some cases it gave a DOMAIN ERROR - I never managed to identify precisely what cases or why - possibly something to do with external and cross refs.I'm afraid I'm one who usually looks for a work-around rather than reporting a bug because I reason that if it doesn't already work I must be the first to try so probably it was never intended to do that and no-one else will want it anyway.Well it turns out things have progressed and now it does copy subspaces. Strangely it gives a mix of scripted and non-scripted in terms of its behaviour with regard to both ⎕ED and ⎕SRC.

When I tried using the ]load user command to "unscript" a class, it fails with a domain error, because according to the STATUS message, the class script contains a base class (#.MiPage) and an :Include statement (:Include #HTMLInput).

You cannot "unscript" a class. You can turn a scripted namespace into a non-scripted ns but not a class.I believe the DOMAIN error you are seeing is unrelated to the "unscripting" but is simply due to the fact that the base class is not around.Even if there was no base class or :included ns the resulting space would be useless because it could not reconstruct names in it (most would be private and the public ones are ⎕CR resistant).