Comments (6)
Hello @antjost ,
I think the problem with your solution si that you wont get the alias "python"=python3 after that change.
Can you try another solution :
if [ "$PYTHONEXE" = "python3" ]; then
pyversion="python"`python3 -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`
alias python=python3
else
pyversion="python"`python -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`
fi
instead of :
if [ "$PYTHONEXE" = "python3" ]; then
python() { python3 "$@"; }
export -f python
fi
pyversion="python"`python -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`
Can you tell me if it works?
Thank you
a+
from cassiopee.
Does anybody knows how to quote code correctly here?
from cassiopee.
Hello @benoit128,
Thank you for the quick response.
I added the 'alias python=python3' higher up in the file. Similar to how it used to be when Cassiopee was in svn and I forgot to add it to the proposed bug fix.
The bug fix you proposed works.
For the quote: I used \ , as in \` .
pyversion="python"\`python3 -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`
from cassiopee.
Does anybody knows how to quote code correctly here?
The circled option:
lets you chose Code block and then you can chose shell. see below for the results
if [ "$PYTHONEXE" = "python3" ]; then
pyversion="python"`python3 -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`
alias python=python3
else
pyversion="python"`python -c "import sys; print('.'.join(str(n) for n in sys.version_info[:2]))"`
fi
if you want to avoid all the clicking you can just do the following:
where you replace shell with the language you would like as seen below
from cassiopee.
alias python=python3
we removed the alias because it would not be defined in subshells without alias expansion.
from cassiopee.
Thank you for the tips on code quote.
@vincentcasseau : we can discuss that on monday.
from cassiopee.
Related Issues (14)
- ValidCassiopee - Global Database - Fails HOT 4
- Issue Labeling HOT 3
- Non-regression test: Automatic Rectilinear Mesh HOT 1
- Non-regression test: Moving IBMs HOT 1
- Non-regression test: Update Wire Mesh Model tests HOT 1
- Non-regression test: Wind tunnel outlet pressure control HOT 2
- Non-regression testing: add missing tests
- Comments in Cassiopee - Language HOT 2
- Help with Paraview and CGNS files generated with Cassiopee HOT 8
- CGNS convention when using I8/R8 HOT 1
- Changement argument par defaut de Cmpi.trace HOT 2
- New main function names for IBMs HOT 1
- Potential bug in test case Apps/IBMrotation_t1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassiopee.