|
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 helped. I really have to fix this somehow.
|
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: 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 to use a built
in method if possible.
Cheers,
|
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?
________________________________________________________________________
TonyN.:' ...
|
|
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: Kevin F |
last post by:
I have a code that opens an .imap file in os.path.expanduser.
Unfortunately, I am on OS X and have no idea where that directory is.
I am wondering how I can change this code to just open the .imap file in
the directory where the code is saved.
f = open(os.path.expanduser('~/.imap'))
|
by: Peter Bienstman |
last post by:
Hi,
I'm trying to add support for unicode file names to my application.
I'm running into problems with e.g. the os.path.exists routine, which
complains if it gets passed a unicode string:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mnemosyne/pyqt_ui/main_dlg.py", line
149, in fileNew
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|