Snippets of the day – Thursday, October 10, 2013

Posted on Posted in Snippets

orange-scissors-pen

Here are some of the most recently published snippets!

Trim a string with ellipsis

This is the simplest way to trim a string to the given length.
If trimmed, the last part of the string is replaced with ellipsis

Open the snippet

Author:    snip2code

Upload a file into a S3 bucket in Python

Uploading a local file into S3 using the Boto library is pretty simple.
In this example we upload the localFilepath into a destS3Name location in the destBucket.
Here is the snippet:

Open the snippet

Author:    micurs

Leave a Reply

Your email address will not be published. Required fields are marked *