Skip to content
Advertisement

Tag: linux

How to solve UnicodeDecodeError in Python 3.6?

I am switched from Python 2.7 to Python 3.6. I have scripts that deal with some non-English content. I usually run scripts via Cron and also in Terminal. I had UnicodeDecodeError in my Python 2.7 scripts and I solved by this. Now in Python 3.6, it doesnt work. I have print statements like print(“Here %s” % (myvar)) and it throws

Python can’t read the environment variable

I used Ubuntu16.04 When I use sudo python3 into the interactive shell it can’t read the SECRET_KEY I set it in the /etc/profile.d/project.sh project.sh After reloading it but in vain. I also set in the ~/.profile But still got the error. How do I fixed it? [EDIT] It can work in sudo -E python3 But the futher problem is that when

Showing a dynamic plane

I have written a Python program that continuously returns 4 changing Cartesian coordinates that align to form a square plane that can be at any given orientation; yaw, pitch, or roll. What is the best way to go about displaying the constantly updating plane in 3D space? Note: This is being done on a Linux machine if that changes anything,

Python & MS Word: Convert .doc to .docx?

I found several questions that were similar to mine, but none of the answers came close to what I need. Specifications: I’m working with Python 3 and do not have MS Word. My programming machine is running OS X and cloud machine is linux/ubuntu too. I’m using python-docx to extract values from a .doc file that is sent to me

Advertisement