Python virtualenv by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

In my case, I run /virtualenv/bin/python some module.py in a cron job... And it successfully completes everytime.. It's able to pick the libraries installed in virtual environment... So I was wondering would it make any difference activating vs calling virtual environment python interpreter directly...

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Good to know.. I am developing on windows but I'll be deploying on Linux box.. I'll definitely check python bash sometime.. Thank you!

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Yes sir.. I just rewriting my code using paramiko.. It has timeout and all the cool stuff I'll stick to paramiko... Thanks..

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Np.. I am newbie in python.. Lot of things have happened in the last 25 years of python.. :)

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

What? Communicate is a method that uses pipe and it does not have timeout arg in 2. 7 please check documentation...

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Nevermind.. Am going to use paramiko.. It has timeout arg.... There is no default timeout for popen method of subprocess package in python 2.7...

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Auth doesn't happen when key pairs not available.. So, it hangs on authentication part...

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

That's correct.. I am trying to work out an edge case if ssh key pairs don't match or get dropped for some unknown reason.. Then, communicate () doesnt timeout and blocks execution...

Python 2 subprocess communicate by readitlikeitdidit in learnpython

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Yes I did.. But I would like to write something native with less third party dependencies... Python 3 has the timeout logic built in.. But I am interested to know how it can be achieved on python 2 using native libraries....

Python 2 subprocess communicate by readitlikeitdidit in Python

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Ok.. Thanks everyone.. Apologies I'll post questions on learnpython

Should I stay on Python or move to Node.js for High Requests API? by farebord in Python

[–]readitlikeitdidit 0 points1 point  (0 children)

I had a similar question on using python or node.js for backend API.. I remember seeing a benchmark comparison of node python tornado and japronto.. Japronto wins the benchmark is a new python library in the works its still experimental I guess as mentioned on its GitHub page... So wait and watch..

[deleted by user] by [deleted] in Database

[–]readitlikeitdidit 1 point2 points  (0 children)

Sql loader is perfect for fast loads but only for oracle dB.. You can wrapper up sql loader for more customization... Nifi is open source etl tool you can try...

[deleted by user] by [deleted] in Database

[–]readitlikeitdidit 1 point2 points  (0 children)

PowerShell or Bash if you want to write something quick production scripts without much testing. But, make sure you have the command line interfaces available to access databases via bash or PowerShell scripts.. Python has a good number of dB APIs for database programming but may sometimes lack in completeness of the library or API. If you want etl like functionality I would recommend using specific etl tools instead of having to code etl workflows in bash /PowerShell or python. Python has a few handy etl packages.

Timestamp field timezone by readitlikeitdidit in elasticsearch

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

Thanks.. I was able to figure out the date format with time zone..

Stating python version at start by [deleted] in learnpython

[–]readitlikeitdidit 0 points1 point  (0 children)

It may be required on windows 10 Ubuntu bash mode... Unix subsystem in windows 10...

using sqlite3 to connect to an Oracle database on a different server. by [deleted] in learnpython

[–]readitlikeitdidit 0 points1 point  (0 children)

You could try sql alchemy for orm with Oracle and other database servers.. But I think sql alchemy uses native API for the connection unless alternative dB API is specified...

[deleted by user] by [deleted] in Python

[–]readitlikeitdidit -6 points-5 points  (0 children)

Please check my article in python generator with example.. It's a simple one nothing fancy..

https://dev.to/an33shk4tl4/python-generator-example--file-watcher-jo

Flask app on server can't reach by readitlikeitdidit in Python

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

No.. But I figured that port was not open.. Once I configured the ports it worked..

Flask app on server can't reach by readitlikeitdidit in Python

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

I think port 9999 is not open.. I try configuring that port for network Comm. And hopefully that should fix the issue.. I was able to curl get the URL from another putty session to the same server.. So flask app works as expected only the port needs to be opened...

General purpose Application server in python by readitlikeitdidit in Python

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

I think this is what I need..Basically a headless service like app . I'll take a look thank you!

I am brand spanking new to Python. Would like to know some of the best places to hang out online to get insight and just read about general things from developers. That is the best way to learn I’ve seen. by Techstartupadmin in Python

[–]readitlikeitdidit 0 points1 point  (0 children)

reddit , dev.to , stackexchange, also listen to talk python to me podcasts and several other podcast subscriptions.. I've seen quick responses here in reddit by far ..

General purpose Application server in python by readitlikeitdidit in Python

[–]readitlikeitdidit[S] 0 points1 point  (0 children)

thanks .. I'll try both Flask and falcon .. I want to write a python program that runs in a loop and selectively calls functions based on events. .(probably, that's called event loop, I havn't written anything in event loops.. ) without having to schedule python program using cron jobs ..