I am just starting to learn python, and when I try to use print it tells me Unable to initialize device PRN - python-3.8

I use powershell, windows 10. I don't know why this wont work. Please tell how to fix this so I can use the print command.Unable to initialize device PRN, this is what it tells me when I try to use the print command.
Code I tried to run :
PS C:\Users\Nigel> print ('p')
Unable to initialize device PRN
PS C:\Users\Nigel>

You need to first execute the python command before typing out python code on your cmd. Right now you are trying to type print ('Hi') on cmd directly which executes the windows cmd print command. Not executing python code. Once you execute python command you should see something like this in your cmd.
C:\Users\bswap>python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
After which you can start executing python code.

Related

Downloading files from ftp via UDP but path is not rendered

Preface: This has to be done only via UDP. No TCP!
Enviroment: Client:Kali Linux OS. Server:Windows 10
Connection is established since other files were downloaded.
Tab to auto-fill is not available because it is udp connection
Question. Downloading files from ftp via UDP but path is not rendered as intended.
I'm already running mssql server 2017 and file location is correct as I confirmed it.
I also checked Official website. MicroSoft SQL Server
Path is \Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup\master.bak
The following is the command I tried.
tftp> get \Program\ Files\\Microsoft\ SQL\ Server\\MSSQL14.SQLEXPRESS\\MSSQL\\Backup\\master.bak
#Added two backslash to indicate directory.
This returns an error
Error code 256: File '\Program\' does not exist
Error code 256: File 'Files\\Microsoft\' does not exist
Error code 256: File 'SQL\' does not exist
Error code 256: File 'Server\\MSSQL14.SQLEXPRESS\\MSSQL\\Backup\\master.bak' does not exist
I did downloaded with
tftp> get \Windows\System32\cmd.exe
How do you type correct path in this case?
edit:Someone told me about 8.3 filename convention.
Accessing from non-8.3 OS to 8.3 FIlesystem might cause a problem.
Still, I didn't get why backslash weren't really rendered.
I did not manage to find the way with tftp, but you can use tftpy:
pip install tftpy
python
Python 2.7.18 (default, Apr 20 2020, 20:30:41)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tftpy
>>> client = tftpy.TftpClient('192.168.1.20', 69)
>>> client.download('\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup\master.bak', 'master.bak')

tf eula not getting any output TFVC, TEE-CLC and IntelliJ IDEA on Windows machine

I have installed TFS 2018, TFVC plugin for IntelliJ IDEA and Command Line Client TEE-CLC-14.134.0.
I am not getting any king of output while entering the command tf eula, hence I am not able to create Repository for version control.
Does anyone have any idea how to solve this issue or any workaround to accept the license.
PS Output:
PS C:\TEE-CLC-14.134.0> tf
PS C:\TEE-CLC-14.134.0> tf eula
PS C:\TEE-CLC-14.134.0>
Command Prompt Output:
Seems you are running command tf eula in PowerShell.
Just try to run the command in windows command line: Win+R - > cmd, it works for me.
UPDATE:
Just try to run tf eula -accept, then check if the tf command works now.
If that still not work, just try to re-download the TEE-CLC-14.134.0, then check it again.

Manually delete project in Weblate

I did some very unspeakable things with my weblate installation in order to change the git-branch the translation files can be found on.
Weblate hated my attempts and now continues to give all kinda errors.
As final resort I would just love to delete the project and recreate it.
Only: the "Delete project" gives me a "500 Internal Server Error".
The project and its components aren't removed.
Trying to remove the components give a similar error.
Does anyone know how to clean up and remove a project by hand? Even if there are 50 steps or more, a solution is all I care about.
PS: The other projects on the server are still fully functional and should remain so.
You can always do the removal from the Django management shell:
$ ./manage.py shell
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from weblate.trans.models import Project
>>> project = Project.objects.get(slug='hello')
>>> project.delete()
But the deletion from admin interface should not be that slow on current versions, if you're up to date, please file issue on that.

noob at MNIST and I do not know what to look for in the documentation

I am getting errors like
from: can't read /var/mail/tensorflow.examples.tutorials.mnist
from: can't read /var/mail/future
what am i doing wrong?
From the error messages, it sounds like you are trying to run a TensorFlow program by (i) typing commands into a bash (or other command) prompt, or (ii) running it using a command-line interpreter (e.g. by running source mnist.py).
To run a TensorFlow Python program, e.g. tensorflow/examples/tutorials/mnist/mnist.py you must run it under python, by entering the following command at a command-line prompt:
python tensorflow/examples/tutorials/mnist/mnist.py

Escape characters being printed to yorick shell

I’m working with the Yorick language on Yosemite. I’ve been able to successfully install the source code and start up the Yorick shell. However, using keyboard input at the shell (e.g. delete, up arrow, etc …) prints out the escape sequence ( ^H and ^[[A, respectively) to the command line.
$ yorick
Copyright (c) 2005. The Regents of the University of California.
All rights reserved. Yorick 2.1.06 ready. For help type 'help'
> ^H # delete
> ^[[A # up arrow
Is this type of response specific to the language's interpreter? Or is there some bash configuration I can implement to get the desired response of ‘erase' and 'recall command history' for these inputs?
Very simple fix.
The readline package is incompatible with Yorick (your graphics window
goes dead when readline blocks waiting for keyboard input)
However, I was able to install rlwrap via
$ brew install rlwrap
Which acts as a GNU readline wrapper to run the shell in.
$ rlwrap yorick
# Now delete and up arrow work