X Tutup
Skip to content

Commit cc1172f

Browse files
authored
Merge pull request #4 from SaadBazaz/زبانیں
زبانیں
2 parents da5f137 + 6a00643 commit cc1172f

28 files changed

+108
-7
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include urdupython/languages/*/*.yaml

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ Programming Language in Urdu, based on Python - اردو میں کوڈ لکھی
99
- (optional but recommended) Virtual environment, like ```conda``` or ```virtualenv```
1010

1111
## How to Install
12+
### Pip
13+
If you've installed ```pip```, you can download UrduPython from [Test PyPI](https://test.pypi.org/project/urdupython/) using the following command:
14+
```
15+
pip install -i https://test.pypi.org/simple/ urdupython
16+
```
17+
18+
### Source
1219
1. Download this repo as a ZIP, or clone it via Git.
1320
2. Open the repo's folder in your Terminal.
1421
3. Run ```pip install -e .```

setup.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
# References:
22
# - https://stackoverflow.com/questions/27494758/how-do-i-make-a-python-script-executable
33

4-
from setuptools import setup
4+
from setuptools import setup, find_packages
5+
6+
files = ["samples/*/*", "languages/*/*.yaml"]
7+
58
setup(
69
name='urdupython',
7-
version='0.0.2',
10+
version='0.0.8',
811
author='Saad Bazaz',
912
author_email='saadbazaz@hotmail.com',
1013
url='https://github.com/saadbazaz/UrduPython',
11-
packages=['urdupython'],
14+
# packages=['urdupython', 'modes', 'filters', 'languages'],
15+
packages=find_packages(),
16+
package_data = {'urdupython' : files },
1217

1318
entry_points={
1419
'console_scripts': [
1520
'urdupython=urdupython.urdu_python:main',
16-
'اردوپایتھان=urdupython.urdu_python:main'
21+
'اردوپایتھان=urdupython.urdu_python:main',
1722
'اردوپای=urdupython.urdu_python:main'
1823
]
1924
}

test/test_input.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
input("Enter anything")

test/test_shell.py

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# # client.py
2+
# # import socket
3+
4+
# import subprocess
5+
6+
# from threading import Thread
7+
# from time import sleep
8+
9+
10+
# # s = socket.socket()
11+
# # s.connect(('localhost', 1337))
12+
# popen = None
13+
14+
# def execute(cmd):
15+
# print ("im here")
16+
# popen = subprocess.Popen(cmd,
17+
# stdin=subprocess.PIPE,
18+
# stdout=subprocess.PIPE, universal_newlines=True)
19+
# for stdout_line in iter(popen.stdout.readline, ""):
20+
# yield stdout_line
21+
# popen.stdout.close()
22+
# return_code = popen.wait()
23+
# if return_code:
24+
# raise subprocess.CalledProcessError(return_code, cmd)
25+
26+
# # Example
27+
28+
# def output_loop():
29+
# for path in execute(["python"]):
30+
# print(path, end="")
31+
32+
# # Example
33+
# # await execute("python")
34+
# # print(path, end="")
35+
36+
# if __name__ == "__main__":
37+
38+
# input ("First input")
39+
40+
# thread = Thread(target = output_loop)
41+
42+
43+
# thread.start()
44+
# thread.join()
45+
46+
# sleep(2)
47+
# # popen.communicate(str(input("I am here")).encode('utf-8'))
48+
# popen.stdin.write(str(input("I am here").encode('utf-8')))
49+
# sleep(2)
50+
51+
# print("thread finished...exiting")
52+
53+
54+
# # popen = subprocess.Popen(['python',], stdout=subprocess.PIPE, universal_newlines=True)
55+
# # for stdout_line in iter(popen.stdout.readline, ""):
56+
# # yield stdout_line
57+
# # popen.communicate(str(input()).encode('utf-8'))
58+
# # popen.stdout.close()
59+
60+
# # while (process.wait()):
61+
# # process.communicate(str(input()).encode('utf-8'))
62+
63+
64+
65+
#from subprocess import Popen, PIPE
66+
67+
#p1 = Popen(['python'],stdin=PIPE, stdout=PIPE)
68+
# # p2 = Popen(['sed', '/^$/d'], stdin=p1.stdout, stdout=PIPE)
69+
# # p3 = Popen(['awk', 'NR > 1 { print $2 }'], stdin=p2.stdout, stdout=PIPE)
70+
71+
#p1.stdin.write("print('hello world!')".encode('utf-8'))
72+
73+
#p1.wait()
74+
# stdout, _ = p1.communicate()
75+
76+
77+
78+
79+
80+
#!/usr/bin/env python3
81+
import time
82+
#from subprocess import Popen, PIPE
83+
import subprocess
84+
85+
proc = subprocess.Popen("python", stdin=subprocess.PIPE)
86+
#while (proc.poll() is None):
87+
proc.stdin.write("print('hello world!!')".encode('utf-8')) # etc
88+
#time.sleep(4)

urdupython/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Python, but in Urdu.
66
"""
77

8-
__version__ = "0.1.1"
98
__author__ = 'Saad Bazaz'
109
__credits__ = 'Grayhat'
1110
__url__ = 'https://github.com/saadbazaz/UrduPython'

urdupython/languages/__init__.py

Whitespace-only changes.

urdupython/languages/hi/__init__.py

Whitespace-only changes.
File renamed without changes.

urdupython/languages/ur/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)
X Tutup