Supervisord - How to use command with space in file path - macos

Using supervisord, I am unable to use a file path with a space in one of the directories. I am trying to use my iCloud Drive folder as the path to the file.
the path:
~/Library/Mobile Documents/com~apple~CloudDocs/Code/modbot/modbot.py
my program supervisord.conf (non working. works when pointed to a new path without a space in the directory)
[program:modbot]
command=/Users/Jonathan/.virtualenvs/modbot/bin/python3.7 /Users/Jonathan/code/modbot/modbot.py
paths I've tired in supervisord.conf:
~/Library/Mobile Documents/com~apple~CloudDocs/Code/modbot/modbot.py
~/Library/Mobile\ Documents/com~apple~CloudDocs/Code/modbot/modbot.py
~/Library/Mobile' 'Documents/com~apple~CloudDocs/Code/modbot/modbot.py
"~/Library/Mobile Documents/com~apple~CloudDocs/Code/modbot/modbot.py"
~/Library/"Mobile Documents"/com~apple~CloudDocs/Code/modbot/modbot.py
After googling I even tried double escaping but nothing is working.

turns out I'm an idiot. supervisord doesn't use ~ so that was the problem, working code:
[program:modbot]
command=/Users/Jonathan/.virtualenvs/modbot/bin/python3.7 "/Users/Jonathan/Library/Mobile Documents/com~apple~CloudDocs/Code/modbot/modbot.py"

Related

Latex - Bibtex/BibLatex - How can I include a file with space in the path?

I am using Mac and
\usepackage{natbib}
It seems that the space in the path caused problems, i.e. Box Sync.
\bibliography{/Users/c082213/Box Sync/AA_My_Papers/MyStats.bib}
I have tried to put them in double "", and it doesn't work on Mac. Is there anyway that we can fix this?
Many thanks!
one solution is to use a relative path.
If the .bib and the .tex file are in the same folder you can just write:
\bibliography{MyStats}
On the other hand, there are many other possible solutions to handle the problem with with spaces in the path. My suggestion is: avoid it to name folders or files with spaces. It will produce problems for some reasons.
I had the same issue with Box and it's default usage of spaces, so I created a soft link having no spaces:
ln -s "Box Sync" Boxsync
then I can use the bibliography command as usual.

MIT-Scheme for SublimeREPL windows

Getting the error WindowsError(2, 'The system cannot find the file specified.')
I've tried tinkering with the Main.sublime-menu, but kinda uncertain what path I should be putting so i used variations of C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe, including without mit-scheme.exe and using "\\\" (double) instead of just "\" (since that's what was being accepted by sublime which was what i used to edit the file), and also unsure at what point in the Main.sublime-menu I should be altering.
I've read similar solutions, but they're usually in mac where you can easily type which scheme onto the console to get the file path of scheme, so I'm thinking it has to do with me not knowing my correct file path or something? Any ideas?
Add these two env variables to your machine:
MITSCHEME_BIN_PATH=C:\Program Files (x86)\MIT-GNU Scheme\bin
MITSCHEME_LIBRARY_PATH=C:\Program Files (x86)\MIT-GNU Scheme\lib
Config this Main.sublime-menu file like this:
Then it should work. Enjoy it!

xcode 4.5.1. Header Search path not working, <directory/file.h> file not found

I have added a include directory in my home directory. I can run "ls -l ~/include" from the build directory.
I have added that directory in both "Header Seach Path" and in "User Header Search Path". In both places I have tried with both non-recursive and recursive.
But xcode 4.5.1 can not in any situation find the first stated header file.
It is stated in source code calls.m as:
#include <directory/file.h>
I get a "Lexical or Preprocessor issue 'directory/file.h' file not found."
But when running xcodebuild from cli it has no problems what so ever to build the source.
I have tried many of the suggestions found on internet
Putting a include in /usr/ om my drive
Adding a index to the project, adding files with no copy and no "Add to target" marked.
Restart xcode.
Specifying all specific paths.
But still no go.
What is the problem. BugĀ“s in xcode?
I just had a similar issue, and it was because there were spaces in the path which I defined for the Header Search Path. For example, I was defining the following as a search path:
$(SRCROOT)/Frameworks/Headers
which was being expanded out to the following:
/Users/skoota/Documents/Xcode Projects/My App/Frameworks/Headers
as you can see, there are spaces within the path (which are not immediately evident, as you are using the $(SRCROOT) variable) and the compiler doesn't particularly appreciate the spaces. I solved this problem by changing the search path to this:
"$(SRCROOT)"/Frameworks/Headers
(note the quote marks around $(SRCROOT) which escapes the spaces). This now expanded out to:
"/Users/skoota/Documents/Xcode Projects/My App"/Frameworks/Headers
which works perfectly, although looks a bit odd with the embedded " marks. This took me a while to figure out, so hopefully it helps!
This usually happens if there are spaces in your directory's path. To overcome this problem, use double quotes around the path.
Suppose you want to use your project directory, then you should use: $PROJECT_DIR. Enable recursive if you want to search within the folders as well. Alternatively, you can use $(SRCROOT)

how to change web server folder location in xampp

I have installed xampp and by default my website files are stored in htdocs. How do I change the webdirectory path?
Edit the file /opt/lampp/etc/httpd.conf and change the lines containing current web directory path. It should start with DocumentRoot. Update all the places having the current path to the path you would like it to be.
It can be done by editing the "httpd.conf" file present in this path "\xampp\apache\conf\".
Change the line that starts with "Directory ...".
Note that all the lines that start with a hash (#) are just comments and are there just to describe the commands present there in the file.
search for the file "httpd.conf" and change the path in that file.
change localhost's name ? thus instead of having localhostdomain/webdirectory
you may have newdomain/webdirectory ?

MSDOS - "The system could not find the file specified"

I am trying to copy the contents of a log file to another log file using this command:
type \\server\f$\Test path\Test.log >> \\server2\f$\Logs\Testpath\Test.log
This has always worked in the path, but recently I have changed the location (path) to Test.log. The path is slightly longer. I now get an error:
The system could not find the file specified
I have googled this statement and the common responses are: 1) check the filename exists, 2) check the filename is not corrupt 3) Check the server is online.
I have done all of this. Is there a restriction on the number of characters a path can have? If there is then is there a workaround?
UPDATE 12/07/2012 09:49 GMT
Adding quotes around the path seems to resolve the problem. Why does adding quotes resolve the problem?
The problem was that the source path had a space in it. Adding quotes around the path resolved the problem.
Type is to examine a file, not to copy.
Also, if server is an actual server and not a folder, then you should be using two slashes (\server\share)
Example:
copy \\server\f$\Sourcepath\Test.log \\server2\f$\Logs\Destpath\Test.log /y
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true

Resources