Skip to main content

write(path,content), open.write replacement. python2 and python3 compatible

Project description

Install

github.com: pip install git+git://github.com/russianidiot/write.py.git

pypi.python.org: pip install write

download: python setup.py install or setup/.setup.py develop.command

Usage

from write import *

write(path,'string')
open(path).read()
>>>> 'string'

write(path,None) # touch
open(path).read()
>>>> ''

write(path,1488)
open(path).read()
>>>> '1488'

write(path,dict())
open(path).read()
>>>> '{}'

Tested: python 2.6, 2.7, 3+

Bug Tracker: github.com/russianidiot/write.py/issues

Project details


Download files

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

Source Distribution

write-0.0.2.tar.gz (4.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page