Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
# b_tempfile.py
here2share
Mar 30th, 2021
(
edited
)
273
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Python
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
# b_tempfile.py
import
os
import
tempfile
fd
,
path
=
tempfile
.
mkstemp
(
)
try
:
with
os
.
fdopen
(
fd
,
'w'
)
as
tmp:
# do stuff with temp file
tmp.
write
(
'stuff'
)
finally
:
os
.
remove
(
path
)
Add Comment
Please,
Sign In
to add comment
Public Pastes
item.py new
Python | 46 min ago | 1.44 KB
app.py new
Python | 47 min ago | 1.11 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 47 min ago | 0.39 KB
Python leetcode 335. Self Crossing Chatgpt
Python | 48 min ago | 0.70 KB
data914
JSON | 57 min ago | 0.64 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 💰
GetText | 1 hour ago | 0.38 KB
Das meist erwartete Event auf GrandRP!
HTML | 1 hour ago | 3.41 KB
Notify Config
Lua | 1 hour ago | 3.79 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!