Probably... I can't say I haven't heard of code interpretations varying from town to town (or inspector to inspector!)
Worldstrad, I appologize for assuming your gender...
In the picture I linked to, they used copper pipe. Copper pipe typically can't be threaded directly, so you have to solder on a threaded adapter, then screw it into the TPR valve. I personally, would use copper on something like this... I didn't suggest it, since I wasn't sure if you were comfortable soldering fittings.
If you use galvanized pipe, which you can purchase in various lengths at your favorite blue or orange box store with threads cut on both ends, itcan be screwed directly into the TPR valve with some teflon tape or pipe-dope, and won't need an adapter.