Comments (1)
This fixes it for me:
diff --git a/pawk.py b/pawk.py
index 7c507ee..33e8675 100644
--- a/pawk.py
+++ b/pawk.py
@@ -53,7 +53,7 @@ def save_last_expression(tree, var_name=RESULT_VAR_NAME):
body = tree.body
node = body[-1] if len(body) else None
body.insert(0, ast.Assign(targets=[ast.Name(id=var_name, ctx=ast.Store())],
- value=ast.Name(id="None", ctx=ast.Load())))
+ value=ast.Constant(None)))
if node and isinstance(node, ast.Expr):
body[-1] = ast.copy_location(ast.Assign(
targets=[ast.Name(id=var_name, ctx=ast.Store())], value=node.value), node)
For explanation see: https://bugs.python.org/issue40870
from pawk.
Related Issues (16)
- Please add β--versionβ option HOT 1
- [new feature] add action(s) before the output evaluation on each line HOT 2
- [new feature] auto covert possible column to numerical HOT 5
- "-Bt" prints an extra line at the top HOT 5
- Invoke pawk from a python script? HOT 1
- build error: 'pypandoc' has no attribute 'convert' HOT 1
- in place editing HOT 4
- Multiple regex matches HOT 5
- Re-release to PyPI with #16 ? HOT 4
- I broke pawk 0.8.0 π± HOT 3
- Create tag 0.8.1 HOT 1
- Statement in line action not working HOT 3
- Is there a variable holding the header line fileds? HOT 2
- 0 vs 1-based index HOT 1
- Add a option to keep the header row HOT 1
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 pawk.