Re: How to change '\\' to '\'

2018-10-01 Thread Alister ware via Python-list
On Sun, 30 Sep 2018 17:45:52 -0700, Rick Johnson wrote:

> Jach Fong wrote:
>> I get a string item, for example path[0], from path =
>> os.get_exec_path()
>> It's something like "\\Borland\\Bcc55\\Include", a Python string.
>> I want to use this "string" in a subprocess command as a parameter.
>> Obviously this command can only recognize "\Borland\Bcc55\Include".
>> I know there must have an easy way to convert it, but just can't figure
>> it out :-(
> 
> I would suggest substituting all backslashes with forward slashes, that
> way, the printed version and the internal escaped version won't be
> confusing to you. And besides, which is easier to read?
> 
> This?
> 
>   "\\Borland\\Bcc55\\Include"
> 
> Or this?
> 
>   "/Borland/Bcc55/Include"
> 
> ???
> 
> 

Practicality Beats Purity




-- 
沾衣欲湿杏花雨,吹面不寒杨柳风。
-- 志南《绝句》
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread Jach Fong

Hmmm...strange, I didn't see Rick's mail:-(

Sure the forward slash is better, not to cause this confusion.
But I am curious, since when, I mean, since which version
Windows start to accept forward slash?

--Jach

Alister ware via Python-list at 2018/10/1 PM 04:15 wrote:

On Sun, 30 Sep 2018 17:45:52 -0700, Rick Johnson wrote:


Jach Fong wrote:

I get a string item, for example path[0], from path =
os.get_exec_path()
It's something like "\\Borland\\Bcc55\\Include", a Python string.
I want to use this "string" in a subprocess command as a parameter.
Obviously this command can only recognize "\Borland\Bcc55\Include".
I know there must have an easy way to convert it, but just can't figure
it out :-(


I would suggest substituting all backslashes with forward slashes, that
way, the printed version and the internal escaped version won't be
confusing to you. And besides, which is easier to read?

This?

   "\\Borland\\Bcc55\\Include"

Or this?

   "/Borland/Bcc55/Include"

???




Practicality Beats Purity






---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread Thomas Jollans
On 2018-10-01 11:19, Jach Fong wrote:
> Hmmm...strange, I didn't see Rick's mail:-(

That's because he's banned from the list, but still around on the newsgroup

> Sure the forward slash is better, not to cause this confusion.
> But I am curious, since when, I mean, since which version
> Windows start to accept forward slash?

Windows has always supported forward slashes in most contexts for
compatibility with UNIX software. (just not in cmd.exe IIRC)

> 
> --Jach
> 
> Alister ware via Python-list at 2018/10/1 PM 04:15 wrote:
>> On Sun, 30 Sep 2018 17:45:52 -0700, Rick Johnson wrote:
>>
>>> Jach Fong wrote:
 I get a string item, for example path[0], from path =
 os.get_exec_path()
 It's something like "\\Borland\\Bcc55\\Include", a Python string.
 I want to use this "string" in a subprocess command as a parameter.
 Obviously this command can only recognize "\Borland\Bcc55\Include".
 I know there must have an easy way to convert it, but just can't figure
 it out :-(
>>>
>>> I would suggest substituting all backslashes with forward slashes, that
>>> way, the printed version and the internal escaped version won't be
>>> confusing to you. And besides, which is easier to read?
>>>
>>> This?
>>>
>>>    "\\Borland\\Bcc55\\Include"
>>>
>>> Or this?
>>>
>>>    "/Borland/Bcc55/Include"
>>>
>>> ???
>>>
>>> 
>>
>> Practicality Beats Purity
>>
>>
>>
>>
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> 


-- 
Thomas Jollans

m ☎ +31 (6) 42630259
e ✉ t...@tjol.eu
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread Peter J. Holzer
On 2018-10-01 17:19:25 +0800, Jach Fong wrote:
> Sure the forward slash is better, not to cause this confusion.
> But I am curious, since when, I mean, since which version
> Windows start to accept forward slash?

Since MS-DOS 2.0, i.e., before Windows even existed. Note that this is
only true for system call paraeters[1], not for command line parameters. 

So for your use case:

> > > > I want to use this "string" in a subprocess command as a parameter.

you probably need to use backslashes, not forward slashes (it depends on
the program you are calling).

hp

[1] And even there not always, as I've learned from the resident Windows
expert on this list.

-- 
   _  | Peter J. Holzer| we build much bigger, better disasters now
|_|_) || because we have much more sophisticated
| |   | h...@hjp.at | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson 


signature.asc
Description: PGP signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Mark Lawrence

On 30/09/18 17:30, Steven D'Aprano wrote:

I've been unexpectedly in hospital for the past two weeks, without
internet or email. Just before my unexpected hospital stay, I was
apparently banned (without warning) by Ethan Furman in what seems to me
to be an act of retaliation for my protest against his overzealous and
hostile tone-policing against a newcomer to the list, Reto Brunner:

https://mail.python.org/pipermail/python-list/2018-September/737020.html

(I did make one mistake in that post: I claimed that I hadn't said
anything at the time on Ethan's last round of bans. That was incorrect, I
actually did make an objection at the time.)

Since I'm still catching up on emails, I have just come across Ethan's
notice to me (copied below).

Notwithstanding Ethan's comment about having posted the suspension notice
on the list, I see no sign that he actually did so. At the risk of
further retaliation from the moderators, I am ignoring the ban in this
instance for the purposes of transparency and openness. (I don't know if
this will show up on the mailing list or the newsgroup.)

Since I believe this ban is illegitimate, I intend to challenge it if
possible. In the meantime, I may not reply on-list to any responses.



Subject: Fwd: Temporary Suspension
To: 
From: Ethan Furman 
Date: Tue, 11 Sep 2018 11:22:40 -0700
In-Reply-To: 

Steven, you've probably already seen this on Python List, but I forgot
to email it directly to you.  My apologies.

--
~Ethan~
Python List Moderator


 Forwarded Message 
Subject: Temporary Suspension
Date: Mon, 10 Sep 2018 07:09:04 -0700
From: Ethan Furman 
To: Python List Moderators 

As a list moderator, my goal for this list is to keep the list a useful
resource -- but what does "useful" mean?  To me it means a place that
python users can go to ask questions, get answers, offer advice, and all
without sarcasm, name-calling, and deliberate mis-understandings.
Conversations should stay mostly on-topic.

Due to hostile and inappropriate posts*, Steven D'Aprano is temporarily
suspended from Python List for a period of two months.

This suspension, along with past suspensions, is being taken only after
careful consideration and consultation with other Python moderators.

--
~Ethan~
Python List Moderator


* posts in question:

[1] https://mail.python.org/pipermail/python-list/2018-July/735735.html
[2] https://mail.python.org/pipermail/python-list/2018-September/737020.html



Personally I think Ethan Furman should be removed from his position as a 
moderator as he's less than useless at the job.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-10-01 Thread Ian Kelly
On Wed, Sep 26, 2018 at 3:18 PM Chris Angelico  wrote:
>
> On Thu, Sep 27, 2018 at 7:05 AM Ian Kelly  wrote:
> >
> > You're objecting to people trying to do *something* positive on the
> > grounds that they're not doing *more* while you yourself are doing
> > *nothing*. That's pretty hypocritical.
>
> You're assuming that it's something positive that's being done. That
> is an unproven assertion. I'm objecting to people creating churn on
> the grounds that they're not accomplishing anything.

The goal is promoting respect and dignity within the workplace, and
more generally within our field. If you can't see how this advances
that, then I have nothing further to say. You might ask yourself,
though: why are you so invested in this that you would not only refuse
to change anything yourself, but also would throw up a resistance when
others try to make a simple documentation rewording?

One other thing. This is difficult for me to respond to, but I feel it
has to be done:

> Actually, if a human slave is being treated as someone who has no
> will, no autonomy, no power to choose anything, s/he IS being treated
> as a computer, and my point is to highlight that. Think about how you
> treat your computers - you have the power to discard them if they do
> not work correctly, or even if you just want to get a newer one. You
> have the power to kick them across the room and nobody will arrest
> you. Maybe you don't do those things (I would hope you don't kick
> computers around), but the computer has no say in that. Am I
> trivializing slavery? Or am I using a descriptive term that is
> actually more accurate than you dare acknowledge?

Yes, you can kick your computer across the room if it's not working.
The difference with a computer is that you don't have to; computers
are never willfully disobedient. Computers never have to be "broken"
in order to have value. Computers also don't have feelings or
experience pain. You can't punish a defiant computer by whipping it,
or starving it, or preventing it from sleeping, or making it sit in
its own waste. You can't punish it by separating it from its family or
keeping it in total isolation. You can't even just sell its family to
another computer-owner without even considering how it will feel about
that. You can't force a computer to adopt your own religion. You can't
lie to your computer in order to manipulate it. You can't make it a
promise of freedom that you know you will never keep.

If you think that a slave just means somebody who has no choice but to
do what they're told, then yes, I think that you're trivializing the
condition of slavery, and by comparing the victim to a simple object
like a computer, the very language that you're choosing is
dehumanizing.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT] master/slave debate in Python

2018-10-01 Thread Ethan Furman

This thread is closed.

--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


regex string matching python3

2018-10-01 Thread nanman3012
I have a string like this: 

b'\tC:94.3%[S:89.9%,D:4.4%],F:1.7%,M:4.0%,n:1440\n'

And I would like to  extract the numbers corresponding to S,D,F and M in this 
string and convert them into an array like this: 

[ '89.9', '4.4', '1.7', '4.0']

Any help would be appreciated! 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Ethan Furman

On 09/30/2018 09:30 AM, Steven D'Aprano wrote:


Notwithstanding Ethan's comment about having posted the suspension notice
on the list, I see no sign that he actually did so.


My apologies to you and the list.  I did indeed only send the notice to 
the other moderators.


Contrary to what you and others may believe, banning/suspending people 
is not a gleeful, stress-free activity.  None of us like to do it.  Also 
contrary to what you and others seem to believe, I did not make those 
decisions by myself.


As far as challenging the ban, I think the first step would be talking 
to the CoC working group:


  conduct-wg at python.org

If you don't like that answer, the next (and final, as far as I'm aware) 
stop would be the PSF.


I have updated the filter that should be catching your posts, so 
hopefully the suspension is now working properly.  Since you did choose 
to ignore the ban, the two-month period restarts now.


--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Chris Angelico
On Tue, Oct 2, 2018 at 3:49 AM Mark Lawrence  wrote:
>
> Personally I think Ethan Furman should be removed from his position as a
> moderator as he's less than useless at the job.

If you mean how he sent an email to the mods instead of to the list,
that's a simple administrative error that anyone could make (and I
have myself made similar errors - sending Python emails to a Gilbert &
Sullivan list, and vice versa). If you mean the decision to put Steve
on moderation, that was not Ethan's decision alone.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread jkn
On Monday, October 1, 2018 at 6:57:30 PM UTC+1, Ethan Furman wrote:
> On 09/30/2018 09:30 AM, Steven D'Aprano wrote:
> 
> > Notwithstanding Ethan's comment about having posted the suspension notice
> > on the list, I see no sign that he actually did so.
> 
> My apologies to you and the list.  I did indeed only send the notice to 
> the other moderators.
> 
> Contrary to what you and others may believe, banning/suspending people 
> is not a gleeful, stress-free activity.  None of us like to do it.  Also 
> contrary to what you and others seem to believe, I did not make those 
> decisions by myself.
> 
> As far as challenging the ban, I think the first step would be talking 
> to the CoC working group:
> 
>conduct-wg at python.org
> 
> If you don't like that answer, the next (and final, as far as I'm aware) 
> stop would be the PSF.
> 
> I have updated the filter that should be catching your posts, so 
> hopefully the suspension is now working properly.  Since you did choose 
> to ignore the ban, the two-month period restarts now.
> 
> --
> ~Ethan~
> Python List Moderator

As a reader of /occasional contributor to, this newsgroup (via GG, admittedly)
since around the year 2000, I for one am mightily unimpressed with this.
There's a lot of heavy-handedness going around.

And then ... you make a mistake, and then restart the ban?? Sheesh, where has
happened to the the grown-up behaviour that c.l.python has always had?
That has been one of its hallmarks for the past nearly twenty years.

I'm not going to go as far as to agree with anything RR says on the matter - 
but c'mon guys, lighten up.

Jon N 


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Mark Lawrence

On 01/10/18 19:05, Chris Angelico wrote:

On Tue, Oct 2, 2018 at 3:49 AM Mark Lawrence  wrote:


Personally I think Ethan Furman should be removed from his position as a
moderator as he's less than useless at the job.


If you mean how he sent an email to the mods instead of to the list,
that's a simple administrative error that anyone could make (and I
have myself made similar errors - sending Python emails to a Gilbert &
Sullivan list, and vice versa). If you mean the decision to put Steve
on moderation, that was not Ethan's decision alone.

ChrisA



I mean that I have always thought that Ethan Furman was useless as a 
moderator.  Having said that with this latest disgraceful decision 
regarding Steven I believe all moderators should stand down as they all 
appear to be clueless, especially I don't recall getting asked who I 
wanted in the job.  If their defence is that they're applying the CoC to 
the letter then that should be rewritten be back the people who have in 
the long term supported Python, not the lazy, bone idle types who 
provide no data, no code, no nothing when asking their question, and the 
well known trolls who get away with blue murder who months or even years 
before they get kicked into touch.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: regex string matching python3

2018-10-01 Thread MRAB

On 2018-10-01 18:49, nanman3...@gmail.com wrote:

I have a string like this:

b'\tC:94.3%[S:89.9%,D:4.4%],F:1.7%,M:4.0%,n:1440\n'

And I would like to  extract the numbers corresponding to S,D,F and M in this 
string and convert them into an array like this:

[ '89.9', '4.4', '1.7', '4.0']

Any help would be appreciated!


Try this:

re.findall(r'\b[SDFM]:(\d+\.\d+)', data.decode('ascii'))
--
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Roel Schroeven

jkn schreef op 1/10/2018 om 20:25:

On Monday, October 1, 2018 at 6:57:30 PM UTC+1, Ethan Furman wrote:

On 09/30/2018 09:30 AM, Steven D'Aprano wrote:


Notwithstanding Ethan's comment about having posted the suspension notice
on the list, I see no sign that he actually did so.


My apologies to you and the list.  I did indeed only send the notice to
the other moderators.

I have updated the filter that should be catching your posts, so
hopefully the suspension is now working properly.  Since you did choose
to ignore the ban, the two-month period restarts now.



As a reader of /occasional contributor to, this newsgroup (via GG, admittedly)
since around the year 2000, I for one am mightily unimpressed with this.
There's a lot of heavy-handedness going around.

And then ... you make a mistake, and then restart the ban?? Sheesh, where has
happened to the the grown-up behaviour that c.l.python has always had?
That has been one of its hallmarks for the past nearly twenty years.

I'm not going to go as far as to agree with anything RR says on the matter -
but c'mon guys, lighten up.


Yeah I don't understand this neither.

I'm not very active here, but I've been lurking for years. In my eyes 
Steven has always been active and helpful. Now he has *once* been a 
*tiny bit* rude, and he's banned for that?


As far as I can see the moderators do a pretty good job overall, but 
this decision is ... weird.



--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones

Roel Schroeven

--
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Fetchinson . via Python-list
On 10/1/18, Roel Schroeven  wrote:
> jkn schreef op 1/10/2018 om 20:25:
>> On Monday, October 1, 2018 at 6:57:30 PM UTC+1, Ethan Furman wrote:
>>> On 09/30/2018 09:30 AM, Steven D'Aprano wrote:
>>>
 Notwithstanding Ethan's comment about having posted the suspension
 notice
 on the list, I see no sign that he actually did so.
>>>
>>> My apologies to you and the list.  I did indeed only send the notice to
>>> the other moderators.
>>>
>>> I have updated the filter that should be catching your posts, so
>>> hopefully the suspension is now working properly.  Since you did choose
>>> to ignore the ban, the two-month period restarts now.
>>>
>>
>> As a reader of /occasional contributor to, this newsgroup (via GG,
>> admittedly)
>> since around the year 2000, I for one am mightily unimpressed with this.
>> There's a lot of heavy-handedness going around.
>>
>> And then ... you make a mistake, and then restart the ban?? Sheesh, where
>> has
>> happened to the the grown-up behaviour that c.l.python has always had?
>> That has been one of its hallmarks for the past nearly twenty years.
>>
>> I'm not going to go as far as to agree with anything RR says on the matter
>> -
>> but c'mon guys, lighten up.
>
> Yeah I don't understand this neither.
>
> I'm not very active here, but I've been lurking for years. In my eyes
> Steven has always been active and helpful. Now he has *once* been a
> *tiny bit* rude, and he's banned for that?
>
> As far as I can see the moderators do a pretty good job overall, but
> this decision is ... weird.

+1

Steven has been around for a long time, after a quick search it seems
for at least 15 years, I mean on python-list. He has consistently been
helpful and has dedicated an amazing number of man hours to altruistic
help of fellow python users, beginners, experts, etc.

I'm totally amazed by this decision to ban him. The official
explanation has referenced 2 potentially mildly problematic posts.

I guess the moderators do have and should have the power to ban people
but we all have the right to criticise these bans on a case by case
basis. I'm not implying that Ethan and the moderators who were
involved in the ban are doing a bad job in general, but in this
particular case it does seem hyper excessive.

Cheers,
Daniel

-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread mm0fmf

On 01/10/2018 10:19, Jach Fong wrote:

Hmmm...strange, I didn't see Rick's mail:-(

Sure the forward slash is better, not to cause this confusion.
But I am curious, since when, I mean, since which version
Windows start to accept forward slash?



First, stop top posting.

Second, ISTR that all Windows NT versions and versions derived from the 
NT codebase support forward slash in pathnames given to functions. It 
may go back further, but anything derived from NT works.  I can't 
remember which Windows command shells support it, probably PowerShell does.


--
https://mail.python.org/mailman/listinfo/python-list


Re: regex string matching python3

2018-10-01 Thread Brian J. Oney via Python-list
On Mon, 2018-10-01 at 10:49 -0700, nanman3...@gmail.com wrote:
> I have a string like this: 
> 
> b'\tC:94.3%[S:89.9%,D:4.4%],F:1.7%,M:4.0%,n:1440\n'
> 
> And I would like to  extract the numbers corresponding to S,D,F and M in this 
> string and convert them into an array like this: 
> 
> [ '89.9', '4.4', '1.7', '4.0']
> 
> Any help would be appreciated! 
Hi there,

import re

s = b'\tC:94.3%[S:89.9%,D:4.4%],F:1.7%,M:4.0%,n:1440\n'

pattern = re.compile('S:([0-9.]+)%,D:([0-9.]+)%\],F:([0-9.]+)%,M:([0-9.]+)')

stuff = [x for x in re.findall(pattern, s)[0]]

You may consider just getting everthing out of your string and then munging it 
to what ever you like.

I mean:

pattern = re.compile('([A-Za-z]):([0-9.]+)')
{x: float(y) for x, y in re.findall(pattern, s)


Then you could read what ever and put it in a handy format wherein it is clear 
what it was. I mean:

stuff = []
for s in iostream:
stuff.append({x: float(y) for x, y in re.findall(pattern, s)})


HTH
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: So apparently I've been banned from this list

2018-10-01 Thread Jon Ribbens
On 2018-10-01, Roel Schroeven  wrote:
> I'm not very active here, but I've been lurking for years. In my eyes 
> Steven has always been active and helpful. Now he has *once* been a 
> *tiny bit* rude, and he's banned for that?

It's not "once", it's a long-standing pattern of behaviour.

> As far as I can see the moderators do a pretty good job overall, but 
> this decision is ... weird.

It's not "weird" so much as it is "long overdue", but even I would say
that two months seems a little excessive.
-- 
https://mail.python.org/mailman/listinfo/python-list


This thread is closed (was: [OT] master/slave debate in Python)

2018-10-01 Thread Ben Finney
Ethan Furman  writes:

> This thread is closed.

Coming from a moderator of this forum, I don't know how that statement
is to be interpreted.

Is that a statement that it is *impossible* (mechanically) to post
replies in this thread? Across the different technologies that propogate
this forum?

If not impossible, is that a statement that it is *strictly prohibited*,
by a forum moderator, to post replies in this thread?

If prohibited, what are we to expect are the consequences of breaching
that prohibition, knowingly or unknowingly?

How is any of the above affected by posting in the same thread but on a
different metter, as I have done?

How is any of the above affected by changing the Subject field, as I
have done?

If there is some specific formal meaning to the above statement, I don't
know where it's documented. If it's not a specific formal statement,
that is itself troubling, because it's not clear what would constitute a
violation nor what the consequences are.

Ethan, I thank you for doing the fraught work of a moderator of this
forum. Hopefully we can get clarity on this and future thread-closing
actions, separate from the thread which prompted this instance.

-- 
 \ “Truth would quickly cease to become stranger than fiction, |
  `\ once we got as used to it.” —Henry L. Mencken |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: This thread is closed [an actual new thread]

2018-10-01 Thread Ethan Furman

On 10/01/2018 04:26 PM, Ben Finney wrote:
> Ethan Furman writes:

>> This thread is closed.
>
> Coming from a moderator of this forum, I don't know how that statement
> is to be interpreted.

It should be interpreted as:

- No further discussion should take place on this thread.
- I've done what I can with the primitive tools at hand to block
  any further discussion.
- Continued considerate posts will be discarded.
- Continued flame-bait/inconsiderate posts will be met with warnings
  or stronger as warranted.

> Is that a statement that it is *impossible* (mechanically) to post
> replies in this thread? Across the different technologies that
> propogate this forum?

Not impossible, no.

> If not impossible, is that a statement that it is *strictly 
prohibited*, by a forum moderator, to post replies in this thread?


If one tries to get around moderators' efforts to shut down a thread we 
will interpret that harshly.


> If prohibited, what are we to expect are the consequences of breaching
> that prohibition, knowingly or unknowingly?

Two factors come into play:
1) do we think the post was done knowingly or unknowingly; and
2) the content of the post.

> How is any of the above affected by posting in the same thread but on
> a different matter, as I have done?

At this point the blocks are entirely based on subject lines (like I 
said, primitive).  If the new subject line still matches the relevant 
regex, then it will get held and we will decide what to do with it (I 
allowed this one as it had good questions -- in general, just start a 
new thread if the subject is different, as I did in this reply).


> How is any of the above affected by changing the Subject field, as I
> have done?

If the subject is different enough it will get by the block.  If the 
content is still on the old subject we will consider that as willfully 
ignoring the thread closure.


> If there is some specific formal meaning to the above statement, I
> don't know where it's documented. If it's not a specific formal
> statement, that is itself troubling, because it's not clear what would
> constitute a violation nor what the consequences are.

Consider it now documented, at least on Python List.  I imagine Python 
Ideas may also implement this framework (assuming we stay on Mail Man 
and don't migrate to some web-based forum).


> Ethan, I thank you for doing the fraught work of a moderator of this
> forum. Hopefully we can get clarity on this and future thread-closing
> actions, separate from the thread which prompted this instance.

Let me know if anything is still unclear.

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


How to achieve pyc only deployment for module in python3.6

2018-10-01 Thread Chandana Pattanayak
Hi,

I have a requirement to provide basic code protection for a module in our
product suite. With python 3.6 the .pyc files are created under pycache ,
so if i remove the py file the module is not found anymore.

Thank you,
Chandana
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread Jach Fong

Thanks for your info about how Windows supports the forward slash.

I don't quit sure what is the meaning of "top posting" in your mail.
If its meaning (forgive me if I was wrong) is where the reply was put
in mail, I have reason of standing on the opposite side.

It was supposed that most discussant want to see the reply message
instantly when they open the mail. They already know what is going on
and no need to pass through all those previous message. "top posting"
seems more reasonable to me:-)

--Jach

mm0fmf at 2018/10/2 AM 05:05 wrote:

On 01/10/2018 10:19, Jach Fong wrote:

Hmmm...strange, I didn't see Rick's mail:-(

Sure the forward slash is better, not to cause this confusion.
But I am curious, since when, I mean, since which version
Windows start to accept forward slash?



First, stop top posting.

Second, ISTR that all Windows NT versions and versions derived from the 
NT codebase support forward slash in pathnames given to functions. It 
may go back further, but anything derived from NT works.  I can't 
remember which Windows command shells support it, probably PowerShell does.




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread William Ray Wing via Python-list


> On Oct 1, 2018, at 10:17 PM, Jach Fong  wrote:
> 
> Thanks for your info about how Windows supports the forward slash.
> 
> I don't quit sure what is the meaning of "top posting" in your mail.
> If its meaning (forgive me if I was wrong) is where the reply was put
> in mail, I have reason of standing on the opposite side.
> 

Yes, exactly correct 

> It was supposed that most discussant want to see the reply message
> instantly when they open the mail. They already know what is going on
> and no need to pass through all those previous message. "top posting"
> seems more reasonable to me:-)
> 

The problem is that it is comparatively rare for there to be a singleton Q and 
immediate A.  Even seemingly simple questions frequently trigger fairly long 
discussions, which assume familiarity with the earlier discussion. AND this 
list is pretty much the place of record for people researching python IFAQs 
(infrequently asked questions). So, six months from now a Google search that 
turns up a relevant thread will make sense only if it can be read as in-lined 
comments like this. 

> --Jach
> 
> mm0fmf at 2018/10/2 AM 05:05 wrote:
>>> On 01/10/2018 10:19, Jach Fong wrote:
>>> Hmmm...strange, I didn't see Rick's mail:-(
>>> 
>>> Sure the forward slash is better, not to cause this confusion.
>>> But I am curious, since when, I mean, since which version
>>> Windows start to accept forward slash?
>>> 
>> First, stop top posting.
>> Second, ISTR that all Windows NT versions and versions derived from the NT 
>> codebase support forward slash in pathnames given to functions. It may go 
>> back further, but anything derived from NT works.  I can't remember which 
>> Windows command shells support it, probably PowerShell does.
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to achieve pyc only deployment for module in python3.6

2018-10-01 Thread dieter
Chandana Pattanayak  writes:

> I have a requirement to provide basic code protection for a module in our
> product suite. With python 3.6 the .pyc files are created under pycache ,
> so if i remove the py file the module is not found anymore.

One approach could be to define and register your own
import hook, similar to the "zipimporter".
Such import hooks allow to find modules in non standard places,
such as in a zip archive.
Of course, you would need to implement the import hook in
a standard place (accessible with the standard Python import mechanism).

Another approach could be, that you move the created "*.pyc" files
to standard import places for deployment.


Note that you can disassemble "*.pyc" files and gain
quite some insight by this. Thus, the protection provided
by not deploying the source files is basic indeed.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to achieve pyc only deployment for module in python3.6

2018-10-01 Thread Chris Angelico
On Tue, Oct 2, 2018 at 12:01 PM Chandana Pattanayak
 wrote:
>
> Hi,
>
> I have a requirement to provide basic code protection for a module in our
> product suite. With python 3.6 the .pyc files are created under pycache ,
> so if i remove the py file the module is not found anymore.

If you want code protection, the ONLY reliable way to do it is to not
provide the code *at all*, in any form. That generally means hosting
your application on some sort of server and granting access that way
(eg through a web browser interface). Shipping only .pyc files does
not protect your code - it merely obscures it a little.

I suggest changing the requirement. Otherwise, you're running a huge
risk that someone will decompile your pyc files, word will get back to
your company, and you'll get in trouble for having deceived people
into thinking that the code was protected when it actually wasn't.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to achieve pyc only deployment for module in python3.6

2018-10-01 Thread dieter
dieter  writes:
> Chandana Pattanayak  writes:
>> I have a requirement to provide basic code protection for a module in our
>> product suite. With python 3.6 the .pyc files are created under pycache ,
>> so if i remove the py file the module is not found anymore.
> ...
> Note that you can disassemble "*.pyc" files and gain
> quite some insight by this. Thus, the protection provided
> by not deploying the source files is basic indeed.

You should also read "https://www.python.org/dev/peps/pep-3147/";.
It mainly explains why "pycache" has been introduced
but as a side effect, it points out a bondage between
the "*.pyc" files and the major Python version: it is very likely,
that a major Python version will not accept "*.pyc" files created
by another major Python version.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread Christian Gollwitzer

Am 02.10.18 um 04:17 schrieb Jach Fong:

It was supposed that most discussant want to see the reply message
instantly when they open the mail. They already know what is going on
and no need to pass through all those previous message. "top posting"
seems more reasonable to me:-)


You assume that everybody who reads it has already read all the previous 
discussion. That may be true in a private discussion, but on Usenet 
often people scan over the postings and don't recall all the details.


Also, "intermixed posting" makes it easier to reply to several points 
individually. You should shorten the quote to the releveant bit that 
your reply belongs to.


Classic quote:

A: Because it reverses the logical flow of conversation.

Q: Why is top posting frowned upon?

A: Top-posting.

Q: What is the most annoying thing on usenet and in email?



Christian
--
https://mail.python.org/mailman/listinfo/python-list


Re: How to achieve pyc only deployment for module in python3.6

2018-10-01 Thread Chandana Pattanayak
Thank you all. I will go for containers. Will ask for more time based on
all your inputs..

Thanks,
Chandana

On Tue, 2 Oct 2018, 11:22 dieter,  wrote:

> dieter  writes:
> > Chandana Pattanayak  writes:
> >> I have a requirement to provide basic code protection for a module in
> our
> >> product suite. With python 3.6 the .pyc files are created under pycache
> ,
> >> so if i remove the py file the module is not found anymore.
> > ...
> > Note that you can disassemble "*.pyc" files and gain
> > quite some insight by this. Thus, the protection provided
> > by not deploying the source files is basic indeed.
>
> You should also read "https://www.python.org/dev/peps/pep-3147/";.
> It mainly explains why "pycache" has been introduced
> but as a side effect, it points out a bondage between
> the "*.pyc" files and the major Python version: it is very likely,
> that a major Python version will not accept "*.pyc" files created
> by another major Python version.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to change '\\' to '\'

2018-10-01 Thread Ethan Furman

On 10/01/2018 11:10 PM, Christian Gollwitzer wrote:

Am 02.10.18 um 04:17 schrieb Jach Fong:



It was supposed that most discussant want to see the reply message
instantly when they open the mail. They already know what is going on
and no need to pass through all those previous message. "top posting"
seems more reasonable to me:-)


You assume that everybody who reads it has already read all the previous 
discussion. That may be true in a private discussion, but on Usenet 
often people scan over the postings and don't recall all the details.


Even for two-person, private email discussions I prefer the interleaved 
replies -- in a week when I have to remind myself what was discussed it 
is much easier to comprehend.


Also, "intermixed posting" makes it easier to reply to several points 
individually. You should shorten the quote to the releveant bit that 
your reply belongs to.


Yes.  It is extremely annoying when someone top posts and leaves the 
entire rest of the discussion still attached at the bottom.


--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list