On Wed, Jun 19, 2013 at 3:15 PM, Hélio Miranda <helio...@gmail.com> wrote:

> I was trying this:
> *if os.name == 'nt':*
> *    sys.path.append('c:/Projectos/Test/') # Windows*
> *else:*
> *    sys.path.append('/srv/django/OnPitch/') # other (unix)*
>
> doing so, looking at the link that you send will not give
> *if sys.platform('win32'):*
> *    sys.path.append('c:/Projectos/Test/') # Windows*
> *else:*
> *    sys.path.append('/srv/django/OnPitch/') # other (unix)*
>

Both sys.platform and os.name are variables, not functions.
 sys.platform('win32') should be sys.platform == 'win32'

As the documentation says, os.name is another way to distinguish the OS,
but os.name is more coarse.  Use whichever suits you best.


> *
> *
> which is correct?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic." -- Frank Herbert

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to