Search N Act
Project description
sna means:
Search N Act
you can do search and replace search and create search and open search and anything...
Sample Usageyou can see the code samples```hello, world!
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
sna = Sna()
@sna("(.*d.*r.*)")
class DR_word(object):
def __init__(self, match):
self.content = match.group(1)
def read(self):
print(self.content)
@sna("(.*e.*t.*)")
class ET_word(object):
def __init__(self, match):
self.content = match.group(1)
def read(self):
print(self.content)
# find all patterns
sna.search().through.words().on(
filepath="sample.txt"
).read()
print(80 * "-")
# Or be specific
sna.search("ET_word").through.words().on(
filepath="sample.txt"
).read()
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sna-0.0.2.tar.gz
(2.7 kB
view hashes)