[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: where do my python files go in linux?

Jeroen Ruigrok van der Werven

1/12/2008 11:38:00 AM

-On [20080112 12:03], Jorgen Bodde (jorgen.maillist@gmail.com) wrote:
>app.py calls a lot of modules in {dir}/app. Horst says the python file
>goes in /usr/bin/app.py which is ok with me, but I have multiple
>python files, and I decided to use an app.sh script to call my python
>files. In the /usr/bin I do not see subdirs so I assume that is not
>really desirable.

Personally I'd be loathe to put app.py in /usr/bin. This directory is normally
reserved for OS-specific binaries. For personal/system-extended stuff I'd use
/usr/local/bin or whatever your system mandates. (But hey, that's the typical
mentality difference between the BSD and Linux world it seems, so do with it
what you want.)

>Question 2. Should I use *.pyc rather then *.py files to speed up
>executing as the user cannot write to /usr/bin or any other dir in the
>system and everytime my app runs it will recompile it

..pyc will help execution time so it might be nice to have those in place.

Normally you'd split up the bulk of the code into a module which gets
installed into site-packages and a piece of stand-alone front-end code which
imports the module and executes whatever you need to do and gets installed
into a typical PATH directory.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
ã?¤ã?§ã?«ã?¼ã?³ ã?©ã?¦ã??ã?­ã??ã?¯ ã?´ã?¡ã?³ ã??ã?« ã?¦ã?§ã?«ã?´ã?§ã?³
http://www.in-n... | http://www.ra...
....fools rush in where Angels fear to tread.
22 Answers

Nick Craig-Wood

1/14/2008 11:30:00 AM

0

Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> wrote:
> -On [20080112 12:03], Jorgen Bodde (jorgen.maillist@gmail.com) wrote:
> >app.py calls a lot of modules in {dir}/app. Horst says the python file
> >goes in /usr/bin/app.py which is ok with me, but I have multiple
> >python files, and I decided to use an app.sh script to call my python
> >files. In the /usr/bin I do not see subdirs so I assume that is not
> >really desirable.
>
> Personally I'd be loathe to put app.py in /usr/bin. This directory is normally
> reserved for OS-specific binaries. For personal/system-extended stuff I'd use
> /usr/local/bin or whatever your system mandates.

I'd agree with that, except for the fact that he is making a .deb to
be installed by the package manager.

In Debian...

/usr/bin is for stuff installed by the package manager which becomes
effectively part of the OS. The package manager tracks every file it
installes to ensure ovewrites can't happen etc...

/usr/local/bin is for stuff installed from source, not using the
package manager.

--
Nick Craig-Wood <nick@craig-wood.com> -- http://www.craig-woo...

Jim G.

7/24/2014 6:11:00 PM

0

Arthur Lipscomb sent the following on 7/24/2014 9:47 AM:
> On 7/23/2014 11:06 PM, Ian J. Ball wrote:
>> In article <lqpp5m$ir7$1@dont-email.me>,
>> Arthur Lipscomb <arthur@alum.calberkeley.org> wrote:
>>
>>> On 7/23/2014 12:56 PM, Jim G. wrote:
>>>> Obveeus sent the following on 7/23/2014 11:47 AM:
>>>>> On 7/23/2014 11:49 AM, Ian J. Ball wrote:
>>>>>
>>>>>> Extant (recorded) - This show would be a lot more enjoyable if they
>>>>>> would just show the audience everyone's cards and let things play out
>>>>>> from there. Instead, we have no idea what the "Bad Guys" are after, and
>>>>>> that is making the show *more annoying*, not "more suspenseful"... :|
>>>>>
>>>>> That style of storytelling (intentionally keeping things from viewers
>>>>> and always putting forth more new mysteries than are answered) is why I
>>>>> quit watching.
>>>>
>>>> It's crazy to think that writers can set the entire table in one or two
>>>> episodes (in the case of EXTANT) and then have enough things to resolve
>>>> so that you have enough content to fill the rest of the season. Or to
>>>> put it another way, when you're only two episodes into a show like this,
>>>> of *course* you're still gonna be getting more new mysteries than
>>>> resolutions.
>>>
>>> Exactly! Let them finish setting things up. I know people have been
>>> burned before, but good grief. Whatever happened to patience?!?!
>>
>> Do both of you realize that THAT IS NOT THE ONLY WAY TO WRITE SHOWS LIKE
>> THIS?!
>>
>> You're acting like the way they're writing "Extant" is the ONLY way you
>> can write a show like that.
>>
>
> It is if it's a mystery. You don't start a mystery by revealing who did
> it and why to the audience.

Yep. I mentioned COLUMBO as an exception to the rule, and I believe that
it only succeeded as it did because Falk did a good job of having
Columbo underestimated by so many people.

>> Utter bullshit.
>>
>> And, more to the point, every other show that has tried to write a show
>> this way has pretty much FAILED.
>>
>
> Perhaps a point of reference would help here. Can you give specific
> examples of shows like this that failed? We are talking about sci-fi
> shows with mystery elements aren't we? Off the top of my head the only
> failed show like this was Defying Gravity. Extant has much more
> interesting setting and characters than that show IMO.

I just gave a short list of *successful* shows that don't spell out
everything in the first two outings. Ian sounds like he wants a mystery
that's solved in the first outing or two, followed by endless seasons of
character-driven soap opera. Which means that he and I couldn't be more
different where this sort of thing is concerned, but it also explains
why he's way more knowledgeable than I am about actors and actresses,
given that he's way more into the *characters* than I am.

> I'm curious if you're going to list shows that ran multiple seasons as
> part of your definition of a failed show. The next closest show like
> this would be Lost but that wasn't a failed show by any definition.

Not until season six, at least. :)

> Of course the TV graveyard is littered with lots of cancelled sci-fi
> shows but when I think about the ones that had a mystery element like
> Day Break or Miracles, I loved those shows. I had absolutely no issue
> with the writing. I can't think of anything else right now. Maybe they
> were so bad I blocked them from my memory :-). So I'm interested to
> know what shows you're referring to.
>
>> There is another way to write a show like this,
>
> Not if "this" is a mystery. People watch and read mystery for the
> mystery. Well maybe you don't but I think most others do. It's like
> complaining a western has cowboys and horses in it. Yeah, you can do a
> show without cowboys and horses but then it's not a western.

Yep.

> You seem to be complaining that the writers are making the show *they*
> want to make instead of the show you want them to make which is a
> different argument than bad writing.

This is exactly my take on it, as well. And to double down on it (and
keep him fired up), I'll point out that what Ian wants is dead wrong. :)

--
Jim G. | A fan of the good and the bad, but not the mediocre
"Everyone is relevant to someone." -- Harold Finch, PERSON OF INTEREST

Jim G.

7/24/2014 6:12:00 PM

0

suzeeq sent the following on 7/24/2014 10:01 AM:
> I've read that the difference between a mystery and a thriller is that
> in a thriller, the reader/audience knows who did it but the other
> characters don't and the plot is how they discover it and what evidence
> leads them to it. The show Motive is somewhat like this. With a mystery,
> no one knows until the end.

Yep. And over time, I've decided that the other significant difference
is that the protagonist is in ongoing personal danger in a thriller, and
not so much in a mystery.

--
Jim G. | A fan of the good and the bad, but not the mediocre
"Everyone is relevant to someone." -- Harold Finch, PERSON OF INTEREST

Jim G.

7/24/2014 6:13:00 PM

0

Obveeus sent the following on 7/24/2014 11:21 AM:
>
>
> On 7/24/2014 10:47 AM, Arthur Lipscomb wrote:
>> On 7/23/2014 11:06 PM, Ian J. Ball wrote:
>
>>> You're acting like the way they're writing "Extant" is the ONLY way you
>>> can write a show like that.
>>>
>>
>> It is if it's a mystery. You don't start a mystery by revealing who did
>> it and why to the audience.
>>
>>> Utter bullshit.
>>>
>>> And, more to the point, every other show that has tried to write a show
>>> this way has pretty much FAILED.
>>>
>>
>> Perhaps a point of reference would help here. Can you give specific
>> examples of shows like this that failed?
>
> LIFE ON MARS
> FLASH FORWARD
> ZERO HOUR

Of those three, I only watched FF and ZH, and neither of those failed
because they didn't give all of the answers in first episode or two;
they failed because the answers that were eventually forthcoming were
really stupid and confusing.

--
Jim G. | A fan of the good and the bad, but not the mediocre
"Everyone is relevant to someone." -- Harold Finch, PERSON OF INTEREST

David Johnston

7/24/2014 6:22:00 PM

0

On 7/24/2014 12:12 PM, Jim G. wrote:
> Obveeus sent the following on 7/24/2014 11:21 AM:
>>
>>
>> On 7/24/2014 10:47 AM, Arthur Lipscomb wrote:
>>> On 7/23/2014 11:06 PM, Ian J. Ball wrote:
>>
>>>> You're acting like the way they're writing "Extant" is the ONLY way you
>>>> can write a show like that.
>>>>
>>>
>>> It is if it's a mystery. You don't start a mystery by revealing who did
>>> it and why to the audience.
>>>
>>>> Utter bullshit.
>>>>
>>>> And, more to the point, every other show that has tried to write a show
>>>> this way has pretty much FAILED.
>>>>
>>>
>>> Perhaps a point of reference would help here. Can you give specific
>>> examples of shows like this that failed?
>>
>> LIFE ON MARS
>> FLASH FORWARD
>> ZERO HOUR
>
> Of those three, I only watched FF and ZH, and neither of those failed
> because they didn't give all of the answers in first episode or two;
> they failed because the answers that were eventually forthcoming were
> really stupid and confusing.
>

I have my doubts as to whether this set up can produce answers that
wouldn't be stupid.

Jim G.

7/24/2014 9:52:00 PM

0

David Johnston sent the following on 7/24/2014 1:21 PM:
> On 7/24/2014 12:12 PM, Jim G. wrote:
>> Obveeus sent the following on 7/24/2014 11:21 AM:
>>>
>>>
>>> On 7/24/2014 10:47 AM, Arthur Lipscomb wrote:
>>>> On 7/23/2014 11:06 PM, Ian J. Ball wrote:
>>>
>>>>> You're acting like the way they're writing "Extant" is the ONLY way you
>>>>> can write a show like that.
>>>>>
>>>>
>>>> It is if it's a mystery. You don't start a mystery by revealing who did
>>>> it and why to the audience.
>>>>
>>>>> Utter bullshit.
>>>>>
>>>>> And, more to the point, every other show that has tried to write a show
>>>>> this way has pretty much FAILED.
>>>>>
>>>>
>>>> Perhaps a point of reference would help here. Can you give specific
>>>> examples of shows like this that failed?
>>>
>>> LIFE ON MARS
>>> FLASH FORWARD
>>> ZERO HOUR
>>
>> Of those three, I only watched FF and ZH, and neither of those failed
>> because they didn't give all of the answers in first episode or two;
>> they failed because the answers that were eventually forthcoming were
>> really stupid and confusing.
>>
> I have my doubts as to whether this set up can produce answers that
> wouldn't be stupid.

I don't. Tampered tapes and computers, drugged astronaut impregnated
without her knowledge, etc. There's no shortage of potential answers
that are related to humans acting badly. Or it could truly be an ET kind
of thing, with or without cooperation from humans acting badly. That's
two possibilities that I wouldn't consider to be inherently stupid.

--
Jim G. | A fan of the good and the bad, but not the mediocre
"Everyone is relevant to someone." -- Harold Finch, PERSON OF INTEREST

suzeeq

7/25/2014 1:01:00 AM

0

Jim G. wrote:
> suzeeq sent the following on 7/24/2014 10:01 AM:
>> I've read that the difference between a mystery and a thriller is that
>> in a thriller, the reader/audience knows who did it but the other
>> characters don't and the plot is how they discover it and what evidence
>> leads them to it. The show Motive is somewhat like this. With a mystery,
>> no one knows until the end.
>
> Yep. And over time, I've decided that the other significant difference
> is that the protagonist is in ongoing personal danger in a thriller, and
> not so much in a mystery.

Yes, that's true too.

And that brings up what you wrote a couple posts back about character
driven or plot driven shows. You say you like a plot driven story, but
when there is one, you and others complain about how so and so
wouldn't/shouldn't do whatever based on previous episode. So really I
think a good show would be nearly equally plot AND character driven to
be a good watch. Many soap watchers complain about plot driven
storylines where the characters do a lot of things that are out of
character for them. It doesn't have to be predominatly one or the other
but a good mix, like 60/40.

David Johnston

7/25/2014 2:32:00 AM

0

On 7/24/2014 3:51 PM, Jim G. wrote:
> David Johnston sent the following on 7/24/2014 1:21 PM:
>> On 7/24/2014 12:12 PM, Jim G. wrote:
>>> Obveeus sent the following on 7/24/2014 11:21 AM:
>>>>
>>>>
>>>> On 7/24/2014 10:47 AM, Arthur Lipscomb wrote:
>>>>> On 7/23/2014 11:06 PM, Ian J. Ball wrote:
>>>>
>>>>>> You're acting like the way they're writing "Extant" is the ONLY
>>>>>> way you
>>>>>> can write a show like that.
>>>>>>
>>>>>
>>>>> It is if it's a mystery. You don't start a mystery by revealing
>>>>> who did
>>>>> it and why to the audience.
>>>>>
>>>>>> Utter bullshit.
>>>>>>
>>>>>> And, more to the point, every other show that has tried to write a
>>>>>> show
>>>>>> this way has pretty much FAILED.
>>>>>>
>>>>>
>>>>> Perhaps a point of reference would help here. Can you give specific
>>>>> examples of shows like this that failed?
>>>>
>>>> LIFE ON MARS
>>>> FLASH FORWARD
>>>> ZERO HOUR
>>>
>>> Of those three, I only watched FF and ZH, and neither of those failed
>>> because they didn't give all of the answers in first episode or two;
>>> they failed because the answers that were eventually forthcoming were
>>> really stupid and confusing.
>>>
>> I have my doubts as to whether this set up can produce answers that
>> wouldn't be stupid.
>
> I don't. Tampered tapes and computers, drugged astronaut impregnated
> without her knowledge, etc.

Be we need a non-stupid reason for them to be doing that. I consider
that a challenge at best.

There's no shortage of potential answers
> that are related to humans acting badly. Or it could truly be an ET kind
> of thing, with or without cooperation from humans acting badly.

Well humans are certainly doing something.


That's
> two possibilities that I wouldn't consider to be inherently stupid.
>

Jim G.

7/25/2014 5:32:00 PM

0

suzeeq sent the following on 7/24/2014 8:01 PM:
> Jim G. wrote:
>> suzeeq sent the following on 7/24/2014 10:01 AM:
>>> I've read that the difference between a mystery and a thriller is that
>>> in a thriller, the reader/audience knows who did it but the other
>>> characters don't and the plot is how they discover it and what evidence
>>> leads them to it. The show Motive is somewhat like this. With a mystery,
>>> no one knows until the end.
>>
>> Yep. And over time, I've decided that the other significant difference
>> is that the protagonist is in ongoing personal danger in a thriller, and
>> not so much in a mystery.
>
> Yes, that's true too.
>
> And that brings up what you wrote a couple posts back about character
> driven or plot driven shows. You say you like a plot driven story, but
> when there is one, you and others complain about how so and so
> wouldn't/shouldn't do whatever based on previous episode. So really I
> think a good show would be nearly equally plot AND character driven to
> be a good watch. Many soap watchers complain about plot driven
> storylines where the characters do a lot of things that are out of
> character for them. It doesn't have to be predominatly one or the other
> but a good mix, like 60/40.

I still like 80/20. :) But you're right; 100% one or the other would be
worthless. And pretty much impossible. Still, when they *do* introduce
something about a character, I prefer it to be at least remotely
relevant to what's going on. Making Claudia a guitar player on WAREHOUSE
13, for example, was extremely annoying, whereas learning something
about her childhood and how it tied into her current situation was
interesting. In a similar way, all of the flashback stuff on the LOST
characters was really interesting and relevant, so I loved *that* stuff,
too. Ditto the ways that Samantha and "Ahba" drove Mulder and Scully,
respectively, over the years on THE X-FILES.

--
Jim G. | A fan of the good and the bad, but not the mediocre
"Everyone is relevant to someone." -- Harold Finch, PERSON OF INTEREST

Jim G.

7/25/2014 5:37:00 PM

0

David Johnston sent the following on 7/24/2014 9:32 PM:
> On 7/24/2014 3:51 PM, Jim G. wrote:
>> David Johnston sent the following on 7/24/2014 1:21 PM:
>>> On 7/24/2014 12:12 PM, Jim G. wrote:
>>>> Obveeus sent the following on 7/24/2014 11:21 AM:
>>>>>
>>>>>
>>>>> On 7/24/2014 10:47 AM, Arthur Lipscomb wrote:
>>>>>> On 7/23/2014 11:06 PM, Ian J. Ball wrote:
>>>>>
>>>>>>> You're acting like the way they're writing "Extant" is the ONLY
>>>>>>> way you
>>>>>>> can write a show like that.
>>>>>>>
>>>>>>
>>>>>> It is if it's a mystery. You don't start a mystery by revealing
>>>>>> who did
>>>>>> it and why to the audience.
>>>>>>
>>>>>>> Utter bullshit.
>>>>>>>
>>>>>>> And, more to the point, every other show that has tried to write a
>>>>>>> show
>>>>>>> this way has pretty much FAILED.
>>>>>>>
>>>>>>
>>>>>> Perhaps a point of reference would help here. Can you give specific
>>>>>> examples of shows like this that failed?
>>>>>
>>>>> LIFE ON MARS
>>>>> FLASH FORWARD
>>>>> ZERO HOUR
>>>>
>>>> Of those three, I only watched FF and ZH, and neither of those failed
>>>> because they didn't give all of the answers in first episode or two;
>>>> they failed because the answers that were eventually forthcoming were
>>>> really stupid and confusing.
>>>>
>>> I have my doubts as to whether this set up can produce answers that
>>> wouldn't be stupid.
>>
>> I don't. Tampered tapes and computers, drugged astronaut impregnated
>> without her knowledge, etc.
>
> Be we need a non-stupid reason for them to be doing that. I consider
> that a challenge at best.

Could be as simple as basic (and twisted) research on humans in space
prior to taking on a longer mission farther from home. Heck, Mengele et
al didn't need a lot of reasons for what *they* did back in the day...

> There's no shortage of potential answers
>> that are related to humans acting badly. Or it could truly be an ET kind
>> of thing, with or without cooperation from humans acting badly.
>
> Well humans are certainly doing something.

Yep. And it appears that Evil ISEA CEO is in on some of it, but not
*all* of it.

In any case, calls for an end to new mysteries and for just answers
after two eps--because you've been burned by a different show in the
past--is just beyond silly, IMO.

--
Jim G. | A fan of the good and the bad, but not the mediocre
"Everyone is relevant to someone." -- Harold Finch, PERSON OF INTEREST