Live data from Hacker News

PythonMonk – Learn Python in the browser

pythonmonk.com

41–50 of 50 posts

Re: PythonMonk – Learn Python in the browser

#41

Earlier quoted context omitted.

there's nothing experimental about Python 3. its a stable release version and I think its already up to sub version 3.3. HOWEVER, there are many important 3rd party libraries that have not yet been migrated to be fully compatible with Python 3. these libraries are far more important to writing real applications than the ability to use some newer syntactic constructs in Python 3.

> HOWEVER, there are many important 3rd party libraries that have not yet been migrated to be fully compatible with Python 3. Are there any particular libraries blocking you? Numpy / SciPy, IPython, Requests, Django, Pyramid, Bottle, etc. have all been ported to Python 3.

South (database migration for django). Until django core has its own migration tool I won't be using it with Python 3.

PIL as well. similar reasons. django image fields are dependent on PIL.

Celery is still on Python 2 also, and while there are other message queues available, none of them is as easy to integrate with for an app that's already written in Python.

Re: PythonMonk – Learn Python in the browser

#42

Earlier quoted context omitted.

> HOWEVER, there are many important 3rd party libraries that have not yet been migrated to be fully compatible with Python 3. Are there any particular libraries blocking you? Numpy / SciPy, IPython, Requests, Django, Pyramid, Bottle, etc. have all been ported to Python 3.

South (database migration for django). Until django core has its own migration tool I won't be using it with Python 3. PIL as well. similar reasons. django image fields are dependent on PIL. Celery is still on Python 2 also, and while there are other message queues available, none of them is as easy to integrate with for an app that's already written in Python.

To replace PIL you should try Pillow, a fork of PIL that is capable of running on py3k (and 2.x).

Re: PythonMonk – Learn Python in the browser

#43
post #30
post #27

Earlier quoted context omitted.

This particular behaviour can occur because the process is disallowed to call fork() and can be done with setrlimit() (see RLIMIT_NPROC). There should be other protections, though, because forking a "ls" is not the only way to access the filesystem.

Ah, interesting. File system access isn't blocked completely: __import__("os").listdir("/evaluate") open("/evaluate/test.py").readlines()

__import__("os").execv("/usr/bin/env", ["env"])

Gives you a few clues as well

Re: PythonMonk – Learn Python in the browser

#46
post #38
post #30

Earlier quoted context omitted.

Ah, interesting. File system access isn't blocked completely: __import__("os").listdir("/evaluate") open("/evaluate/test.py").readlines()

Execv'ing processes is OK as long as you don't fork: __import__("os").execv("/usr/bin/uname", ["uname", "-a"]) Linux ip-10-196-3-111 2.6.32-amazon-xen-r3 #1 SMP Mon Jan 16 21:03:16 PST 2012 i686 GNU/Linux As for the actual files, there are a few clues that a chroot is created for every request : /proc is not mounted, /etc is minimal (root + 1 user in passwd) and "ls -id /" returns a new inode number every time.

Yeah, we are using chroot (along with other things) to sandbox things on a per request basis.

- Tejas from Team PythonMonk (I built the sandboxing stuff)

Re: PythonMonk – Learn Python in the browser

#47
post #10
post #8

Earlier quoted context omitted.

Python 3, in 2013, is not lacking in pragmatism. It's not new, or experimental. Someone just learning today is going to have to immediately turn around and relearn things because they started out with an old version.

I don't know anyone who uses Python 3 in production. It's still seen as an experimental implementation.

Not experimental, just that there are good libraries that aren't Py3k yet.

Re: PythonMonk – Learn Python in the browser

#49

Interesting, however I feel like learning to code in a browser (even if it's JavaScript) doesn't work. Sure, you may learn how to do a for loop or how variables work. But, you don't learn how to actually use the language. Setting up a development environment, and understanding how everything is connected is much more important. Let's say you ace everything here, on CodeAcademy, etc. You still can't actually build any…

I tend to disagree. It works in a sense that it can take a person with no knowledge of the syntax and flow of a language and remove some of the fear of getting started. I think it is a great non-intimidating way to get an overview of a language. Yes, they are going to need more instruction, but it's a start.

Re: PythonMonk – Learn Python in the browser

#50
post #43
post #30

Earlier quoted context omitted.

Ah, interesting. File system access isn't blocked completely: __import__("os").listdir("/evaluate") open("/evaluate/test.py").readlines()

__import__("os").execv("/usr/bin/env", ["env"]) Gives you a few clues as well

adam.py... :) If only I knew more about bytecode...

  import inspect
  import pprint
  pp = pprint.PrettyPrinter(depth=6)
  f = inspect.currentframe()
  c = 0
  while f is not None:
      c += 1
      if c == 20:
          print f.f_code
          pp.pprint(dict(inspect.getmembers(f.f_code)))
      f = f.f_back
Post reply on HN