473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How do I set paths in Python?

Hi, I'm quite new to this Python scripting. I was following this pretty neat tutorial about scripting, then came the "I will not show you how to set the path, but ask someone and make sure they know what they're doing."
I know NOBODY that knows what PI is, and I'm trying to start programming.
I searched the internet, (Who the [moderator delete explitive] doesn't) and found NOTHING about setting paths.

I really need help, for as I just had a birthday (13 years old), am the youngest [and smartest] person in my family, and.. well... I'm the smartest in my family (Hmm again, I'm 13 years old...)
Apr 20 '07 #1
3 1305
ghostdog74
511 Expert 256MB
what paths are you talking about? the path of your directories and files? or the path of the python libraries? to see the paths which python will search for its libraries, use sys.path
Expand|Select|Wrap|Line Numbers
  1. >>> import sys
  2. >>> sys.path
  3.  
Apr 20 '07 #2
Umm, I don't really know.
Apr 20 '07 #3
bartonc
6,596 Expert 4TB
Hi, I'm quite new to this Python scripting. I was following this pretty neat tutorial about scripting, then came the "I will not show you how to set the path, but ask someone and make sure they know what they're doing."
I know NOBODY that knows what PI is, and I'm trying to start programming.
I searched the internet, (Who the [moderator delete explitive] doesn't) and found NOTHING about setting paths.

I really need help, for as I just had a birthday (13 years old), am the youngest [and smartest] person in my family, and.. well... I'm the smartest in my family (Hmm again, I'm 13 years old...)
Ok mister "youngest and smartest". First of all, watch the language.
Secondly, I'm pretty sure that you are talking about the PATH variable in you Windows system. There is a guy (who's web site is NOT for the faint of heart) who wrote a very cool utility for looking at and setting ENVIRONMENT VARIABLES (PATH is one of those). google "windows environment variable editor"; it's the first hit you'll get.
Apr 20 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Noah | last post by:
Does anyone have a function to convert back and forth between NT style paths and POSIX style? It seems trivial, but I want to make sure I don't overlook some obscure detail. Is it a simple matter...
2
by: Read Roberts | last post by:
I have the current Windows binary install of Python 2.3.4 on my Windows XP system. I am pained to discover that tkFileDialog.askdirectory() returns a mangled path when a directory is selected...
9
by: Amir Dekel | last post by:
Hi everyone, I have two problems: 1. How can I keep my changes in sys.path after closing the interpreter? 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have...
2
by: Shaun | last post by:
Hello! I can't seem to get paths and variables working together: import os a = 'books' os.chdir( '/test') os.mkdir("/test/"a) the last line does not seem to work. os.mkdir(a) makes the...
6
by: David Siroky | last post by:
Hi! When I "compile" my python files with "python -OO ...." into pyo files then they still contain absolute paths of the source files which is undesirable for me. How can I deal with that? ...
7
by: Steve M | last post by:
I'm trying to invoke a Java command-line program from my Python program on Windows XP. I cannot get the paths in one of the arguments to work right. The instructions for the program describe the...
14
by: Xah Lee | last post by:
is there a way to condense the following loop into one line? # -*- coding: utf-8 -*- # python import re, os.path imgPaths= # change the image path to the full sized image, if it exists
0
by: djbclark | last post by:
Is there a clean way to build Python under a non-traditional path, linking with other software that is under non-traditional paths, on unix? I maintain a build of Python that is part of a...
5
by: antar2 | last post by:
Hello, I would like to read and print files, of which the complete filepaths are mentioned in another textfile. In this textfile (list.txt) are for example the following paths: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.