I'm running PyCharm Professional 5.0.4 and am referring to the feature described in the documentation here.
Upload files to Remote Host. Select this option to have the application files automatically uploaded to the server according to the default server access configuration. For more information, see Configuring Synchronization with a Web Server and Uploading and Downloading Files.
I have set a default Deployment (SFTP) and its mappings, and I can upload and download files via Tools->Deployment.. I have tried with the remote interpreter set to both the Deployment configuration and SSH Credentials.
I've tried every setting that seems to make sense, but "Upload files to Remote Host" never appears as an option in the Before launch section of my Run/Debug Configuration.
2 Answers
Answers 1
You can configure to run an external tool before launch using edit configuration window.
Combining it with this https://winscp.net/eng/docs/guide_automation to make batch file that automates file transfers to ftp or sftp servers, you can automate without using pycharm's automatic deployment feature. And here pycharm waits until the execution of external tool finishes to start the execution of the python script.
Answers 2
I have it auto-uploading when i save the project.
File > Settings > Build/Execution/Deployment > Deployment > Options > then about half way down there's a dropdown to upload changed files automatically to the server either always, on ctrl+s, or never.
In addition to the deployment settings, if you're doing remote interpreting then you'll need to set that up under File > Settings > Project: XXX > Project Interpreter > then click the cog in the top-right and choose Add Remote (Only available in the Pro version if anyone is wondering).
I think that's all you need.
0 comments:
Post a Comment