I have a method what from a "MULTIPART FORM" put a file named 'myFile.pdf' in a directory. And after i want the methood to create a Zclass instance[PDFclass] whith id=myFile. I tried with split, join, and translate method of string module, and I can't get a valid id with split and join ; and with translate if 'myFile' is 'mypdf' (so the file is 'mypdf.pdf') I'll get 'my' as id for my PDFclass instance. thanx for a tip () / \ | <> | (____) zazen rules ...sbaline _______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/
On 13 Jun 2001 07:47:13 -0700, Sebal wrote:
I have a method what from a "MULTIPART FORM" put a file named 'myFile.pdf' in a directory. And after i want the methood to create a Zclass instance[PDFclass] whith id=myFile.
I tried with split, join, and translate method of string module, and I can't get a valid id with split and join ; and with translate if 'myFile' is 'mypdf' (so the file is 'mypdf.pdf') I'll get 'my' as id for my PDFclass instance.
Split on the '.' not on 'pdf'. Example from the interpreter:
foo="mypdf.pdf" id,extension = string.split(foo,'.') print id mypdf
Bill
participants (2)
-
Bill Anderson -
Sebal