I have trouble understanding why a 'sys.exit(2)' is
*not* passed back to the CMD shell in this little example:
- c:\py_cmd_test.cmd --
@%WinDir%\py.exe -2 -x %~dp0py_cmd_test.cmd & exit /b %ERRORLEVEL%
# The '-x' is for Python to skip the 1st line of this file.
import sys
print ("Hello,
jf...@ms4.hinet.net於 2018年12月28日星期五 UTC+8下午4時04分07秒寫道:
> eryk sun at 2018/12/27 UTC+8 PM 6:58:33 wrote:
> > On 12/27/18, jf...@ms4.hinet.net wrote:
> > >
> > > I still don't get it. When I change it to using list comprehension, the
> > > problem is still there. (it now has no late-binding variable
On 28Dec2018 20:21, Daniel Ojalvo wrote:
I agree that previous behavior shouldn't be changed, but I would
suggest updating the documentation to point it out as a footnote. The
current behavior is correct just unclear. Most people just learning
about the open command wouldn't have this expectat
Abdur-Rahman
I am sure various modules available have ready-made solutions and I see
others have replied to your question. The usual disclaimers apply. This is
an academic discussion and not a statement of the right or only way to do an
abstract task.
So just a thought. You seem interested in a G
On Sat, Dec 29, 2018 at 7:21 AM Daniel Ojalvo wrote:
>
> Thank you for the advice!
>
> I haven't used the opener argument before, but I'll keep it for future
> reference. I think it's still a little kludge-y, but it works.
It has a very similar effect to what you were proposing, but still
works
Thank you for the advice!
I haven't used the opener argument before, but I'll keep it for future
reference. I think it's still a little kludge-y, but it works.
I agree that previous behavior shouldn't be changed, but I would suggest
updating the documentation to point it out as a footnote. The
well i wanted that to improve the following code:
https://www.pythonmembers.club/2018/12/28/reviving-bertrand-russell-through-python/
that one i used the random list technique
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
>
--
https://mail
[REAL SUBJECT: an assortment of nothings]
Python tricks?
Speaking from a tutorial forum, tricks can catch people trying to learn.
I am not sure of the history of the ellipsis object.
>>> dir(...)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__',
'__ge__',
On Sat, Dec 29, 2018 at 4:24 AM Grant Edwards wrote:
>
> On 2018-12-27, Daniel Ojalvo via Python-list wrote:
>
> open("this_is_a_pipe")
> >
>
> Opening a tty device can also block[1]. However, if somebody is using
> the open() builtin on tty devices that's probably the least of their
> prob
On 2018-12-27, Daniel Ojalvo via Python-list wrote:
open("this_is_a_pipe")
>
Opening a tty device can also block[1]. However, if somebody is using
the open() builtin on tty devices that's probably the least of their
problems.
[1] Technically, opening any character-mode device could block
Hi, There,
I am an engineer in Taiwan and I was trying to install
rvpython-2.1final.tar.gz but it's built up in python 2.x which cannot be
installed in python 3 or above.
Is there any officially released version of rvpython compatible
with python 3 or above?
Thank yo
woops @ben me too i got that solution but i'm searching for a neater answer.
let us say i'm using it over new data, 1 million data of red blue green can
be saved by just dealing with the probabilities ^^_
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
M
On 2018-12-28 17:31, Abdur-Rahmaan Janhangeer wrote:
> do you have something like
>
> choice(balls)
>
> >>> red
Don't specify the "k=" (which defaults to 1 if you omit it) and use
the first element of the results:
>>> from random import choices
>>> distribution = {"green":2, "red": 2, "blue":
On 2018-12-28 16:15, Abdur-Rahmaan Janhangeer wrote:
> greetings,
>
> let us say that i have a box of 5 balls,
>
> green balls - 2 with probability 2/5
> red balls 2 - with probability 2/5
> blue balls 1 - with probability 1/5
>
> how to program the selection so that the random choices reflect t
ah yes, powerful enough for further customisations
* scratches head
thanks everybody !
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, Dec 29, 2018 at 12:28 AM Abdur-Rahmaan Janhangeer
wrote:
>
> woops @ben me too i got that solution but i'm searching for a neater answer.
>
> let us say i'm using it over new data, 1 million data of red blue green can
> be saved by just dealing with the probabilities ^^_
Assuming you're o
@Tim
do you have something like
choice(balls)
>>> red
and subsequent repetitions for long enough yield approximately 2/5 times r
2/5 times g and 1/5 b
like one without random choice over list/tuples
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mau
Abdur-Rahmaan Janhangeer writes:
> let us say that i have a box of 5 balls,
>
> green balls - 2 with probability 2/5
> red balls 2 - with probability 2/5
> blue balls 1 - with probability 1/5
>
> how to program the selection so that the random choices reflect the
> probabilities?
>>> import rand
sandeep.ba...@gmail.com writes:
> ```
> Error code:
> --
>
>
> Traceback (most recent call last):
> File
> "C:\Users\sandeep\AppData\Local\Programs
greetings,
let us say that i have a box of 5 balls,
green balls - 2 with probability 2/5
red balls 2 - with probability 2/5
blue balls 1 - with probability 1/5
how to program the selection so that the random choices reflect the
probabilities?
--
Abdur-Rahmaan Janhangeer
http://www.pythonmember
thanks, the 3 dots are more explicit, thought was another py trick
yours,
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
eryk sun at 2018/12/27 UTC+8 PM 6:58:33 wrote:
> On 12/27/18, jf...@ms4.hinet.net wrote:
> >
> > I still don't get it. When I change it to using list comprehension, the
> > problem is still there. (it now has no late-binding variable, right? :-)
> >
> class Too:
> > ... XS = [15, 15, 15,
22 matches
Mail list logo