Re: Is Microsoft Windows secretly downloading childporn to your computer ?!
On 03/12/15 07:24, Chris in Makati wrote: > On Wed, 2 Dec 2015 08:57:44 + (UTC), Juha Nieminen > wrote: > >> In comp.lang.c++ Steve Hayes wrote: >>> You download things FROM a computer, you upload them TO a computer. >> >> It's a matter of perspective. If a hacker breaks into your computer and >> starts a download from somewhere else into your computer, isn't the hacker >> "downloading" things to your computer? > > Does it matter? As far as the law is concerned, it is possession of > child porn that's illegal. How it got there is irrelevant. > You are posting to a wide range of international newsgroups (with this thread being way off-topic for all of them...). It makes no sense to talk about "the law", because this is not something covered by /international/ law. What counts as "child porn", what counts as "possession", how relevant intention, knowledge, etc., is, varies enormously from country to country. Even if the OP is telling the truth (and if Skybuck said that grass is green, I'd recommend going outside to check), and he gets caught with this stuff on his machine, punishments can vary from "it's fine as long as you don't distribute it" to "25 years for each picture, to be served consecutively". -- https://mail.python.org/mailman/listinfo/python-list
Re: odd runtime error
On Wed, Dec 1, 2010 at 5:19 PM, Cameron Simpson wrote: > On 01Dec2010 16:49, David Brown wrote: > | So I'm not subscribed to python-list but would like to get an answer > | to my question. I've made a small test program that dumps a > | RuntimeError and I'd like to know why. > | > | $ python test2.py > | doing stuff > | Traceback (most recent call last): > | File "test2.py", line 3, in > | import test > | RuntimeError: not holding the import lock > | child 3693 exited with 256 > | $ > | > | Here's the setup, there's two files test.py and test2.py > | > | $ cat test.py > | #!/usr/bin/python > | > | import os, sys > | > | if os.fork() == 0: > | print "doing stuff" > | sys.exit() > | > | print "child %d exited with %d" % os.wait() > | $ cat test2.py > | #!/usr/bin/python > | > | import test > | $ > | > | I understand that sys.exit() is really just doing a `raise > | SystemExit(0)' and the RuntimeError shows up with that as well. If you > | change out sys.exit with os._exit(0) then it doesn't show dump the > | RuntimeError. Also, this seems to be a python2.6 and python2.7 issue. > | Python3 doesn't have this issue. I haven't checked with python2.5 or > | before yet. > | > | I was more curious about what this behavior is and why python is doing > | things this way. I've scoured the python documentation and can't seem > | to figure out why. > > So, test2.py imports "test", which is in "test.py". > And the test module forks _during_ the import. > > Python takes a lock during imports - this stops multiple threads > from importing the same module at the same time (avoiding multiple > instantiation etc) and other racy fribbing with the in-memory module > data structures. > > So: > import test > test.py... > fork... > > At this point two programs exist, each in the midst of the import of > test.py. It would seem the import lock breaks over the fork, so that the > child process doesn't hold the lock. But because it is a fork, it does > not know this! (Being identical to its parent.) So you raise SystemExit, > and during the stack unwind the child tries to release the lock. Which > it doesn't have, thus the breakage. > > Does that clarify the sequence of events? Thanks for the clarification I like the idea of wrapping all the primary code in the script to a main function then calling it if its being called by main. I think I got a better handle on things. Thanks, - David Brown > Cameron Simpson DoD#743 > http://www.cskk.ezoshosting.com/cs/ > > "I think not," said Descartes, and promptly disappeared. > -- http://mail.python.org/mailman/listinfo/python-list
Re: odd runtime error
On Wed, Dec 1, 2010 at 4:59 PM, Chris Rebert wrote: > On Wed, Dec 1, 2010 at 4:49 PM, David Brown wrote: >> So I'm not subscribed to python-list but would like to get an answer >> to my question. I've made a small test program that dumps a >> RuntimeError and I'd like to know why. >> >> $ python test2.py >> doing stuff >> Traceback (most recent call last): >> File "test2.py", line 3, in >> import test >> RuntimeError: not holding the import lock >> child 3693 exited with 256 >> $ >> >> Here's the setup, there's two files test.py and test2.py >> >> $ cat test.py >> #!/usr/bin/python >> >> import os, sys >> >> if os.fork() == 0: >> print "doing stuff" >> sys.exit() >> >> print "child %d exited with %d" % os.wait() > > It's *quite* strange for a module that's being imported to execute a > fork() in its body; this is almost assuredly the cause of the > RuntimeError. Why are you fork()ing in an importable module in the > first place? Well, to be specific the fork isn't the cause of the RuntimeError, the sys.exit() causes the runtime error. I agree that forking in a module is bad coding practice and I'm working with the developer to help him understand why that's bad. If that makes sense. However, knowing why sys.exit() is producing a RuntimeError on some versions of python and not others also more interesting a question. Thanks, - David Brown > Cheers, > Chris > -- > http://blog.rebertia.com > -- http://mail.python.org/mailman/listinfo/python-list
odd runtime error
So I'm not subscribed to python-list but would like to get an answer to my question. I've made a small test program that dumps a RuntimeError and I'd like to know why. $ python test2.py doing stuff Traceback (most recent call last): File "test2.py", line 3, in import test RuntimeError: not holding the import lock child 3693 exited with 256 $ Here's the setup, there's two files test.py and test2.py $ cat test.py #!/usr/bin/python import os, sys if os.fork() == 0: print "doing stuff" sys.exit() print "child %d exited with %d" % os.wait() $ cat test2.py #!/usr/bin/python import test $ I understand that sys.exit() is really just doing a `raise SystemExit(0)' and the RuntimeError shows up with that as well. If you change out sys.exit with os._exit(0) then it doesn't show dump the RuntimeError. Also, this seems to be a python2.6 and python2.7 issue. Python3 doesn't have this issue. I haven't checked with python2.5 or before yet. I was more curious about what this behavior is and why python is doing things this way. I've scoured the python documentation and can't seem to figure out why. Thanks, - David Brown -- http://mail.python.org/mailman/listinfo/python-list
Re: spam
rickman wrote: spam *Why* are you replying to spam messages like this? The spam in c.a.e. usually costs me about 10-15 seconds a day pressing "K" for "kill thread" on my newsreader - but your bizarre new habit has cost me far more in trying to think out a rational explanation for your posts. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Operating System???
So how would I make an OS Shell? -- http://mail.python.org/mailman/listinfo/python-list
Python Operating System???
Hello. I recently came across a free operating system called Unununium (or something like that) and it was developed in Python and Assembly. Now, I have been looking for a way to make an operating system for a long long time and the only possibilities I could find were C++ and assembly. I don't mind assembly so much if I don't have to use it very often. But C++ is so complicated and errors are pretty much impossible to find in the code for me. So, I was wondering if it would be possible to find a bootloader that loads a python file at startup or something... Is there an example somewhere of a Python OS? Thanks! -- http://mail.python.org/mailman/listinfo/python-list