Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

concatenate two strings to beginning and end of the lines of a file

Project Description
#strings concatenate to lines
Simple python 3 script that get "two strings" and "concatenate" them to "beginning" and "end" of the lines of a file.

##Table Of contents
* Install On Linux
* Example
* More
* Install from source/git
* Step By Step example

##Install On Linux:

sudo pip3 install str_concat_to_line
or
sudo pip install str_concat_to_line

##Example:
-----------------
from str_concat_to_line.str_concat_to_line import sctl

first_str = "Yeh, it works"
second_str = "HooooRaaaaa"

input_file = "ex.txt"
out_file = "ex.txt.o"

foo = sctl(first_str , second_str , input_file , out_file);
foo.con_strs()

print("Finish")
-----------------
Now you can see "ex.txt.o" file.

##More
###Install from source/git

git clone "https://github.com/mlibre/str_concat_to_line"
cd str_concat_to_line/
sudo python3 setup.py install

###Step By Step Example
1. open terminal
2. create a file like test.py on your Linux

touch test.py

3. copy and past this code in test.py

from str_concat_to_line.str_concat_to_line import sctl
-----------------
first_str = "Yeh, it works"
second_str = "HooooRaaaaa"

input_file = "ex.txt"
out_file = "ex.txt.o"

foo = sctl(first_str , second_str , input_file , out_file);
foo.con_strs()

print("Finish")
-----------------
4. run code
python3 test.py
or
python test.py
Release History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
str_concat_to_line-0.1.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source May 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting