Skip to content

Instantly share code, notes, and snippets.

@mbains
Created July 31, 2012 18:05
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbains/3219002 to your computer and use it in GitHub Desktop.
Save mbains/3219002 to your computer and use it in GitHub Desktop.
Python strings should stay immutable.
#!/usr/bin/env python
from ctypes import CDLL
foo = "Fiesta"
bar = "Fiesta"
#Change foo with low level C
libc = CDLL('libc.so.6')
libc.strcpy(foo, "Nachos")
print "We'll meet at the", bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment