Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently trying to make some small shell-like utility for a custom script I wrote, so I can easily work with it (it's rather simple, so an interactive shell would be perfect).
Do you have any resources for me on how to create a shell in Python? I spent googling for a while, but all I could find was information about IDLE and similar Python interpreters. But I would rather want to know how to write a completely custom and command line based shell.
My approach would be hooking the stdin/out for commands, but given that the Python library offers so many great utilities, I want to make sure there if there is no better way.
The cmd module in the standard library could be a start -- if you have any trouble using it, please post more specific questions (ideally with some toy example showing what you're trying to achieve and what you're getting instead!).
You might have a look at pyparsing. It is definitely only about lexing and parsing, but that's definitely the hardest part of the problem.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I searched around a lot but found just how to get terminal size, but not how to resize it.
Are there any solutions?
I tried with \e[8;50;100t but it doesn't work on windows.
You will have to use the Windows API to do that. Here a Stack-Overflow answer that gives you the correct API calls needed to do that: How do you programmatically resize and move windows with the Windows API?
From Go you can call the Windows API either using CGO or using syscall. Here an article that uses syscall which is easier to get started: https://medium.com/#justen.walker/breaking-all-the-rules-using-go-to-call-windows-api-2cbfd8c79724
Note that you should always protect a file using Windows specific commands with a build flag. This won't work for other OSs. If you need this to work for other OSs, too, you need to implement different versions for the OSs you want to support.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
What I am asking can be a bit silly and weird by anyway, I decided to ask you.
I am working as network security administrator and have knowledge and experience on cyber security as well. 2 month ago I Started my master degree on Cyber Security and now really want to continue my career on Cyber. Along with network and cyber skills I though having some programming languages in pocket will really benefit me. Shell scripting and Python are the only ones which really catch my interest.
I started with bash scripting and just wrote couple of little scripts. I wonder do you know any source which can I use for exercising. I am usually used to learn when I am actually searching and doing something. Therefore if for instance there is any page where I can find tasks for bash scripts with what I can practice and try do find solution, myself.
Thanks in advance!
You can direct yourself to :
https://cmdchallenge.com/
https://www.codewars.com/
Both sites are awesome and contain many challenges that will really help you to learn how to code and script.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
So, I have a college project now that uses Prolog, I'm not the first one to work on the code so it's already pretty huge, but I have to put it working with a Prolog graphical interface, so my question is: is there any Prolog graphical interface that doesn't require me to change the code that's already written?
Another option you might want to look into:
https://www.gtk-server.org
Besides SWI-Prolog own XPCE GUI toolkit, as mentioned in the comments, another possibility is to write the GUI in Java and use the SWI-Prolog JPL library to interface with it. The SWI-Prolog distribution includes some JPL examples that showcase GUI elements.
Adding a GUI interface to what, I assume, is currently a command-line application, will be facilitated if the Prolog application is already abstracting I/O using mechanisms such as the message printing mechanism. If that's already the case, the messages being printed can be intercepted using a hook predicate to display them in GUI elements.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Can anybody recommend an IM client (Linux / Mac preferred) that either support natively, or via a plugin the ability to format & highlight blocks of code that are pasted in chat windows? I'm constantly pasting and receiving blocks of code in my client (Adium at the moment) where I copy them out into an editor to perform the formatting to make it readable.
I know I can't be the only one that shuttles snippets of code around to others like this, so I figure someone must have done this already, but my searches are coming up with nothing. Please someone help me before I throw my hands up and just start another time-sink project myself :)
You could also take a look at http://collabedit.com/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've never used any of these, but they are listed on the main Free Pascal site and I would really like to get my hands on:
Beginners guide, to get me started
Advanced guide, to help me grow
All this in case it's still used/standard.
Thanks
IMHO makefile.fpc is mostly FPC internal. I wouldn't use it for own projects.
The idea is that Makefile.fpc is combined with a template fpcmake.ini by running "fpcmake -Tall -w" to generate a GNU Makefile. The fpcmake.ini template is built in into the fpcmake binary.
Makefile.fpc is a file that has parameters for customizing the (fpcmake.ini) template, but can also add additional targets (in makefile format).
To my knowledge there is a paragraph about fpcmake somewhere in the documentation, nad the rest is usually learned by example, simple usage in packages/ and the more complicated examples are the toplevel makefile.fpc and the ones in compiler and rtl/