[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Using a file in the current dir
From: |
Mark Carter |
Subject: |
[Chicken-users] Using a file in the current dir |
Date: |
Sun, 18 Mar 2012 15:32:15 +0000 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-1-686-pae; KDE/4.6.5; i686; ; ) |
Is there a way I can "use" a file in the current directory?
Here's what I'm trying to achieve: I want to be able to use some functionality
interactively in the interpreter, but also create an executable. In the
executable, I will probably do some command-line argument parsing, and
automatically call a "main" function. When invoked as a script, I just want to
load in the definitions. There doesn't seem a way to really achieve this.
A sensible approach would be to create a "core functionality" file, which
contains all the intricate functions, and a "driver" file which does the
command-line parsing, and invoke the "main" routine.
The problem is, I can't use the "load" command in the driver file, because
that's not supposed to happen when the program runs. I can't use the "use"
command either, because that expects that an egg has been installed.
So what's a good way of achieving the desired result?
- [Chicken-users] Using a file in the current dir,
Mark Carter <=