Python-turtle syntax error in Sublime text editor 3 - python-turtle

impor turtle
sth=turtle.Turtle()
for i in range(30)
sth.forward(100)
sth,right(90)
turtle.done
The sublime text editor shows syntax error for**for i in range(30).
enter image description here

for i in range(3.4):
print(i)
you miss the : and the action to do.
use backquotes to format you code.

Related

adding a jsPDF font?

I found some information on the Internet, but it works. I get errors when I add my own font. Here the error.
Function Error output#file:///C:/Users/jspdf.debug.js line 1449 > srcScript : 1985: 87: string contains invalid character
Could you maybe share the section of your code where you add the font, it's hard to give an answer from the error.
But normally you add a font by converting a tff file to a base64 string and adding it like this:
doc.addFileToVFS('font-name.ttf', base64StringOfTffFile);
doc.addFont('font-name.ttf', 'font-name', 'normal');
doc.setFont('font-name', 'normal');

Decode Hebrew text with unidentified encoding

I have a very old Hebrew text file that I don't know what software was created and what its encoding is. The text appears to me like gibberish.
The text looks like this:
enter code here $€∆«¬ Õ–€–‘«¸ Õ–« ¬Œ∆ ‹«Œ≈«‹ √“À “…¨ ©«¬Œ∆ ‹«Œ≈«‹ ∆€–Àœ®¨ «–∆ €∆…»À⁄ «À«Œ≈ \
I would be very grateful if anyone could figure out the coding for me and how to translate it to Hebrew.

How do I send output from the terminal to a text file in Visual Studio Code with the proper encoding?

I'm having issues sending output containing Unicode box-drawing characters to a text file.
The string ┌───top───┐ prints to the terminal fine using the print command. It also renders properly if I open and write directly to a file in my code.
However, if I pipe the terminal output into a text file using
<run command> > out.txt, I get the result
ΓöîΓöÇΓöÇΓöÇtopΓöÇΓöÇΓöÇΓöÉ
Everything else prints fine, but why doesn't it handle certain Unicode characters?
Is there a quick fix for this?

Why FormFeed Character in a txt File is rendered as Page Break by MS Word / WordPad but not by NotePad?

I have a .txt file and it has FormFeed character between para1 and para 2.
Para2 needs to be shown in next page on printing hence FormFeed is placed here.
sample txt file layout:
para1
formFeedCharacter
para2
expected layout on printing:
para1 is shown in 1st page and para 2 is shown in 2nd page as formFeed acts as page break.
When opened and printed with MS Word/WordPad:
expected layout is coming in 2 pages as expected.
When opened and printed with NotePad:
1)FormFeed is not acting as Page Break and all content is printed in 1 page only
2)FormFeed is displayed as unreadable Symbol
Final Printed layout when used Notepad:
para1
Unreadable symbol (caused by FormFeed)
para2
Why Notepad is unable to render FormFeed as pageBreak ?
Is it because NotePad is a text Editor While WordPad/MS Word is Word processor ?
Is there any way how we can make this work with NotePad ?
Notepad:
1)It is a text Editor program and cannot interpret Form Feed character as Page Break.
2) Hence there is no way we can make formFeed work as page break and print it by using NotePad.
WordPad/MS Word:
1) Both are Word Processor softwares and can interpret FormFeed correctly as Page Break.
Hence Unreadable symbol is not shown on opening txt file with them
2) We can also see the page Break by Print Preview feature in wordpad/NotePad.
This hyperLink provides additional information on this topic:
Additional Info
Also below hyperlink shows similar topic post asking for a universal solution for pageBreak Feature using txt file.
page Break in txt file Universal Solution

How to print an excel document from command line with PRINT command in MSDOS

Im trying to print an excel document through a default printer configured from command prompt using PRINT command as shown below:
C:>print c:\printdocs\test1.xls
by typing above and pressing enter a line saying 'C:\test1.xls is currently being printed'
is getting displayed but the excel document is not sent for default printer for printing. Please help me with this, where iam going wrong.
print.exe is designed to print a text file, and nothing else. In fact, if you type print /? from a command prompt, it tells you that in the first line of the text:
C:\>print /?
Prints a text file.
PRINT [/D:device] [[drive:][path]filename[...]]
/D:device Specifies a print device.
So the answer to your question is that you can't print an Excel file via print from the command line, because an .XLS file isn't a text file.

Resources