Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Albert-Jan Roskam via Tutor
- Original Message - > From: Alan Gauld > To: tutor@python.org > Cc: > Sent: Friday, May 22, 2015 1:44 AM > Subject: Re: [Tutor] ls *.py[co] >> .hidden > > On 21/05/15 17:57, Emile van Sebille wrote: >> On 5/21/2015 9:28 AM, Albert-Jan Roskam via Tutor wrote: >>> I just created an a

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Cameron Simpson
On 21May2015 17:52, Laura Creighton wrote: If you keep appending the results of ls to your .hidden file it will grow to enormous size. [...] sort -u .hidden >newhidden #or whatever you want to call it mv newhidden .hidden Or: sort -u -o .hidden .hidden Cheers, Cameron Simpson [...] post-

Re: [Tutor] https://trinket.io

2015-05-21 Thread memilanuk
On 05/21/2015 01:02 AM, Albert-Jan Roskam via Tutor wrote: Not sure whether I like this better than IPython Notebook, though. I was given to understand that the target use / demographic was a bit different than with iPython... Monte -- Shiny! Let's be bad guys. Reach me @ memilanuk (at)

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Alan Gauld
On 21/05/15 17:57, Emile van Sebille wrote: On 5/21/2015 9:28 AM, Albert-Jan Roskam via Tutor wrote: I just created an alias for this: alias hidepycs="ls *.py[co] > .hidden" Close -- try alias ls='ls --hide=*.py[co]' I thought we'd established that this was to control visibility in the Fil

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Danny Yoo
>> I just created an alias for this: >> alias hidepycs="ls *.py[co] > .hidden" > > Close -- try > > alias ls='ls --hide=*.py[co]' > > and when you want to see them use ls -a. +1 to Emile's approach. This seems to be the right approach, using the "--hide" option built into ls: --hide=PATT

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Danny Yoo
> ls *.pyc *.pso >> .hidden > > should work > > root@localhost:~# mkdir hide_test [My response is completely off topic of Python; apologies.] Hi Bod, Be careful about running as 'root' for normal exploratory programming or system usage. 'root' should be treated as an emergency-mode kind of thin

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Laura Creighton
In a message of Thu, 21 May 2015 15:54:20 +0100, Bod Soutar writes: >ls *.pyc *.pso >> .hidden > >should work > >root@localhost:~# mkdir hide_test >root@localhost:~# cd hide_test/ >root@localhost:~/hide_test# touch a.pyc b.pyc c.pyo d.py e.txt >root@localhost:~/hide_test# ls >a.pyc b.pyc c.pyo

Re: [Tutor] Getting import to use a variable name

2015-05-21 Thread Jim Mooney Py3.4.3winXP
On 20 May 2015 at 01:02, Peter Otten <__pete...@web.de> wrote: > If you start with an object dir() gives you a list of attribute names. To > get the actual attributes use > > attribute = getattr(object, attribute_name) > > Then print the attributes' docstring with > > print(attribute_name, attribu

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Emile van Sebille
On 5/21/2015 9:28 AM, Albert-Jan Roskam via Tutor wrote: I just created an alias for this: alias hidepycs="ls *.py[co] > .hidden" Close -- try alias ls='ls --hide=*.py[co]' and when you want to see them use ls -a. Emile ___ Tutor maillist - Tu

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Albert-Jan Roskam via Tutor
- Original Message - > From: Steven D'Aprano > To: tutor@python.org > Cc: > Sent: Thursday, May 21, 2015 6:11 PM > Subject: Re: [Tutor] ls *.py[co] >> .hidden > > On Thu, May 21, 2015 at 03:54:20PM +0100, Bod Soutar wrote: > >> ls *.pyc *.pso >> .hidden >> >> should work > [...] >

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Steven D'Aprano
On Thu, May 21, 2015 at 03:54:20PM +0100, Bod Soutar wrote: > ls *.pyc *.pso >> .hidden > > should work [...] > As this adds specific results of ls you will need to schedule the > command through cron to get it to automatically add new files Yes, but that's the point isn't it? If Nautilus unders

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Bod Soutar
On 21 May 2015 at 15:39, Steven D'Aprano wrote: > On Thu, May 21, 2015 at 12:55:13PM +, Albert-Jan Roskam via Tutor wrote: >> Hi, >> >> I would like to hide .pyc and .pyo files because they are visually >> distracting. Is the aforementioned command the best way? [1]. > > It isn't clear what yo

Re: [Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Steven D'Aprano
On Thu, May 21, 2015 at 12:55:13PM +, Albert-Jan Roskam via Tutor wrote: > Hi, > > I would like to hide .pyc and .pyo files because they are visually > distracting. Is the aforementioned command the best way? [1]. It isn't clear what you mean by "hide them". If you mean that you want to use

[Tutor] ls *.py[co] >> .hidden

2015-05-21 Thread Albert-Jan Roskam via Tutor
Hi, I would like to hide .pyc and .pyo files because they are visually distracting. Is the aforementioned command the best way? [1]. I know Python 3 uses __pycache__ (much better!), but I also need Python 2. And not writing bytecode files altogether using what's-that-environment-var-called-ag

[Tutor] https://trinket.io

2015-05-21 Thread Albert-Jan Roskam via Tutor
Hi, Wired.com features trinket.io [1] and I thought it'd be nice to share this here: https://trinket.io. Not sure whether I like this better than IPython Notebook, though. Regards, Albert-Jan [1] http://www.wired.com/2015/05/running-python-browser-awesome-think