Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread eryk sun
On Sat, Feb 4, 2017 at 3:19 PM, Wildman via Python-list wrote: > > Personally I don't understand the danger in having the dot in the path. The > './' only > means the current directory. DOS and Windows has searched the current > directory > since their beginning. Is that also dangerous? On W

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Torrie
On 02/04/2017 12:20 PM, Lew Pitcher wrote: > It doesn't take root access to write a file to /tmp > In fact, /tmp is specifically set up to allow /any/ user to create /any/ file > or directory in it. > > Witness: > > > guest@bitsie:~$ chmod a+x /tmp/dothis > > Hey! I've even made the file exe

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Torrie
On 02/04/2017 08:19 AM, Wildman via Python-list wrote: > No, I do not know. You might try your question in > a linux specific group. Personally I don't understand > the danger in having the dot in the path. The './' > only means the current directory. DOS and Windows > has searched the current

RE: Python: How do I resolve oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available?

2017-02-04 Thread Deborah Swanson
david.am...@digital.beis.gov.uk wrote, on Saturday, February 04, 2017 3:39 PM > > Hello All, > > I'm a newbie to python programming - got into it > predominately for the purposes of machine learning and data > mining and even though I've committed several weeks to > learning the scripting lan

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Cameron Simpson
On 04Feb2017 12:56, Wildman wrote: On Sat, 04 Feb 2017 18:25:03 +, Grant Edwards wrote: The next time you are in the /tmp directory looking for something, can you guess what happens when you mistype "ls" as "sl"? [...] Your scenario assumes the malicious user has root access to be able to

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Cameron Simpson
On 04Feb2017 09:19, Wildman wrote: [...] Personally I don't understand the danger in having the dot in the path. The './' only means the current directory. DOS and Windows has searched the current directory since their beginning. Is that also dangerous? Citing DOS and Windows as prior art

Python: How do I resolve oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available?

2017-02-04 Thread david . amadi
Hello All, I’m a newbie to python programming – got into it predominately for the purposes of machine learning and data mining and even though I’ve committed several weeks to learning the scripting language, I have struggled to fully grasp how it works. I’m looking to scrape title, video Id, v

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Cameron Simpson
On 04Feb2017 08:10, Neal Becker wrote: Neal Becker wrote: I want to make sure any modules I build in the current directory overide any others. To do this, I'd like sys.path to always have './' at the beginning. What's the best way to ensure this is always true whenever I run python3? [...] S

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Marko Rauhamaa
Dan Sommers : > On Sat, 04 Feb 2017 21:19:06 +0200, Marko Rauhamaa wrote: >> Now, that's why the distros are careful to place $HOME/bin as the >> final entry of PATH; the system commands take precedence over the >> user's personal ones. However, the user is free to define the PATH >> any way they

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Dan Sommers
On Sat, 04 Feb 2017 21:19:06 +0200, Marko Rauhamaa wrote: > Now, that's why the distros are careful to place $HOME/bin as the > final entry of PATH; the system commands take precedence over the > user's personal ones. However, the user is free to define the PATH any > way they like. I deliberatel

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Lew Pitcher
On Saturday February 4 2017 13:56, in comp.lang.python, "Wildman" wrote: > On Sat, 04 Feb 2017 18:25:03 +, Grant Edwards wrote: > >> On 2017-02-04, Wildman via Python-list wrote: >> >>> No, I do not know. You might try your question in a linux specific >>> group. Personally I don't unde

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Marko Rauhamaa
Grant Edwards : > It allows a malicous user to put an evil executable someplace public > like /tmp and have it executed accidentally. For example, let's say > this executable file was named "sl" and placed in /tmp. > > --sl-- > #!/bin/bash >

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Dan Sommers
On Sat, 04 Feb 2017 12:56:58 -0600, Wildman wrote: > On Sat, 04 Feb 2017 18:25:03 +, Grant Edwards wrote: >> It allows a malicous user to put an evil executable someplace public >> like /tmp and have it executed accidentally. For example, let's say >> this executable file was named "sl" and

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Grant Edwards
On 2017-02-04, Wildman via Python-list wrote: >> >> The next time you are in the /tmp directory looking for something, can >> you guess what happens when you mistype "ls" as "sl"? >> >>> DOS and Windows has searched the current directory since their >>> beginning. Is that also dangerous? >> >>

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Wildman via Python-list
On Sat, 04 Feb 2017 18:25:03 +, Grant Edwards wrote: > On 2017-02-04, Wildman via Python-list wrote: > >> No, I do not know. You might try your question in a linux specific >> group. Personally I don't understand the danger in having the dot >> in the path. The './' only means the current

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Grant Edwards
On 2017-02-04, Wildman via Python-list wrote: > No, I do not know. You might try your question in a linux specific > group. Personally I don't understand the danger in having the dot > in the path. The './' only means the current directory. It allows a malicous user to put an evil executable

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread alister
On Sat, 04 Feb 2017 09:19:38 -0600, Wildman wrote: > On Sat, 04 Feb 2017 11:27:01 +0200, Jussi Piitulainen wrote: > >> Wildman writes: >> >> [snip] >> >>> If anyone is interested the correct way is to add this to /etc/profile >>> (at the bottom): >>> >>> PATH=$PATH:./ >>> export PATH >> >> Out

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Jussi Piitulainen
Wildman writes: > On Sat, 04 Feb 2017 11:27:01 +0200, Jussi Piitulainen wrote: > >> Wildman writes: >> >> [snip] >> >>> If anyone is interested the correct way is to add this to >>> /etc/profile (at the bottom): >>> >>> PATH=$PATH:./ >>> export PATH >> >> Out of interest, can you think of a cor

image handling(donwloading/display) in django using html and form

2017-02-04 Thread Xristos Xristoou
i want to do some image processing using Django and now work and on the image handling(donwloading/display) using Django. first on my task i dont want to store that images on my server. but i have some problems. that my code : urls.py from django.conf.urls import url from . import views urlpat

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Wildman via Python-list
On Sat, 04 Feb 2017 11:27:01 +0200, Jussi Piitulainen wrote: > Wildman writes: > > [snip] > >> If anyone is interested the correct way is to add this to >> /etc/profile (at the bottom): >> >> PATH=$PATH:./ >> export PATH > > Out of interest, can you think of a corresponding way that a mere user

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Neal Becker
Neal Becker wrote: > I want to make sure any modules I build in the current directory overide > any > others. To do this, I'd like sys.path to always have './' at the > beginning. > > What's the best way to ensure this is always true whenever I run python3? Sorry if I was unclear, let me try to

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Jussi Piitulainen
Wildman writes: [snip] > If anyone is interested the correct way is to add this to > /etc/profile (at the bottom): > > PATH=$PATH:./ > export PATH Out of interest, can you think of a corresponding way that a mere user can remove the dot from their $PATH after some presumably well-meaning system

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Felt
On 04-Feb-17 02:07, Cameron Simpson wrote: On 03Feb2017 17:21, Wildman wrote: On Sat, 04 Feb 2017 09:25:42 +1100, Cameron Simpson wrote: Also, what you describe with rc.local wouldn't work anyway, even if it had ben what was asked. Of course, you are correct. I don't know where my head w