Comments (2)
Tried to fix this via computing all quantities with bc, but that is probably not an option. Python does complicated manipulations (like print(round(${T},-1)+10)
); this is not possible with bc (at least not in less than a few lines).
from straintool.
Trying a new approach:
- add a function in the script, to resolve system's python version (
resolve_py_version()
) - make a function alias to python; this is called
pythonc
. If the system Python version is 3.x.x, then
this function just collapses toalias pythonc="python -c"
. Else, if the version is 2.x.x, then the alias is
python -c "from __future__ import print_function;
.
Hence, now
- When calling Python's print in the script, always use Python 3.x.x syntax
- Instead of writing
python -c "print int((${south} + ${north})/2)"
we write
pythonc "print(int((${south} + ${north})/2))"
remember that is python 3.x print is a function, hence it must have parenthesis, print 5
is invalid, print(5)
is ok!
Also, never use the piped version, aka echo print ${south} + ${tmp_scrate} | python
from straintool.
Related Issues (20)
- One tensor (barycenter) not working?
- [gmtplots...] bc not woring for windows
- strain.py: calculate sd of second invariant HOT 1
- magnitude of sd
- Multithreading is different between Linux and Windows HOT 1
- generate delaunay tr: more triangles than real
- generate-statistics flag
- sVn sVe must not be zero! HOT 2
- input file duplicate lines stop processing HOT 2
- No Example input file HOT 16
- Invalid UTM Zone HOT 10
- multicore proc error for Windows 10 HOT 2
- Map size changes with different Wt HOT 1
- Bug with Multiple UMT zones and the veis method HOT 2
- Add the main article to the project HOT 1
- straintool HOT 1
- unable to reproduce the test HOT 4
- Problem when the grid cover the longitude 0 HOT 2
- Create a couple of validation tests HOT 1
- Multicore bug for the output grid
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 straintool.