![]() |
|
[Python] How could I use Regex to replace print statements with the newer print function? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] How could I use Regex to replace print statements with the newer print function? (/showthread.php?tid=4104060) |
How could I use Regex to replace print statements with the newer print function? - xMoD - Mar 8, 2014 I seem to have alot of python scripts with the older print statements (Which I wish stayed a statement) instead of the newer function. How could I use regex to replace those statements with the print function, keeping the data to be printed? * - Strike - Mar 8, 2014 This might well be an easier option for you :) http://docs.python.org/2.7/library/2to3.html * - xMoD - Mar 9, 2014 (Mar 8, 2014 06:23 PM)Strike Wrote: This might well be an easier option for you :)Seen that after I posted :3 - - - - - - -- - - -- - -- - - - |