At 05:14 AM 1/21/00 +0000, you wrote: > >in python it is pretty simple >to make a script that can tell if it has >been included in another script. > >when called as a unit on their own, these scripts >simply exercise some regression tests and stop. > >in rebol tho? > > Hi Bob, If system/script/parent/parent is none!, then you have not been included by another script. The following example should help: either none? system/script/parent/parent [ Print "done from the console or command line" ][ Print "done from a script" ] Hope this helps. - jim
- [REBOL] How do I ... Retrieve a message from SELMA R... news . ted
- [REBOL] Re: How do I ... Retrieve a message from... ejolson
- [REBOL] How do I ... Retrieve a message from SEL... news . ted
- [REBOL] Re: How do I ... Retrieve a message from... ejolson
- [REBOL] f news . ted
- [REBOL] How do I encapsulate a library fn and provid... bobr
- [REBOL] How do I encapsulate a library fn and pr... jimg
- [REBOL] How do I encapsulate a library fn and pr... Petr . Krenzelok
- [REBOL] How do I encapsulate a library fn and pr... jimg
- [REBOL] How do I encapsulate a library fn and pr... Al . Bri
- [REBOL] Re: How do I encapsulate a library fn an... giesse
- [REBOL] How do I make my app upgradeable Re: bobr
- [REBOL] How do I convert an arbitrary charset into a... bobr
- [REBOL] Rebol evolution Re: news . ted