On 09/10/11 16:27, Christopher King wrote:
I know the method of finding every string, and inserting a swapcase in
to the code. Does anyone now a way just to insert code at the top though?

Inserting code at the top of the file is just like inserting any kind of text at the top of any kind of text file. Whjether the code does what you want is another matter and whether inserting code at the top of a file is a good way of achieving what you want is yet another.

But for an example of inserting text at the top of a file look in the File Handling topic of my tutorial. Look at the example just above the "OS Gotchas" box...

But I really don't think this is the best way to achieve your real objective.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to