Skip to content

AWS region in AWS Glue

How can I get the region in which the current Glue job is executing? When the Glue job starts executing, I see the output Detected region eu-central-1. In AWS Lambda, I can use the following lines to fetch the current region: However, it seems like the AWS_REGION environment variable is not present in Glue an…

Python: Making a multiple line user input to text file

How the heck can I do this… I’m New to Python and I’m trying to create a recipe catalog program to store all my recipes… The ‘adding a recipe’ part of my code: I just need the Multi-line user input… EDIT: I need it to go into a .txt file Answer You can use iter(input,…

How to make USB camera work with OpenCV?

I copied code from https://stackoverflow.com/a/34588758/210342 and used with default (built-in) camera, it worked. Then I attached USB camera, tested it with VLC and changed the code to open camera 1: I check whether the camera is open cam.isOpened() — it is — but the camera is not enabled (its ha…