473,386 Members | 1,790 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,386 software developers and data experts.

Temp dir creation


I'm a bit puzzled by the following behaviour
(at least in the way I read
http://docs.python.org/lib/module-tempfile.html )
python

Python 2.4 (#1, Mar 21 2005, 23:04:52)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import tempfile
tfile = tempfile.mkstemp('','','.')
tfile (3, '/home/local/9qF7kf')

OK, it works as expected, but...
tdir = tempfile.mkdtemp('','','.')
tdir './HFXmX2'

I thought this should be '/home/local/HFXmX2'?
According to the doc page above "mkdtemp() returns
the absolute pathname of the new directory", which
isn't what I get:
os.path.abspath(tdir) '/home/local/HFXmX2'

Workaround I'm using:
import os
tdir = tempfile.mkdtemp('','',os.path.abspath('.'))
tdir '/home/local/5r8gFi'


Comments?

Cheers!

--
ma***@reimeika.ca
Gunnm: Broken Angel http://amv.reimeika.ca
http://reimeika.ca/ http://photo.reimeika.ca
Jul 18 '05 #1
0 1077

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lev | last post by:
Hello, I am attempting to migrate an MSSQL server application to Oracle. This application pulls in data from remote databases into temp tables and then does various joins of that data with local...
0
by: Matthew Fitzpatrick | last post by:
My application has a settings class that is serialized to save and deserialized to load. I'm having a problem where i catch the WM_QUERYENDSESSION event via WinProc to save my application's...
3
by: zfeld | last post by:
My app is creating a word document which my app calls saveas() and saves it to a given directory that is being watched by a fileSystemWatcher. The problem is that the fileSystemEventHandler for...
11
by: cfchou | last post by:
hi, all, i'm reading ch.20 -smart pointers- of . and i'm tring the trule.hpp test. but there's something different than i expect, and i found that's about temp object. so i simplified the...
17
by: Jon Ole Hedne | last post by:
I have worked on this problem some hours now (read many-many...), and I can't solve it: In vba-code I create a table with Connection.Execute, and add some data to it. This table is saved in the...
1
by: Robert McEuen | last post by:
Using Access 97 on WinXP I have data in a DB2 table that I'm trying to get into an identical table in my backend db. Based on volume of data and frequency of download, I'm trying to avoid...
4
by: robert d via AccessMonster.com | last post by:
When my app starts up, it creates a temporary database. This temp database is created from a 'model' database that is in the same folder as the application. Because there is a model, the creation...
9
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
I want to open a text file and format it into a specific line and then apply color to a specific location of the text and then display it in a RichTextBox after all of this is done. I can do all...
0
by: amit | last post by:
The Table tt_local will be created when you execute the procedure. The table does not exist when you compile it. There are two options 1. Create the global temporary table manually Remove the...
3
by: MC | last post by:
I'm developing an application that needs a large (up to 4 GB) amount of temporary file space on a local (not network-attached) disk. What are some good tactics to use in a C# program to make sure...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.