Hi
I am aruni.I have just started to use the python.I tried to import os in my program.but it is giving me an error as "no Module named OS".I thought it as similar to sys.Can anyone tell me an sugesstion.How to use the os in my python program.
6 15092 bvdet 2,851
Recognized Expert Moderator Specialist
Hi
I am aruni.I have just started to use the python.I tried to import os in my program.but it is giving me an error as "no Module named OS".I thought it as similar to sys.Can anyone tell me an sugesstion.How to use the os in my python program.
Python is case-sensitive: - >>> import OS
-
Traceback (most recent call last):
-
File "<interactive input>", line 1, in ?
-
ImportError: No module named OS
-
>>> import os
-
>>> os.getcwd()
-
'C:\\SDS2_7.0\\macro\\macrolib'
-
>>>
Python is case-sensitive: - >>> import OS
-
Traceback (most recent call last):
-
File "<interactive input>", line 1, in ?
-
ImportError: No module named OS
-
>>> import os
-
>>> os.getcwd()
-
'C:\\SDS2_7.0\\macro\\macrolib'
-
>>>
Hi..
Again i am getting error.
what i have to do to avoid this.
bartonc 6,596
Recognized Expert Expert
Hi..
Again i am getting error.
what i have to do to avoid this.
small "os". Not Capital "OS".
small "os". Not Capital "OS".
Hi
For both the os and OS i getting error.when i opened my python exe my first statement is " 'import site' failed; use _v for traceback"
Hi aruni,
Is the issue resolved now?? Im also having same issue
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "path of file", line 51, in ?
import os, os.path, subprocess, pwd, re, socket, string, sys, syslog, time, traceback,rando m
ImportError: No module named os
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Edmond Rusjan |
last post by:
Hi All,
I'd like to use Python-2.3.4 on OSF1 V4.0, but have trouble
installing.
With a plain "./configure; make" build, I cannot import socket.
If I uncomment the socketmodule in Modules/Setup, the build fails.
Using gcc 3.4.2. Had no problem on OSF1 V5.1, Linux and Sun.
Have not been able to find reference to a similar problem in...
|
by: Andrew Dalke |
last post by:
Is there an author index for the new version of the
Python cookbook? As a contributor I got my comp version
delivered today and my ego wanted some gratification.
I couldn't find my entries.
Andrew
dalke@dalkescientific.com
|
by: Sorin Schwimmer |
last post by:
Hi All,
After a disaster in which I lost my whole harddrive,
I decided to install the newest everything that I use.
I put the latest Gentoo Linux, with gcc 4.1.1,
installed
tcl/tk 8.4.14 and tried Python 2.5. I tried with and
without the suggested -fwrapv compiler option, and
make
gave me the same:
|
by: Kurt B. Kaiser |
last post by:
Patch / Bug Summary
___________________
Patches : 342 open (-38) / 3712 closed (+54) / 4054 total (+16)
Bugs : 951 open (-14) / 6588 closed (+33) / 7539 total (+19)
RFE : 257 open (-15) / 266 closed (+13) / 523 total ( -2)
New / Reopened Patches
______________________
|
by: brasse |
last post by:
Hello!
I am having some trouble building Python 2.6 on AIX. The steps I have
taken are:
export PATH=/usr/bin/:/usr/vacpp/bin/
../configure --with-gcc=xlc_r --with-cxx=xlC_r --disable-ipv6
make
This is the error message I'm seeing:
| |
by: Akira Kitada |
last post by:
Hi list,
I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed
to build some of the modules.
"""
Failed to find the necessary bits to build these modules:
_bsddb _sqlite3 _tkinter
gdbm linuxaudiodev spwd
sunaudiodev
|
by: Akira Kitada |
last post by:
Hi Marc-Andre,
Thanks for the suggestion.
I opened a ticket for this issue: http://bugs.python.org/issue4204
Now I understand the state of the multiprocessing module,
but it's too bad to see math, mmap and readline modules, that worked
fine before,
cannot be built anymore.
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |