Re: /usr/bin/django-admin in python-django

2014-07-21 Thread Karsten Hilbert
On Mon, Jul 21, 2014 at 10:17:20AM +1000, Brian May wrote: Not sure I understand it (that space in ' ''' seems to be important?), I would guess it creates a 3-quotes Python string embedded into a single-quote one: test = ' single-quotes string with: '''3-quotes-string''' embedded into it'

Re: /usr/bin/django-admin in python-django

2014-07-21 Thread Matthias Urlichs
Hi, Karsten Hilbert: Writing would make the first quote escape the second. Not escape, but … Or some such :-) To make this more explicit: foo=''' ' echo This is Shell code exec python $0 ' ''' print(This is Python) So to Python, you have a (multiline, hence the triple-quote) string

Re: /usr/bin/django-admin in python-django

2014-07-20 Thread Jakub Wilk
* Brian May br...@microcomaustralia.com.au, 2014-07-20, 11:47: Or, another words, ideally we want all these to work: python2 /usr/bin/django-admin - python2 python3 /usr/bin/django-admin - python3 /usr/bin/django-admin - autodetect. One possibility is to write a shell script that is also

Re: /usr/bin/django-admin in python-django

2014-07-20 Thread Brian May
On 20 July 2014 19:00, Jakub Wilk jw...@debian.org wrote: One possibility is to write a shell script that is also valid Python code. PoC: Not sure I understand it (that space in ' ''' seems to be important?), but it seems to work. Thanks. Another possibility is to create the django-admin

Re: /usr/bin/django-admin in python-django

2014-07-19 Thread Brian May
On 7 July 2014 11:55, Brian May br...@microcomaustralia.com.au wrote: The problem is that the django-admin wrapper chose the python3 version, but karaage.tests.settings is only available in Python2, even though I have python3-django installed. See bugs #755341 and #755321. Looks like code

Re: /usr/bin/django-admin in python-django

2014-07-19 Thread Brian May
On 20 July 2014 11:12, Brian May br...@microcomaustralia.com.au wrote: See bugs #755341 and #755321. Looks like code is trying to run django-admin as a python script, allows it to specify which version of python to use. Only thing is, it isn't Python. It is now shell. This allows automatic