Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michiel Cottaar
win-pytreat
Commits
35a4d607
Commit
35a4d607
authored
Jan 13, 2021
by
Paul McCarthy
🚵
Browse files
RF: Fixes to readme and some paths
parent
5fbee85a
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
35a4d607
# WIN PyTreat series
x
# WIN PyTreat series
This repository contains Python practicals for the WIN PyTreat series. It
...
...
advanced_programming/modules_and_packages.md
View file @
35a4d607
...
...
@@ -14,7 +14,7 @@ understandable manner.
For this practical we have prepared a handful of example files - you can find
them alongside this notebook file, in a directory called
`
02_
modules_and_packages/`
.
`modules_and_packages/`
.
## Contents
...
...
@@ -33,7 +33,7 @@ them alongside this notebook file, in a directory called
```
import os
os.chdir('
02_
modules_and_packages')
os.chdir('modules_and_packages')
```
<a
class=
"anchor"
id=
"what-is-a-module"
></a>
...
...
@@ -41,7 +41,7 @@ os.chdir('02_modules_and_packages')
Any file ending with
`.py`
is considered to be a module in Python. Take a look
at
`
02_
modules_and_packages/numfuncs.py`
- either open it in your editor, or
at
`modules_and_packages/numfuncs.py`
- either open it in your editor, or
run this code block:
...
...
@@ -256,7 +256,7 @@ fact, there no difference between a _module_ and a _script_ - any `.py` file
can be executed as a script, or imported as a module, or both.
Have a look at the file
`
02_
modules_and_packages/module_and_script.py`
:
Have a look at the file
`modules_and_packages/module_and_script.py`
:
```
...
...
@@ -272,7 +272,7 @@ that allows you to add code to a file that is _only executed when the module is
called as a script_. Try it in a terminal now:
> `python
02_
modules_and_packages/module_and_script.py`
> `python modules_and_packages/module_and_script.py`
But if we
`import`
this module from another file, or from an interactive
...
...
@@ -351,7 +351,7 @@ from knowing that it is needed. But you can use `__init__.py` to perform some
package-specific initialisation, and/or to customise the package's namespace.
As an example, take a look the
`
02_
modules_and_packages/fsleyes/__init__.py`
As an example, take a look the
`modules_and_packages/fsleyes/__init__.py`
file in our mock FSLeyes package. We have imported the
`fsleyes_main`
function
from the
`fsleyes.main`
module, making it available at the package level. So
instead of importing the
`fsleyes.main`
module, we could instead just import
...
...
advanced_programming/structuring_projects.md
View file @
35a4d607
...
...
@@ -49,8 +49,8 @@ resembles the following:
> ```
This example structure is in the
`
example_project/`
sub-directory - have a
look through it if you like.
This example structure is in the
`
structuring_projects/example_project/`
sub-directory - have a
look through it if you like.
<a
class=
"anchor"
id=
"the-mypackage-directory"
></a>
...
...
getting_started/README.md
View file @
35a4d607
...
...
@@ -12,12 +12,17 @@ then you might want to check out the `advanced_programming` or `applications`
folders.
0.
Overview (MC, MJ, PM)
1.
Python basics (MJ)
2.
Text input/output (MC)
3.
File management (PM)
4.
Numpy (PM)
5.
Nifti images (MJ)
6.
Image manipulation (MC)
7.
Jupyter notebook and IPython (MC)
8.
Writing a callable script (MJ)
The
**Overview**
practical is a whirlwind overview of the Python language,
incorporating bits and pieces from the other practicals. Feel free to start
there, or to start from the
**Python basics**
practical.
0.
Overview (
`00_overview.ipynb`
) [MC, MJ, PM]
1.
Python basics (
`01_basics.ipynb`
) [MJ]
2.
Text input/output(
`02_text_io.ipynb`
) [MC]
3.
File management (
`03_file_management.ipynb`
) [PM]
4.
Numpy (
`04_numpy.ipynb`
) [PM]
5.
Nifti images (
`05_nifti.ipynb`
) [MJ]
6.
Image manipulation (
`06_plotting.ipynb`
) [MC]
7.
Jupyter notebook and IPython (
`07_juypter.ipynb`
) [MC]
8.
Writing a callable script (
`08_scripts.ipynb`
) [MJ]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment