Skip to content

Commit d99c67f

Browse files
committed
2 parents 130bb1d + f10491c commit d99c67f

File tree

85 files changed

+7678
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+7678
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
v 0.0.1, 2014:03:23 -- Initial release.
2+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The license for the capitalize package
2+
3+
Public Domain: do with it what you will.
4+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include *.txt
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
===================
2+
Capitalize Package
3+
===================
4+
5+
A basic pacakge for Capitalizing text in files
6+
7+
Purpose
8+
========
9+
10+
Nothing useful, just something to demonstrate packaging with.
11+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
A really simple module, just to demonstrate packaging
5+
"""
6+
7+
def capitalize(infilename, outfilename):
8+
"""
9+
reads the contents of infilename, and writes it to outfilename, but with
10+
every word capitalized
11+
12+
note: very primitive -- it will mess some files up!
13+
14+
this is called by the capitalize script
15+
"""
16+
infile = open(infilename, 'U')
17+
outfile = open(outfilename, 'w')
18+
19+
for line in infile:
20+
outfile.write( " ".join( [word.capitalize() for word in line.split() ] ) )
21+
outfile.write("\n")
22+
23+
return None
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""
2+
capitalize module
3+
"""
4+
__version__ = '0.0.1'
5+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
A really simple module, just to demonstrate disutils
5+
"""
6+
7+
def capitalize(infilename, outfilename):
8+
"""
9+
reads the contents of infilename, and writes it to outfilename, but with
10+
every word capitalized
11+
12+
note: very primitive -- it will mess some files up!
13+
14+
this is called by the capitalize script
15+
"""
16+
infile = open(infilename, 'U')
17+
outfile = open(outfilename, 'w')
18+
19+
for line in infile:
20+
outfile.write( " ".join( [word.capitalize() for word in line.split() ] ) )
21+
outfile.write("\n")
22+
23+
return None
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
Test package for capitalize module
3+
"""
4+
pass
5+
6+
import os
7+
8+
def runall():
9+
import pytest
10+
pytest.main(os.path.split(__file__)[0])
11+
12+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This is a really simple Text file.
2+
It is here so that I can test the capitalize script.
3+
4+
And that's only there to try out distutils.
5+
6+
So there.
7+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This Is A Really Simple Text File.
2+
It Is Here So That I Can Test The Capitalize Script.
3+
4+
And That's Only There To Try Out Distutils.
5+
6+
So There.
7+

0 commit comments

Comments
 (0)