[BangPypers] Need help for python coding

2013-03-26 Thread Kamalakar gs
Dear all, I am newbie to coding.I want extract the data from text file which contains text and tables.In a file i want to extract all "VON MISES" stress data from a table.i wrote a code as below. but i dont know how to extract the vonmises column data and dump it into text file. So i am attaching t

[BangPypers] Need help for python coding

2013-04-18 Thread Kamalakar gs
HI all, I have a query that i have doc which is read through python.But instead of giving path and filename in the coding.I want to manipulate it like "python has to ask USER for a specific filename so that python recognizes the directory internally and read the file ".How do i do this.I have trie

[BangPypers] Need help for python coding

2013-04-20 Thread Kamalakar gs
What i am asking is i have a file of other format for example .PCL which is Patran file (Software used for analysis). Now what i want is if user inputs a file name,python has to recognise the file name and directory of file which exists and executes the file in patran window. For example following

Re: [BangPypers] Need help for python coding

2013-03-26 Thread Gora Mohanty
On 26 March 2013 23:41, Kamalakar gs wrote: > Dear all, > I am newbie to coding.I want extract the data from text file which contains > text and tables.In a file i want to extract all "VON MISES" stress data > from a table.i wrote a code as below. but i dont know how to extract the > vonmises colu

Re: [BangPypers] Need help for python coding

2013-03-27 Thread Jonathan Toomim
1. str is the name of a builtin type object. If you create a variable with that name, then you will be unable to access that builtin type while your variable remained in scope. This would mean that you would be unable to call str(42), for example. 2. Perhaps the csv module can be of use to you

Re: [BangPypers] Need help for python coding

2013-03-27 Thread Anand B Pillai
Hi, On Tue, Mar 26, 2013 at 11:41 PM, Kamalakar gs wrote: > Dear all, > I am newbie to coding.I want extract the data from text file which contains > text and tables.In a file i want to extract all "VON MISES" stress data > from a table.i wrote a code as below. but i dont know how to extract the

Re: [BangPypers] Need help for python coding

2013-04-18 Thread Abdul Muneer
Hi Kamalakar, You can use os.path.join() to join the user input to a base path. Python will take care of unix/windows differentiation and append slashes accordingly. >>> import os >>> base_path = os.getcwd() >>> base_path '/home/amuneer/workspace/playground' >>> file_name = raw_input("Enter Filena

Re: [BangPypers] Need help for python coding

2013-04-18 Thread Rahul R
os.path.realpath(__filename__) that should do the trick. ./Rahul On Thu, Apr 18, 2013 at 6:15 PM, Kamalakar gs wrote: > HI all, > I have a query that i have doc which is read through python.But instead of > giving path and filename > in the coding.I want to manipulate it like "python has to

Re: [BangPypers] Need help for python coding

2013-04-18 Thread Mandar Vaze / मंदार वझे
On Thu, Apr 18, 2013 at 6:34 PM, Rahul R wrote: > os.path.realpath(__filename__) > that should do the trick. As much as I understand the requirement, Kamalakar wants to "recognize" the path, then he needs some equivalent of "which" command (for binaries) or "locate" for non-binaries realpath did

Re: [BangPypers] Need help for python coding

2013-04-20 Thread Gora Mohanty
On 20 April 2013 22:47, Kamalakar gs wrote: > What i am asking is i have a file of other format for example .PCL which is > Patran file (Software used for analysis). Now what i want is if user inputs > a file name,python has to recognise the file name and directory of file > which exists and execu

Re: [BangPypers] Need help for python coding

2013-04-20 Thread hiharry danny
HELLO, please check for the file extension in ur code for .PCL , AND if the check matches then invoke the corresponding application required to open for that particular file using the if...elif...elif construct in python which is the substitute of switch case statements in other languages. On Su

Re: [BangPypers] Need help for python coding

2013-04-21 Thread Anand B Pillai
Hi Kamalakar, You are trying to frequently send large files as attachments to this list. I (list owner) has already rejected one such email. Today I found 2 more messages from you held because of the same problem at the list server. Please avoid sending attachments to the list. Make your que