Page 1 of 1

copy Unix path

Posted: 07 Jul 2011, 20:49
by cpb
Copy Unix path + file as text. EG:
\\yourdomain\yourdir\afile.ext
is copied as:
/yourdomain/yourdir/afile.ext

Re: copy Unix path

Posted: 08 Jul 2011, 08:26
by therube
(OT, but "Upload attachment". It never dawned on me that the board even allowed that.)

So what is this a RFE?

Re: copy Unix path

Posted: 08 Jul 2011, 17:31
by Ether
therube wrote:(OT, but "Upload attachment". It never dawned on me that the board even allowed that.)
And I wondered why you used tinypic.
therube wrote:So what is this a RFE?
Guessing from the forum chosen for this post, yes. :D

@cbp, I'm not entirely sure what are the rules for creating such a "UNIX" path. Is it just UNC with backslashes replaced by forward slashes and without the doubled slash at the beginning? Could you tell us where you use such paths? (I don't recall any programs that would use such paths - maybe it's just a lack of knowledge on my side.)

Re: copy Unix path

Posted: 15 Jul 2011, 21:00
by therube
And I wondered why you used tinypic.
I'm so used to NOT being able to post pics directly through a board, never occurred to me on this board.
Guessing from the forum chosen for this post, yes.
Heh. Missed that too.
I virtually always use the 'View active topics', so I totally disregard what particular forum a post is in (unless I'm actually going to start a thread).

Re: copy Unix path

Posted: 10 Aug 2011, 23:44
by cpb
I often need to send paths to colleagues who work on osx or linux.

Re: copy Unix path

Posted: 11 Aug 2011, 13:41
by Ether
Ether wrote:@cbp, I'm not entirely sure what are the rules for creating such a "UNIX" path. Is it just UNC with backslashes replaced by forward slashes and without the doubled slash at the beginning?
Please specify the way for creating UNIX paths in more detail.

Re: copy Unix path

Posted: 07 Oct 2011, 10:40
by frax
+1 for me!

I would love to be able to paste paths into a python prompt for instance. or into the cygwin console (bash).

Re: copy Unix path

Posted: 08 Oct 2011, 13:57
by SvA
To build a useful unix path, Salamander needed to know where the file system is mounted. How could it possibly know this?

Re: copy Unix path

Posted: 11 Oct 2011, 09:13
by frax
for python, one just need to replace the slashes, from backward slashes to forward slashes

Re: copy Unix path

Posted: 11 Oct 2011, 10:52
by Ether
frax wrote:for python, one just need to replace the slashes, from backwardslashes to forward slashes
Well, that's not very UNIX-like. Actually, I know only one program that needs addresses like that and it's not Python(*)(**).

*) It's Apache HTTPD (and that's only because it's mentioned in the comments and I've never tried writing it with backslashes).
**) Python can process backslashes without problems, you just need to escape them correctly or use raw strings.

Re: copy Unix path

Posted: 26 Dec 2011, 16:23
by therube
This may help with both the mentioned Unix & Cygwin paths, copy Unix path.