Project XYplorer on Linux: 15/03 New Video!
-
- Posts: 13
- Joined: 17 Dec 2014 00:34
Re: Project XYplorer on Linux: 15/03 New Video!
No problem and fully understood. But when you say Crossover, I am still wondering if the problem is mine alone (in Crossover) or whether people on other systems using Wine or Playonlinux with different settings are able to make it work. If anyone is running it successfully in Linux I would appreciate them posting here or otherwise letting me know that, as then I can try again. thanks ---
Re: Project XYplorer on Linux: 15/03 New Video!
@40k,
How did you manage to get PFA to work. I need to quote everything - python path, helper script and final program. However; I don't get a custom name then and it shows the python path instead.
How did you manage to get PFA to work. I need to quote everything - python path, helper script and final program. However; I don't get a custom name then and it shows the python path instead.
Re: Project XYplorer on Linux: 15/03 New Video!
Not sure how many of you are using XY on Linux. I've tried using it on Manjaro Gnome Shell. It does look good. Some issues that I encounted - most of them reported already
1. PFA - If I start the path with / it appends the XY path before trying to open it. If I quote it the caption is lost. Would be great if there is some intelligence added to not add XY path if the path starts with / so that I don't need to quote them and caption issue gets auto resolved
2. Startup error
3. Cannot drag
4. Cannot customize toolbar (can someone share a list of all available toolbar buttons- I don't have a windows installation currently)
5. Cannot check for updates
6. Configuration dialog is slow to open
7. The captions for Customising columns appear with a delay
8. A new toolbar button added recently (last 5 months) between Type Stats and Mini Tree on fresh installation cause a crash
9. Same as 1 - I can't add a path starting with / in address bar. It appends the xy path
Most of the issues can be lived with except for 1 and 9. If you could add a small intelligence not to append xy path ahead of / and not convert to / to \ - it will defeat all existing file managers on Linux. I know - I have explored many of them across last 5 months.
1. PFA - If I start the path with / it appends the XY path before trying to open it. If I quote it the caption is lost. Would be great if there is some intelligence added to not add XY path if the path starts with / so that I don't need to quote them and caption issue gets auto resolved
2. Startup error
3. Cannot drag
4. Cannot customize toolbar (can someone share a list of all available toolbar buttons- I don't have a windows installation currently)
5. Cannot check for updates
6. Configuration dialog is slow to open
7. The captions for Customising columns appear with a delay
8. A new toolbar button added recently (last 5 months) between Type Stats and Mini Tree on fresh installation cause a crash
9. Same as 1 - I can't add a path starting with / in address bar. It appends the xy path
Most of the issues can be lived with except for 1 and 9. If you could add a small intelligence not to append xy path ahead of / and not convert to / to \ - it will defeat all existing file managers on Linux. I know - I have explored many of them across last 5 months.
Re: Project XYplorer on Linux: 15/03 New Video!
You should be able to enter the following in the XY address bar to get a comma seperated list of all the buttonsnerdweed wrote:4. Cannot customize toolbar (can someone share a list of all available toolbar buttons- I don't have a windows installation currently)
Code: Select all
::text toolbar(, , 1);
That was the touchscreen mode button :tsm, just for my own interest what does the %OS% variable resolve to?, and or what does it say as an OS under Help | Various Information ?nerdweed wrote:8. A new toolbar button added recently (last 5 months) between Type Stats and Mini Tree on fresh installation cause a crash
Re: Project XYplorer on Linux: 15/03 New Video!
Thanks Jupe. That worked - it gave me a list. OS says Windows_NT and windows version is 10
Can you check on WIndows if the captions in PFA/POM are lost when you quote the path%OS% = Windows_NT
%winver% = 10.0
Re: Project XYplorer on Linux: 15/03 New Video!
No the captions aren't lost on Windows when you quote the path, I have lots of path's quoted because it is a requirement if you use command switches, Linux requires single quotes when running apps instead though doesn't it?, I have no idea how that works considering XY is designed for Windows. One suggestion I have that you may or may not have already tried, is instead you could try loading a script to run the app, something like:
and then do all the double quoting etc in that script file instead.
Code: Select all
"Caption|Icon.exe" txt>::load 'runapp.xys';
Re: Project XYplorer on Linux: 15/03 New Video!
Linux requires single double quote only when spaces.
The below command shows the caption and invokes the program - however; the variable isn't resolved. I believe because of ''
Need to find a way to get this to work
The below command shows the caption and invokes the program - however; the variable isn't resolved. I believe because of ''
Code: Select all
"Mover|<xy>" *;\ >run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" <pfaitems>';
Re: Project XYplorer on Linux: 15/03 New Video!
You could try this or something similar using quote(), no promises:
word wrapped:
Or if brevity isn't of a concern another option:
word wrapped:
It will probably be easier to just try to get 1 item at a time going at the moment before you worry about multiple items, so I changed the variable to <pfaitem> for the time being.
word wrapped:
Code: Select all
"Mover|<xy>" *;\ >::run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" ' . quote(<pfaitem>);
word wrapped:
Code: Select all
"Mover|<xy>" *;\ >::run quote('/usr/bin/python') . ' ' . quote('/home/naveed/xyassist.py') . ' ' . quote('/data/code/projects/filer/filer.py') . ' ' . quote(<pfaitem>);
Re: Project XYplorer on Linux: 15/03 New Video!
I didn't follow the story, only the very last part. And it seems to me that you got something wrong...
So: the run command's operand is a string, this is XY-syntax. A string must be specified quoted, either double (variables are resolved) or single (variables are seen as plain text). As the outer quotes are single, no variables are resolved. So use double quotes.
It seems the string itself must contain double quotes. The rule says: double quotes inside double quotes must be specified twice. (Else they are end-of-string!) So I think instead of I'd expect: to work as intended.
So: the run command's operand is a string, this is XY-syntax. A string must be specified quoted, either double (variables are resolved) or single (variables are seen as plain text). As the outer quotes are single, no variables are resolved. So use double quotes.
It seems the string itself must contain double quotes. The rule says: double quotes inside double quotes must be specified twice. (Else they are end-of-string!) So I think instead of
Code: Select all
run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" <pfaitems>';
Code: Select all
run """/usr/bin/python"" ""/home/naveed/xyassist.py"" ""/data/code/projects/filer/filer.py"" <pfaitems>";
Win11 Pro 223H2 Gerrman
Re: Project XYplorer on Linux: 15/03 New Video!
I think you may of missed this, thats the logic behind my suggestions:PeterH wrote: It seems the string itself must contain double quotes. The rule says: double quotes inside double quotes must be specified twice.
nerdweed wrote:1. PFA - If I start the path with / it appends the XY path before trying to open it. If I quote it the caption is lost. Would be great if there is some intelligence added to not add XY path if the path starts with / so that I don't need to quote them and caption issue gets auto resolved
Captions being lost when using double quotes without being contained in single quotes, I'm under the impression that it is behaving different than on Windows, although now that you mention it PeterH I don't think I was thinking clearly because Linux was involved, but you're right this is before it gets to the linux shell so it is completely XY syntax, so if it is actually the same as on Windows I would have done it like this:nerdweed wrote:Can you check on WIndows if the captions in PFA/POM are lost when you quote the path
Code: Select all
"Mover|<xy>" *;\ >::run """/usr/bin/python"" ""/home/naveed/xyassist.py"" ""/data/code/projects/filer/filer.py"" ""<curitem>""";
Re: Project XYplorer on Linux: 15/03 New Video!
My intention was just to modify the given which has the problem of not resolving <pfaitems> (as being in a single quoted string), to an equivalent string *with* substitution.
And I'm still convinced that the meaning of the outer quotes, and the rules for possibly doubling inner quotes, is just XY-syntax.
The necessity/meaning/interpretation of the inner quotes might well be linux-dependent. (And if the variable can contain spaces it should be quoted as the other sub-expressions, too.)
Code: Select all
"Mover|<xy>" *;\ >run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" <pfaitems>';
And I'm still convinced that the meaning of the outer quotes, and the rules for possibly doubling inner quotes, is just XY-syntax.
The necessity/meaning/interpretation of the inner quotes might well be linux-dependent. (And if the variable can contain spaces it should be quoted as the other sub-expressions, too.)
Win11 Pro 223H2 Gerrman
Re: Project XYplorer on Linux: 15/03 New Video!
Thanks. These two worked. I was double quoting the outer quotes rather than doubling the inner ones earlier.
Code: Select all
"Mover|xy" *;\>::run """/usr/bin/python"" ""/home/naveed/xyassist.py"" ""/data/code/projects/filer/filer.py"" <pfaitems>";
Code: Select all
"Mover|<xy>" *;\ >::run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" ' . quote(<pfaitems>);
Re: Project XYplorer on Linux: 15/03 New Video!
Does that top one work on files with spaces in their name though? I'd be surprised if either of them work on multiple items too.
Re: Project XYplorer on Linux: 15/03 New Video!
It does work with spaces and multiple items. Actually I changed the <pfaitems> to <selitems>. <pfaitems> gives | separated list which wasn't handled in the script. The assist script was also working with single item only and I had to change it to accomodate multiple files. I need to improve this further to work with both <pfaitems> and <selitems>
Code: Select all
#!/usr/bin/python
import os
import subprocess
import sys
class Assistant(object):
def __init__(self, wp=[], *args):
self.linux_path = []
#self.linux_path.append(str(len(wp)))
#if len(wp) == 2:
# self.windows_path = wp[1].split("|")
#else:
self.windows_path = wp
# extract the file name from full windows path
for p in self.windows_path:
filename = p.replace('\\', '/')
if filename.startswith('/') is False:
if filename[1] == ":" :
filename = filename[2:]
else:
filename = '/'.join([os.getcwd(), filename])
self.linux_path.append(filename)
def start(self):
subprocess.call(self.linux_path)
if __name__ == '__main__':
assistant = Assistant(sys.argv[1:])
assistant.start()
Re: Project XYplorer on Linux: 15/03 New Video!
That was the point I was trying to make, if it was an app not a script you were sending them to it was doubtful it would accept that format, and if you are just going to adapt the receiving app (a script in this case) to accept that format then yes, it would work. You also needed to change the variable, I wouldn't call that working as it was, at least you got it going though. You could also use a foreach and send the filenames 1 at a time so you didn't have to adapt the py script if you wanted.nerdweed wrote:Actually I changed the <pfaitems> to <selitems>. <pfaitems> gives | separated list which wasn't handled in the script.