Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am learning with an online interpreter and would like to save bits of code in my Google drive. Is there a good way to do this so I can easily copy and paste my work back into a webpage. If there is a better way to save it that isn't in the cloud I would be interested in that as well.
The best way is with a version control system, for example git or mercurial are popular choices for python users.
You can then host your code for free on github or bitbucket, amongst other services.
If you download or have a text editor ( something like Sublime text ) you can paste it into that, put in the syntax you are using so your code is highlighted. Save it via that. However if you want something online, use github or for simplicity dropbox.
If you'd like to use Google Drive, just save your .py files and drop them into Google Drive. Then you can edit using the ShiftEdit extension (https://shiftedit.net/). But Github Gists or a similar product is better.
If you would like to use a VCS, you could use git with GitLab. Just head over to http://www.gitlab.com and create your personal account, and have unlimited private repositories.
Something like gist.github.com or jsfiddle.net whould work, though they're both "cloudish". You could always create a local directory and use git or hg or some other distributed version control system to manage your code. That would be a good learning experience too.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
What are the pros and cons of using Rails but using python scripts for all kinds of operations, including ML (hosting on heroku)? I like Rails, but if Django would be better long-term, I'm willing to switch to that.
I'm hoping that by framing this question as "pros and cons," this fits more into stack overflow norm... if not, I'm sorry. I'd really appreciate help though.
I like rails, but...
What do you like about rails? Rails is great, but what does it offer that Django does not? It's quite common to have multiple languages in one project, multiple languages are complied to the same code. There are libraries like 'rupy' that make it a simple thing to do, if you are more comfortable with rails than django then there is a use case to consider the proposed approach. There are some issues in general, the main will be around what is 'best' architecturally.
In regard to any possible cons, let's try to explore any that may come up when modelling a real-world example:
def init_py_script
parsed_output = JSON.parse(`cat #{file.path} | python3 lib/some_python_script.py`)
end
Why did the author chose to do this? In our model, let's say they outsourced the work the python code is doing due to not understanding how to complete the task in ruby. Maybe they did not have the bandwidth to learn how to do this in ruby and could only find a python developer who could complete the work.
Which is fine, but there some issues here. [Note these issues may/may not apply to you]:
The user has to install different dependencies on their server in order to run both languages, which takes time to understand and debug.
If the outsourced coder uploads the code to another repository; most deployment scripts won't be able to deploy the submodule code and there is manual intervention required.
Maintaining multiple languages on a server is not easy and when upgrading packages, which may cause issues such as having to install multiple 'libssl-dev' packages, which creates more ongoing work.
Ruby and rails is classically driven by TDD. If you solely rely on unit tests, there will be no issue. If you like to incorporate integration tests, it will be much harder to get full coverage.
When writing code, the author should be conscientious of the reader and reducing the cognitive load of future readers and developers to understand what applications are doing. You'll restrict the amount of developers who can work on the entire project going forward if you include more languages as they will have to understand both languages. This may not be an issue if they are working on one small component of the application.
TLDR: It's OK for small projects. Using multiple languages causes infrastructure issues by likely cause version conflicts in the future. Upgrading will likely be more difficult. If you have good documentation and tests, the development of code should remain unaffected.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am a software architect with 23 years commercial experience in C++/C#/Python/Cython. I was forced into using VSCode rather than PyCharm becasue I had to debug some particularly tricky Django templates. I use several machines, one of which is a production test machine. I changed 1 line of code while logged on there and pushed it because it was critical. Now my Git is totally screwed. I have have worked with sourcesafe and clearcase over the years, and I do not have a problem with Git however VSCode has rendered my setup useless.
I now have to save log data on my production test box, wipe the prod folder and reinstall all the code from scratch from Git. This is about a day's work and should not be necessary.
I was warming to VSCode but I will change the way I work until VSCode/Git integration is improved enormously. I will code using VSCode but at any point I want to pull, push, fetch or merge, I will switch to the community edition of PyCharm. PyCharm handles source control like a dream but I don't want to do my day-to-day development with it.
Anybody else out there having similar problems? I simply don't have the time to write a VSCode extension to handle Git properly. I have an end-of-Septemebr deadline and I simply can't have this happen again.
Any feedback is most welcome.
/Luke
For the most part, I just use command line git integration.
However, for large projects or for particularly tricky merge conflicts or other problems, you could use third party git clients such as Source Tree (what I use) or GitKraken. These offer a host of features with nice interfaces.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am developing a program to use as a pedagogical tool in my classroom. I'm writing currently writing it in Python, but I'm also open to solutions that would use C. I want to create a standalone application for Mac (.app file) for my program, but I only need text-based interaction with the users (i.e. just STDIN/STDOUT, and not a GUI). The majority of my students do not have python installed and have no experience with Terminal/shell scripting.
I tried using Platypus to create this application, but I get an error, as shown below.
I later realized that Platypus does not support prompts for user-input. Is there anything like Platypus that would also allow me to prompt users for input?
As I say, I'm also open to solutions to my problem which would involve transposing my Python code into C and going from there.
I don't know if you have thinking about make a web app, in Google App Engine for example is very simple to deploy a Python based web app really fast, using webapp2 for example. And all your students could use your app online, this is a good getting started. But if you want maybe you could to build a command line app deployed in some server and your students could connect with ssh to use it.
It depends what kind of systems your students have and it is highly unlikely that they will have similar kind of system. For least dependency i think you can use java to write your application. For java they just need to install jdk and can run your shared jar.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm trying to transfer from using PHP to Python, Im looking to change to Python as it seems a much more versatile language able to work across a range of scenarios. The sort of things i plan to use it for range from web app development (using django), NLP, machine learning and automation using mechanize.
One of the things I really liked about PHP was MAMP, the way it creates an htdocs folder, a localhost:8888 url, and a MySQL server, with pretty much 0 effort.
Is there something similar with Python ? I'm not necessarily looking for a GUI like MAMP (although that would be good) - what are the other options for setting up a local environment?
Python excels in this area, but as with most tools exactly what you do depends on what you want. In particular, you certainly want virtualenv, Python's configuration and dependency -isolation tool.
You may also want a development-configuration management tool such as buildout, but that is more controversial as there are many other great, language-agnostic tools that overlap. (For example, you may want to set up your environment using Vagrant and leave your host OS behind.)
Neither virtualenv nor buildout will set up Apache for you OotB, but you do have the option of installing django, zope, or many other Python frameworks and applications with buildout recipes. There are recipes for apache too, but most Python web development that I know of is agnostic of the httpd, so you might end up not wanting it.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
There are two python packages exist for jenkins remote access API, I need help to compare those two packages, so I can judge which to use.
python-jenkins http://pythonhosted.org/python-jenkins/
JenkinsAPI: http://pythonhosted.org/jenkinsapi/
So far for my thoughts:
python-jenkins is quite simple interface and is part of new Ubuntu release, which means easy to use, mature enough for general usage.
JenkinsAPI is mentioned in Jenkins official document, it looks new, but it is more connected with jenkins API development as well.
What I needed so far:
https access and simple authentication (token inside jenkins) : document is not clear both
get list of installed plugins (possible for those packages ?)
get list of jobs
get config xml from job
.. may needed for other exposed remote Access API later
I want to stick with python API in high level module, if possible, avoid to use python-requests module
Any more ideas ?
EDIT refine the questions after the comments below
Given that both seem to have more or less the basic features and that JenkinsAPI is
mentioned by the official documentation
more active (jenkins-python history vs jenkinsapi history)
I would go for jenkinsapi.
As for token support, given the documentation, the fact that the code uses token in place of passwords for the API and is backward compatible with basic auth, I would say that any client that supports passwords will support tokens.