Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112921153
pNbody_copy-defaultconfig
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, May 13, 17:52
Size
596 B
Mime Type
text/x-python
Expires
Thu, May 15, 17:52 (2 d)
Engine
blob
Format
Raw Data
Handle
26162873
Attached To
rPNBODY pNbody
pNbody_copy-defaultconfig
View Options
#!/usr/bin/env python
from pNbody import *
import shutil
# check if .pNbody exists
dest = os.path.join(HOME,'.pNbody')
if os.path.isdir(dest):
answer = raw_input('WARNING : The directory %s alredy exists. Remove it [y/N] ? ' %(dest))
if answer == "y" or answer == "Y":
print "Removing %s"%dest
shutil.rmtree(dest)
else:
print "Nothing done."
sys.exit()
# recursive copy
print "copying files from %s"%CONFIGDIR
print "to %s"%dest
shutil.copytree(CONFIGDIR,dest)
print "done."
print
print "you can now type pNbody_show-path to check the new configuration."
print
Event Timeline
Log In to Comment