Skip to content

Commit bbab462

Browse files
Update README.md
1 parent 1c40896 commit bbab462

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ We have a whole site dedicated to various scenarios with lots of queries where P
4949
Here is a small example PythonQL program (we're building a demo website with a number of scenarios that are especially good for solving with PythonQL):
5050

5151
```Python
52+
#coding: pythonql
53+
#
5254
# This example illustrates the try-catch business in PythonQL.
5355
# Basically, some data might be dirty, but you still want to be able to write a simple query
5456

@@ -86,16 +88,23 @@ print (len(res))
8688

8789
## Installing pythonql:
8890

89-
Currently you need to clone this repository. In the future we'll make a pip installer.
91+
Run ```pip3 install pythonql3``` to install pythonql for Python 3x.
92+
Python 2x support is coming.
9093

9194
## Running pythonql:
9295

93-
Currently PythonQL is available as a pre-processor, so you need to write a pythonql script and
94-
execute it, or execute a pythonql string. We have a runner that you can use to execute a file:
96+
PythonQL is implemented as a special encoding in a normal python script. When this encoding is specified, the
97+
pythonql preprocessor is run, which converts the pythonql syntax to pure python.
9598

96-
`python3 pythonql/RunPYQL.py <pythonql program>`
99+
So you should have a line in the beginning of your script:
100+
```
101+
#coding: pythoql
102+
103+
result = [ select y for x in [1,2,3] let y = x**2 ]
104+
```
97105

98-
## How it will work soon (and properly):
106+
## Uninstalling pythonql:
99107

100-
In the near future we will reimplement PythonQL to use file encoding, hence it will compile automatically
101-
if you mark your Python file as a PythonQL file.
108+
PythonQL installs a special file in your library to enable the pythonql encoding.
109+
If you decide to uninstall pythonql, run ```pip3 uninstall pythonql``` and then delete
110+
pythonql.pth file from your Python library.

0 commit comments

Comments
 (0)