Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Matplotlib (pytel scripts)

Matplotlib (pytel scripts) 7 years 9 months ago #24962

  • Watermotion.eu
  • Watermotion.eu's Avatar
Lufia wrote:
Now we add the path to pytel to be able to import the modules. You will have to change the path (PathToPytel).
sys.path.append(path.join( path.dirname(sys.argv[0]), \
                '/PathToPytel/opentelemac/v6p2/pytel')) 
from utils.files import getFileContent
from parsers.parserSortie import getValueHistorySortie
from parsers.parserSELAFIN import SELAFIN,getValueHistorySLF,parseSLF,\
                                  crossLocateMeshSLF,xyLocateMeshSLF,\
                                  getValuePolylineSLF,subsetVariablesSLF
from parsers.parserStrings import parseArrayPaires

Concerning the quote above, my compiler throws import errors on the following items

1.
from parsers.parserSortie import getValueHistorySortie
which should be
from parsers.parserSortie import Sortie
since getValueHistorySortie is a 'method' in the class Sortie and not a standalone function. However, I don't see that this method is called afterwards anyhow.

2.
from parsers.parserSELAFIN import parseSLF,crossLocateMeshSLF,xyLocateMeshSLF
since these functions are missing in the document <your telemac directory>/scripts./python27/parsers/parserSELAFIN.py

Hence I assume that these invocations can be removed safely. Experts please confirm/reject.

Working with Telemac scripts v7p2r0. NB: the path /PathToPytel/opentelemac/v6p2/pytel/ does not exist any longer in the tree of the Telemac system and that directory is currently called <your telemac installation directory>/scripts/python27/
The administrator has disabled public write access.

Matplotlib (pytel scripts) 3 years 6 months ago #38455

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi,

I am using v8p2 and I am getting import error for 'getFileContent' and 'parsers'.
Since the above post is very old, can someone help me to remove these errors for telemac v8p2?

Thanks in advance!
The administrator has disabled public write access.

Matplotlib (pytel scripts) 3 years 6 months ago #38499

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi,

I assume that in telemac v8p2 'parserSELAFIN.py' is replaced by 'parser_selafin.py'.
Is there any alternative to read a selafine file instead of using:
'slf = SELAFIN(filename)'

as there is no SELAFIN class in 'parser_selafin.py'


Thanks
The administrator has disabled public write access.

Matplotlib (pytel scripts) 3 years 6 months ago #38505

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
in v8p2, the class is now TelemacFile.
Have a look in the notebooks for some example of use

Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: nitesh

Matplotlib (pytel scripts) 3 years 6 months ago #38528

  • nitesh
  • nitesh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 73
  • Thank you received: 1
Hi Christophe,

Thank you for the help.
There are many other files and folders too whose names have been changes from one version to another. Is there any source/file/document where I can check these changes? for example if I want to check the updated names/versions in v8 of files parserSortie.py or parserStrings.py from previous versions?
The administrator has disabled public write access.
  • Page:
  • 1
  • 2

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.