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

Re: Connecting to SMB share in python

Ronnie Kwok wrote:
Hello,

I am trying to write a script that copy files from my local machine to a samba
share.

Can't you just mount the share (albeit temporarily) and copy
the files over in the normal way? You haven't said what OS
you're on, but I'm assuming Linux otherwise you'd simply be
talking about a Windows share and copying to a UNC.

TJG
Sep 25 '08 #1
3 2701
Thank you for the reply!

Yes, I am running the script under linux and it will be doing some
processing before copying it over to the samba mount.

It's totally fine to mount it with os.sys(...) approach but I am just
thinking if there's other option.

ronnie
On 2008-09-25 16:36:35 +0800, Tim Golden <ma**@timgolden.me.uksaid:
Ronnie Kwok wrote:
>Hello,

I am trying to write a script that copy files from my local machine to a samba
share.


Can't you just mount the share (albeit temporarily) and copy
the files over in the normal way? You haven't said what OS
you're on, but I'm assuming Linux otherwise you'd simply be
talking about a Windows share and copying to a UNC.

TJG

Sep 25 '08 #2
Ronnie Kwok wrote:
Thank you for the reply!

Yes, I am running the script under linux and it will be doing some
processing before copying it over to the samba mount.

It's totally fine to mount it with os.sys(...) approach but I am just
thinking if there's other option.
None that is any more comfortable. If anything, you'd need smbclient or some
such to list and fetch data - which is *much* more complicated that simply
mounting a share defined in fstab.

Diez
Sep 25 '08 #3
Ronnie Kwok wrote:
Yes, I am running the script under linux and it will be doing some
processing before copying it over to the samba mount.

It's totally fine to mount it with os.sys(...) approach but I am just
thinking if there's other option.

I'm not really a Linux person but from all I can see
from Googling around a bit, the os.system ("mount/unmount")
option is still the most viable. Hopefully someone with
real expertise can chip in.

BTW, opinion in this ng/mailing list tends to favour
bottom-posting or interleaved posting.

TJG
Sep 25 '08 #4

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

Similar topics

1
by: Dishaa V | last post by:
Hello I need to connect to an access db which is on the internet. I do know that URL of the same. its http://www.vallury.com/balance/bank.mdb. Its just a test db. How can I connect to that db...
1
by: Dishaa V | last post by:
Hello I need to connect to an access db which is on the internet. I do know that URL of the same. its http://www.vallury.com/balance/bank.mdb. Its just a test db. How can I connect to that db...
4
by: Matt Dockerty | last post by:
Hi, I'm trying to connect to a network share using a username / password / domain of my choosing. I've tried the WindowsIdentity.Impersonate route but can only impersonate the users on the...
0
by: nathanious | last post by:
Hello guys(and gals) It has come upon me to alter an existing application to connect to another server in addition to the one it is currently and write data there. The thing is that the new...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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,...
0
tracyyun
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...

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.