|
by: Marco Aschwanden |
last post by:
I want to store a file in the application directory. What is the easiest
way to figure out, where my application is situated?
sys.argv does not work for my purposes... do you have any other ideas.
Thanks for any hint,
Marco
|
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 tried to change my homepath in WinXP using set
homepath(in command line), and alsaw using the "Environment Variables"
in WinXP system properties, non...
|
by: kimes |
last post by:
I've just started digging into how python works..
I found that other mudules are clearly declared like one file per a
module..
But the only os.path doesn't have their own file..
ye I know is has actually depending on os like in my case posixpath..
What I'd love to know is..
when I call import os.path..
how happened under the hood?
|
by: Bob Swerdlow |
last post by:
My application is getting this error on Windows XP (works fine on Mac OS X)
when it calls os.path.expanduser:
UnicodeEncodeError: 'ascii' codec can't encode characters in position
52-56: ordinal not in range(128)
The code was built with Python 2.3.4.
I found referenes to Path 957650, but I'm not familiar with how such fixes
are...
|
by: Matt |
last post by:
In test() method:
var path="C:\test\hello.txt"; //returns -1 for path.lastIndexOf("\\").
why??
var pos=path.lastIndexOf("\\"); //return -1
But in showFile() method:
We are able to get the filename. The only difference is test()
hardcode the path,
but in showFile() we gets the path from the file dialog.
|
|
by: Rob Cowie |
last post by:
Hi,
Given a string representing the path to a file, what is the best way to
get at the filename? Does the OS module provide a function to parse the
path? or is it acceptable to split the string using '/' as delimiters
and get the last 'word'. The reason I'm not entirely happy with that
method is that it is platform specific. I would prefer...
|
by: Tony Nelson |
last post by:
On *nix, ~/foo refers to a file in a user's home directory. On
MSWindows, users normally look at "My Documents" in their home
directory. ISTM that a file that my program would put in ~/. on Linux
should be put in "~/My Documents/" (modulo os.path.normpath()) on
MSWindows, where a user would expect it. How do you guys cope with this
issue?...
|
by: Kevin F |
last post by:
where is this code looking for the .imap file? I am on OSX and am not
sure where to put the file it is looking for.
f = open(os.path.expanduser('~/.imap'))
|
by: lampshade |
last post by:
Hello,
I'm having some problems with os.path.isdir I think it is something
simple that I'm overlooking.
#!/usr/bin/python
import os
my_path = os.path.expanduser("~/pictures/")
print my_path
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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: 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...
|