Skip to content

Commit c5e26d2

Browse files
committed
some edits for the gretl4py wep page
1 parent 7dc4c25 commit c5e26d2

File tree

1 file changed

+78
-84
lines changed

1 file changed

+78
-84
lines changed

doc/website/gretl4py.html

Lines changed: 78 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
<meta name="description" content="gretl4py -- python module for libgretl">
77
<meta name="generator" content="KWrite, vim, nano">
88
<meta name="keywords" content="gretl4py -- python module for libgretl">
9+
<LINK REL=STYLESHEET TYPE="text/css" HREF="css-gretl.html">
910
<title>gretl4py -- python module for libgretl</title>
11+
<LINK REL=STYLESHEET TYPE="text/css" HREF="css-gretl.html">
1012
</head>
1113

1214
<body>
@@ -32,42 +34,44 @@
3234
|___/ |_| |___/
3335
</pre>
3436

35-
<h1>About</h1>
37+
<!-- <h1>About</h1> -->
3638
<p>
3739
<b>gretl4py</b> is a python package designed to meet the needs of econometricians and applied
3840
economists who wish to use python in their research. It can be broadly viewed as a complement to
3941
the <a href="https://www.statsmodels.org/stable/index.html" target="_new">statsmodels</a> package,
40-
with a much more specific orientation to the inference methods commonly employed in applied
42+
with a more specific orientation to the inference methods commonly employed in applied
4143
economics.
4244
</p>
4345
<p>
4446
<b>gretl4py</b> provides an interface to
4547
<a href="https://gretl.sourceforge.net/API/new/gretl" target="_new">libgretl</a>
4648
for the Python language (3.11, 3.12, and 3.13 were tested). Libgretl is the underlying
4749
engine for the <a href="https://gretl.sourceforge.net/" target="_new">gretl</a> program.
48-
At present, the focus is mostly on the APIs implementing estimating methods, but a much larger
50+
At present, the focus is mostly on the APIs implementing estimation methods, but a larger
4951
array of facilities is planned.
5052
</p>
51-
53+
<p>
5254
<b>gretl4py</b> consists of the following elements:
55+
</p>
5356
<ul>
5457
<li>binary bindings written in C++,</li>
5558
<li>a <i>Model</i> class implemented in Python,</li>
5659
<li>a set of utility functions implemented in Python.</li>
5760
</ul>
5861

59-
The source code is available as git repository
62+
The source code (git repository) is
6063
<a href="https://sourceforge.net/p/gretl/gretl4py/ci/master/tree/" target="_new">here</a>.
6164

6265

63-
<h1>Preliminaries</h1>
66+
<!-- <h1>Preliminaries</h1> -->
6467
<h2>Preparation</h2>
6568

6669
Before installing <b>gretl4py</b>, please make sure that the following components are installed:
6770
<ul>
68-
<li>One of the supported versions of Python.</li>
69-
<li>The following Python packages: <b>numpy</b>, and <b>tabulate</b> (not required).</li>
70-
<li>macOS or Linux users: <b>gretl</b> version 2024c or higher:
71+
<li>One of the supported versions of Python (3.11, 3.12 or 3.13).</li>
72+
<li>The Python packages <kbd>numpy</kbd> and <kbd>tabulate</kbd> (the latter
73+
is not strictly required).</li>
74+
<li>macOS or Linux users: <b>gretl</b> version 2024c or higher:
7175
<ul>
7276
<li>Linux: <b>gretl</b> package (Debian/Ubuntu/Fedora).</li>
7377
<li>macOS: see <a href="https://gretl.sourceforge.net/osx.html" target="_new">this</a> page.</li>
@@ -79,118 +83,108 @@ <h2>Preparation</h2>
7983
</li>
8084
</ul>
8185

82-
<h2>Download</h2>
86+
<h2>Download and install</h2>
8387

8488
<p>
85-
You may download <b>gretl4py</b> as zip archive from
86-
<a href="https://w5.wsb.torun.pl/gretl/gretl4py/files/gretl4py.zip" target="_new">here</a>,
87-
as snapshot directly from the SourceForge website.
89+
You can download <b>gretl4py</b> as a zip archive from
90+
<a href="https://sourceforge.net/projects/gretl/files/gretl4py/gretl4py.zip"
91+
target="_new">here</a>. Unzip the archive (preserving its directory structure). The
92+
top-level directory is called <kbd>gretl4py</kbd>, and inside it you'll find
93+
a Python script named <kbd>install.py</kbd>. Just execute this script as
94+
follows:
95+
</p>
96+
<ul>
97+
<li>On MS Windows: <kbd>python.exe install.py</kbd></li>
98+
<li>On macOS: <kbd>python3 install.py</kbd></li>
99+
<li>On Linux: <kbd>python3 install.py</kbd></li>
100+
</ul>
101+
<p>
102+
We can't guarantee that the pre-compiled binary module installed by
103+
<kbd>install.py</kbd> will work on all Linux systems. But on Linux you
104+
have the alternative of building gretl4py yourself; see below.
88105
</p>
89106

107+
<!--
90108
<ul>
91109
<li>MS Windows: <a href="https://w5.wsb.torun.pl/gretl/gretl4py/files/gretl4py_for_windows.zip">gretl4py_for_windows.zip</a></li>
92110
<li>macOS: in progress</li>
93111
<li>Linux: <a href="https://w5.wsb.torun.pl/gretl/gretl4py/files/gretl4py_for_linux.zip">gretl4py_for_linux.zip</a></li>
94-
</ul>
95-
96-
<h2>Installation</h2>
97-
<h3>MS Windows and MacOS</h3>
98-
<p>
99-
The easiest way to install <b>gretl4py</b> on a MS Windows or macOS machine
100-
is by executing the <i>install.py</i> script located in the <b>gretl4py</b>
101-
top-level directory using the desired Python interpreter:
102-
</p>
103-
104-
<ul>
105-
<li>On MS Windows: <b><font style="font-family:'Courier New'">python.exe install.py</font></b></li>
106-
<li>On macOS: <b><font style="font-family:'Courier New'">python3 install.py</font></b></li>
107-
</ul>
108-
109-
<p>
110-
The script assumes that <i>python.exe</i> (on MS Windows)
111-
or <i>python3</i> (on macOS) is available in the system's <b>PATH</b>.<br>
112-
</p>
112+
</ul>-->
113113

114-
115-
The <i>install.py</i> script copies the following files to the user
114+
The <kbd>install.py</kbd> script copies the following files to the user's
116115
site-packages directory, as determined by the command
117-
<b><font style="font-family:'Courier New'">python.exe -m site --user-site</font></b>
118-
on MS Windows or
119-
<b><font style="font-family:'Courier New'">python3 -m site --user-site</font></b>
116+
<kbd>python.exe -m site --user-site</kbd> on MS Windows or <kbd>python3 -m site --user-site</kbd>
120117
on macOS:
121118
<ul>
122119
<li>
123-
<font style="font-family:'Courier New'">__init__.py</font>,
124-
<font style="font-family:'Courier New'">gretl4py_addons.py</font>,
125-
and <font style="font-family:'Courier New'">gretl4py_classes.py</font>
126-
from the <font style="font-family:'Courier New'">[gretl]</font> directory.
120+
<kbd>__init__.py</kbd>,
121+
<kbd>gretl4py_addons.py</kbd>,
122+
and <kbd>gretl4py_classes.py</kbd>
123+
from the <kbd>[gretl]</kbd> directory.
127124
</li>
128125
<li>
129-
<font style="font-family:'Courier New'">_gretl.cp3xx-win_amd64.pyd</font>
130-
(for MS Windows) or <font style="font-family:'Courier New'">_gretl.cpython-3xx-darwin.so</font>
131-
(for macOS) from the <font style="font-family:'Courier New'">[builds/3.xx]</font> directory.
126+
<kbd>_gretl.cp3xx-win_amd64.pyd</kbd>
127+
(for MS Windows) or <kbd>_gretl.cpython-3xx-darwin.so</kbd>
128+
(for macOS) from the <kbd>[builds/3.xx]</kbd> directory.
132129
</li>
133130
</ul>
134-
Here, <i>3.xx</i> refers to the version of Python used to run the
135-
<i>install.py</i> script.
131+
Here, <kbd>3.xx</kbd> refers to the version of Python used to run
132+
<kbd>install.py</kbd>.
136133

137134

138-
<h3>Linux</h3>
139-
<p> Linux users have two options:</p>
140-
<ul>
141-
<li>
142-
<p><b>Build gretlp4y yourself</b> (recommended)</p>
143-
<p> Instructions
144-
are <a href="https://w5.wsb.torun.pl/gretl/gretl4py/files/gretl4py.pdf"
145-
target="_new">here</a> (section 2.3). Apart from a C++ compiler
146-
(with support for c++17 standard), the following development
147-
packages are needed (2024c or higher):</p>
148-
<ul>
149-
<li>Debian/Ubuntu: <b>libgretl1-dev</b>, <b>python3-dev</b></li>
150-
<li>Fedora: <b>gretl-devel</b></li>
151-
</ul>
152-
</li>
153-
<li>
154-
<p><b>Install gretlp4y precompiled binaries</b> (experimental)</p>
155-
<p> Execute the <i>install.py</i>
156-
script located in the <b>gretl4py</b> top-level directory using
157-
the desired Python interpreter.</p>
158-
</li>
159-
</ul>
135+
<h2>Building on Linux</h2>
160136

161-
<h1>Running gretl4py</h1>
162-
<p>
163-
To verify if <b>gretl4py</b> was installed correctly please run
164-
the following code snippet:
165-
</p>
166-
<p style="font-family:'Courier New'">python3 -c 'import gretl; gretl.about(1)'</p>
137+
<p>
138+
You can find instructions in section 2.3 of the
139+
<a href="https://sourceforge.net/projects/gretl/files/gretl4py/gretl4py.pdf">gretl4py
140+
documentation</a>. Besides a C++ compiler with support for c++17 standard,
141+
you'll need these development packages associated with gretl 2024c or higher:</p>
142+
<ul>
143+
<li>Debian/Ubuntu: <kbd>libgretl1-dev</kbd>, <kbd>python3-dev</kbd></li>
144+
<li>Fedora: <kbd>gretl-devel</kbd>, <kbd>python3-devel</kbd></li>
145+
</ul>
167146

147+
<h2>Running gretl4py</h2>
148+
<p>
149+
To verify that the package was installed correctly please run
150+
the following code snippet:
151+
</p>
152+
<pre>
153+
python3 -c 'import gretl; gretl.about(1)'
154+
</pre>
155+
<p>
168156
This should give you some text output on
157+
</p>
169158
<ol>
170159
<li>your <b>gretl4py</b> build;</li>
171-
<li>your system, as provided by the gretl <i>$sysinfo</i> accessor;</li>
172-
<li>a few libgretl built-in strings;</li>
160+
<li>your system, as provided by the gretl <kbd>$sysinfo</kbd> accessor;</li>
161+
<li>a few libgretl built-in strings; and</li>
173162
<li>the simdjson architecture.</li>
174163
</ol>
175164

176165
<p>
177-
Note: On MS Windows, when <b>gretl4py</b> is loaded, you may see some warnings about the missing 'dark2' Gnuplot style. Don't worry, this is not a problem.
166+
Note: On MS Windows, when <b>gretl4py</b> is loaded, you may see some warnings about
167+
Gnuplot styles being missing. Don't worry, this is not a problem.
178168
</p>
179169

180170

181-
<h1>Documentation</h1>
182-
The <a href="https://w5.wsb.torun.pl/gretl/gretl4py/files/gretl4py.pdf">pdf
183-
documentation</a> file contains many more details
184-
about <b>gretl4py</b> module, including example, a list of the
185-
available APIs, and several usage examples.
171+
<h2>Documentation</h2>
172+
173+
<p>The <a href="https://sourceforge.net/projects/gretl/files/gretl4py/gretl4py.pdf">pdf
174+
documentation</a> contains many more details
175+
about the <b>gretl4py</b> module, including a listing of the
176+
available APIs and several usage examples.</p>
186177

187178
<p>Marcin Błażejowski, marcin(at)gretlconference(dot)org</p>
188179

189-
<p>Last updated: 2025-02-14</p>
180+
<p>Last updated: 2025-03-06</p>
190181

182+
<!--
191183
<p>
192184
<a href="https://validator.w3.org/check?uri=https://w5.wsb.torun.pl/gretl/gretl4py/">
193185
<img src="files/valid-html401.png" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>
194186
</p>
187+
-->
195188

196-
</body></html>
189+
</body>
190+
</html>

0 commit comments

Comments
 (0)