On 23 April 2017 at 05:03, MRAB wrote:
> On 2017-04-22 23:30, Mikhail V wrote:
>>
>> On 20 April 2017 at 23:54, MRAB wrote:
>> > On 2017-04-20 22:03, Mikhail V wrote:
>> >>
>> >> On 20 April 2017 at 22:43, Random832 wrote:
>> >>> [snip]
>> >>>
>> >>> The best solution I can think of is to have a
On 2017-04-22 23:30, Mikhail V wrote:
On 20 April 2017 at 23:54, MRAB wrote:
> On 2017-04-20 22:03, Mikhail V wrote:
>>
>> On 20 April 2017 at 22:43, Random832 wrote:
>>> [snip]
>>>
>>> The best solution I can think of is to have a text editor designed to
>>> parse a string literal, spawn a nes
On Sun, Apr 23, 2017 at 12:30 PM, eryk sun wrote:
> The X terminals that I've used make it easy to copy text to the
> clipboard. For Windows, it's a pain prior to Windows 10 since the
> legacy console only does rectangular selection. The Windows 10 console
> does line-wrapped selection.
This is t
On Sun, Apr 23, 2017 at 2:06 AM, Mikhail V wrote:
>
> But are you joking, right? Even if it worked, how can this be convinient,
> e.g. in console one cannot even select and copy paste easily.
The X terminals that I've used make it easy to copy text to the
clipboard. For Windows, it's a pain prior
On Sun, Apr 23, 2017 at 12:06 PM, Mikhail V wrote:
> Don't know, all I see is "SyntaxError: invalid syntax" if I paste
> there some text.
> Try to paste e.g. this:
> "ffmpeg -i "D:\VIDEO\exp\intro.mp4" -vf "crop=1280:720:0:40,
> scale=640:360" -pix_fmt yuv420p "D:\ART\0MASTER_UMST\yt_pico.mp4""
On 23 April 2017 at 02:33, Chris Angelico wrote:
> On Sun, Apr 23, 2017 at 10:19 AM, Mikhail V wrote:
>> On 23 April 2017 at 00:48, Chris Angelico wrote:
>>> On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote:
The purpose is simple: reduce manual work to escape special
characters in str
On Sun, Apr 23, 2017 at 10:19 AM, Mikhail V wrote:
> On 23 April 2017 at 00:48, Chris Angelico wrote:
>> On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote:
>>> The purpose is simple: reduce manual work to escape special
>>> characters in string literals (and escape non-ASCII characters).
>>>
>>>
On 23 April 2017 at 00:48, Chris Angelico wrote:
> On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote:
>> The purpose is simple: reduce manual work to escape special
>> characters in string literals (and escape non-ASCII characters).
>>
>> Simple usage scenario:
>> - I have a long command-line stri
On Sun, Apr 23, 2017 at 8:30 AM, Mikhail V wrote:
> The purpose is simple: reduce manual work to escape special
> characters in string literals (and escape non-ASCII characters).
>
> Simple usage scenario:
> - I have a long command-line string in some text editor.
> - Copy this string and paste in
On 20 April 2017 at 23:54, MRAB wrote:
> On 2017-04-20 22:03, Mikhail V wrote:
>>
>> On 20 April 2017 at 22:43, Random832 wrote:
>>> [snip]
>>>
>>> The best solution I can think of is to have a text editor designed to
>>> parse a string literal, spawn a nested editor with the unescaped
>>> conten
On 2017-04-22 23:13, Mikhail V wrote:
> k = r"abc
> def"
>
> gives an error:
>
> k = r"abc
> ^
> SyntaxError: EOL while scanning string literal
>
> So one could define a rule, that a raw string *must*
> be terminated by the sequence quote + newline.
> In theory.
Though one
On Sun, Apr 23, 2017 at 7:13 AM, Mikhail V wrote:
> So one could define a rule, that a raw string *must*
> be terminated by the sequence quote + newline.
> In theory.
Then how would you pass one as a function parameter?
func(r""
)
Ugh. Ugly.
ChrisA
--
https://mail.python.org/mailman/listi
On 20 April 2017 at 18:40, Grant Edwards wrote:
> On 2017-04-20, Mikhail V wrote:
>> On 20 April 2017 at 17:59, Grant Edwards wrote:
>>> On 2017-04-20, Mikhail V wrote:
Quite often I need raw string literals for concatenating console commands.
I want to input them exactly as they are
Tim Chase writes:
> On 2017-04-21 08:23, Jussi Piitulainen wrote:
>> Tim Chase writes:
>>> Bash:
>>> cat <>> "single and double" with \ and /
>>> EOT
>>>
>>> PS: yes, bash's does interpolate strings, so you still need to do
>>> escaping within, but the arbitrary-user-specified-delimiter ide
On 2017-04-21 08:23, Jussi Piitulainen wrote:
> Tim Chase writes:
>> Bash:
>> cat <> "single and double" with \ and /
>> EOT
>>
>> PS: yes, bash's does interpolate strings, so you still need to do
>> escaping within, but the arbitrary-user-specified-delimiter idea
>> still holds.
>
> If you
Tim Chase writes:
> A number of tools use a custom quote-string:
>
> Bash:
>
> cat < "single and double" with \ and /
> EOT
[snip]
> PS: yes, bash's does interpolate strings, so you still need to do
> escaping within, but the arbitrary-user-specified-delimiter idea still
> holds.
If you p
On 2017-04-21 01:11, Tim Chase wrote:
On 2017-04-20 16:40, Grant Edwards wrote:
How can there exist a "universal solution" even in theory?
There has to be some sort of "end of literal" terminator character
sequence. That means there has to be some sort of escaping
mechanism when that "end of l
On 2017-04-20 16:40, Grant Edwards wrote:
> How can there exist a "universal solution" even in theory?
>
> There has to be some sort of "end of literal" terminator character
> sequence. That means there has to be some sort of escaping
> mechanism when that "end of literal" sequence appears in the
On 2017-04-20 22:03, Mikhail V wrote:
On 20 April 2017 at 22:43, Random832 wrote:
On Thu, Apr 20, 2017, at 16:01, Grant Edwards wrote:
On 2017-04-20, MRAB wrote:
> There _is_ a "universal solution"; it's called a Hollerith constant. :-)
Wow, I haven't seen one of those in a _long_ time -- pr
On Fri, Apr 21, 2017 at 7:37 AM, Stefan Ram wrote:
> Mikhail V writes:
>>But the less probable it is, the more complex or ugly would the tag
>>become.
>>E.g. curly braces {} seems to be much less frequent characters
>>for filenames and command line arguments.
>
> When one uses brackets to delim
On 20 April 2017 at 22:43, Random832 wrote:
> On Thu, Apr 20, 2017, at 16:01, Grant Edwards wrote:
>> On 2017-04-20, MRAB wrote:
>> > There _is_ a "universal solution"; it's called a Hollerith constant. :-)
>>
>> Wow, I haven't seen one of those in a _long_ time -- probably about 45
>> years. I
On 20 April 2017 at 19:27, Chris Angelico wrote:
> On Fri, Apr 21, 2017 at 2:26 AM, wrote:
>> I find this:-
>>
>> s = r"ffmpeg -i '\\server-01\D\SER_Bigl.mpg' "
>>
>> vastly superior.
>
> It's semantically different though. I don't know whether single quotes
> are valid in that context, on Wind
On Thu, Apr 20, 2017, at 16:01, Grant Edwards wrote:
> On 2017-04-20, MRAB wrote:
> > There _is_ a "universal solution"; it's called a Hollerith constant. :-)
>
> Wow, I haven't seen one of those in a _long_ time -- probably about 45
> years. I think the first FORTAN implementation I used was WA
On 2017-04-20, MRAB wrote:
> On 2017-04-20 17:40, Grant Edwards wrote:
>
>> There has to be some sort of "end of literal" terminator character
>> sequence. That means there has to be some sort of escaping mechanism
>> when that "end of literal" sequence appears in the literal itself.
>>
> There
On 2017-04-20 17:40, Grant Edwards wrote:
On 2017-04-20, Mikhail V wrote:
On 20 April 2017 at 17:59, Grant Edwards wrote:
On 2017-04-20, Mikhail V wrote:
Quite often I need raw string literals for concatenating console commands.
I want to input them exactly as they are in python sources.
T
No escaping is not something possible, in your suggested syntax ") is
ambigous. E.g. raw("abcd")") is ambigous.
Any sequence delimited string involves escaping, the only thing that
wouldnt would be size-defined strings but they are impractical.
Le 20/04/2017 à 18:03, Mikhail V a écrit :
On 2
On Thu, Apr 20, 2017 at 5:27 PM, Chris Angelico wrote:
> On Fri, Apr 21, 2017 at 2:26 AM, wrote:
>> I find this:-
>>
>> s = r"ffmpeg -i '\\server-01\D\SER_Bigl.mpg' "
>>
>> vastly superior.
>
> It's semantically different though. I don't know whether single quotes
> are valid in that context, o
On Fri, Apr 21, 2017 at 2:26 AM, wrote:
> I find this:-
>
> s = r"ffmpeg -i '\\server-01\D\SER_Bigl.mpg' "
>
> vastly superior.
It's semantically different though. I don't know whether single quotes
are valid in that context, on Windows.
ChrisA
--
https://mail.python.org/mailman/listinfo/pyth
On Thursday, April 20, 2017 at 4:59:48 PM UTC+1, Grant Edwards wrote:
> On 2017-04-20, Mikhail V wrote:
> > Quite often I need raw string literals for concatenating console commands.
> > I want to input them exactly as they are in python sources.
> >
> > There is r"" string, but it is obviously not
On 2017-04-20, Mikhail V wrote:
> On 20 April 2017 at 17:44, Mikhail V wrote:
>> Quite often I need raw string literals for concatenating console commands.
>> I want to input them exactly as they are in python sources.
>>
>> There is r"" string, but it is obviously not enough because e.g. this:
>
On 2017-04-20, Mikhail V wrote:
> On 20 April 2017 at 17:59, Grant Edwards wrote:
>> On 2017-04-20, Mikhail V wrote:
>>> Quite often I need raw string literals for concatenating console commands.
>>> I want to input them exactly as they are in python sources.
>>>
>>> There is r"" string, but it
On Fri, Apr 21, 2017 at 2:16 AM, Mikhail V wrote:
> On 20 April 2017 at 17:59, Grant Edwards wrote:
>> On 2017-04-20, Mikhail V wrote:
>>> Quite often I need raw string literals for concatenating console commands.
>>> I want to input them exactly as they are in python sources.
>>>
>>> There is r
On 20 April 2017 at 17:59, Grant Edwards wrote:
> On 2017-04-20, Mikhail V wrote:
>> Quite often I need raw string literals for concatenating console commands.
>> I want to input them exactly as they are in python sources.
>>
>> There is r"" string, but it is obviously not enough because e.g. thi
On Fri, Apr 21, 2017 at 2:03 AM, Mikhail V wrote:
> On 20 April 2017 at 17:55, Chris Angelico wrote:
>> On Fri, Apr 21, 2017 at 1:44 AM, Mikhail V wrote:
>>> What I think: why there is no some built-in function, for example like:
>>> s = raw("ffmpeg -i "\\server-01\D\SER_Bigl__"")
>>>
>>> which
On 20 April 2017 at 17:55, Chris Angelico wrote:
> On Fri, Apr 21, 2017 at 1:44 AM, Mikhail V wrote:
>> What I think: why there is no some built-in function, for example like:
>> s = raw("ffmpeg -i "\\server-01\D\SER_Bigl__"")
>>
>> which would just need *one* quote sign in the beginning and on
On 2017-04-20, Mikhail V wrote:
> Quite often I need raw string literals for concatenating console commands.
> I want to input them exactly as they are in python sources.
>
> There is r"" string, but it is obviously not enough because e.g. this:
> s = r"ffmpeg -i "\\server-01\D\SER_Bigl.mpg" "
On 20 April 2017 at 17:44, Mikhail V wrote:
> Quite often I need raw string literals for concatenating console commands.
> I want to input them exactly as they are in python sources.
>
> There is r"" string, but it is obviously not enough because e.g. this:
> s = r"ffmpeg -i "\\server-01\D\SER_Bi
On Fri, Apr 21, 2017 at 1:44 AM, Mikhail V wrote:
> What I think: why there is no some built-in function, for example like:
> s = raw("ffmpeg -i "\\server-01\D\SER_Bigl__"")
>
> which would just need *one* quote sign in the beginning and on the end.
> Would it be useful, what do you think? I thin
Quite often I need raw string literals for concatenating console commands.
I want to input them exactly as they are in python sources.
There is r"" string, but it is obviously not enough because e.g. this:
s = r"ffmpeg -i "\\server-01\D\SER_Bigl.mpg" "
is not valid.
The closest I've found is tr
39 matches
Mail list logo