Does Pycharm limit the number of projects it can hold? [duplicate] - python

This question already has an answer here:
How to prevent a new project from being linked to the primary project automatically?
(1 answer)
Closed 1 year ago.
I was looking through my pycharm projects, and noticed that 2 are not there, looked through all my IDE versions, not there. now I am 100%sure that I did the projects, so my question is does pycharm have a set limit of projects it can hold? I have noticed that when I tried to create a new project with the amount of projects I already have, that pycharm appeared slow to load the new project window, or sometimes did not load at all, I had to create the project several times for it to register.
Hope yall can answer this

The slow performance may be due to numerous tasks hogging CPU/memory resources or perhaps PyCharm memory heap size. You can read more from about adjusting memory heap size here:
https://www.jetbrains.com/help/pycharm/increasing-memory-heap.html
As for missing projects, perhaps you saved them in a different directory by mistake?
It's relatively easy to make that mistake when first setting up a project.
https://www.jetbrains.com/help/pycharm/creating-empty-project.html

Related

Simulating XBox controller inputs in python

I'm currently working on a project that requires a simulated XBox controller, I have done a lot of research but have not been able to find anything other than this, but it only appears to run on Windows 7 (I am currently running 10) (Even the PowerShell script that someone from the community has created for windows 10 does not appear to function). I was just wondering if anyone knew of a newer similar idea? This post is a similar question but again from 5 years ago and none of the methods in the accepted answer appear to work at the moment.
Current issues and requirements:
Attempting to run the PS script gives this error:
The main requirement / only is that it is able to dynamically change he stick values (ie not just left, right, up and down but varying amounts of each) and the same for both triggers.

What is the best way to share a python application with someone who isn't a dev [duplicate]

This question already has answers here:
How can I run a Python project on another computer without installing anything on it?
(6 answers)
Closed 9 months ago.
Problem:
I need to send someone (who has little to no computer knowledge) a python program, but I don't even know if he has python installed let alone all the dependencies.
Question:
Assuming he doesn't have python, how should I go about sending the application so that It is as straightforward as possible for him?
What I've tried:
Initially, I thought of using venv and sending him the whole thing, but there has got to be a better solution, as my code only uses two of the built-in libraries.
In my research, I came across Docker, but I think he would need to have that installed. I also saw pipenv but it wouldn't work without python on his PC.
You have multiple ways to do so:
Create an executable file, which is quite a long process but can be useful is you project contains a lot of files and multiple dependencies
Send them the python code (I recommend it if your project fits in one .py file). The person will need to install python and possibly a few pip libraires, but it's not extremely complicated in my opinion, with clear instructions.
Finally, you can go on repl.it and create a repl, which is simply a way to execute code on your browser. I think this is the best option for both large and small projects, except if it contains a lot of odd dependencies, and I'm not sure if repl.it supports graphical interfaces either. Anyway, you should take a look, it might be perfectly fit your needs

How to ensure my software is not easy to pirate [duplicate]

This question already has answers here:
How do I protect Python code from being read by users?
(29 answers)
Closed 3 years ago.
I want to make my python program less pirateable. I know it's fruitless to make it entirely secure, but I want it to be at least somewhat easier than copying copying the installer and throwing it on piratebay.
I've looked into verifying the MAC address of the user, but that either requires them to run the software first, or to give me their MAC address to get the software.
I've also looked into spreading out the files after installation, but once again that only works if they don't just copy the installer
It's python, so it's not going to be hard to reverse engineer, and it's a desktop application, so it's going to be pirated. But a tiny amount of security will prevent the average user from just pirating it I hope.
The only secure way to prevent piracy is to make a crucial portion of your software server-side, and require that the user be connected to the Internet when running your software.

Using multiple development environments on the same OSX machine? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have recently got a new Mac (2015 MBP with 8gb ram) and I am trying to set up a development environment using 5 different stacks at the same time.
I've previously used a LAMP set up very similar to this - many of my old (client) projects are still based on a PHP MVC framework which uses Foundation and Libsass. While I don't want to make new projects in this way as I want to learn more, I still need to be able to maintain these other projects quickly and easily.
I then had some data projects in Python / Django. On my old mac I used a linux VM through Virtual Box for this (I don't yet own parallels etc).
I've also trying to learn to use the MEAN stack using gulp, browserify and playing around with React JS, as well as Meteor (which has it's own server too) and Ruby on Rails - and I want to do more development with these, but without losing the ability to work on my other projects.
My problem is that whenever I previously switched to using MEAN or Rails, I messed up my file watching / auto compiling for LAMP and Python and it took me ages to switch back. I really like how browserify works - e.g. to auto compile sass files / minify, and auto refresh the page, but I've hit problems with keeping my python server and lamp set up doing the same. I'm clearly doing something wrong and I'm keen to set this up properly with a clean install. All the tutorials I can find online refer to setting up individual stack environments, but I can't find much which refers to setting them up together.
I've decided that running a separate VM for each different stack would knock performance too much, and there are some things which I'd want to use on more than one stack like homebrew.
As such, my question is what are the specific advantages of using something like docker to keep things separate vs finding a way using something like homebrew to set up everything together on a single OS?
I'm aware file watching isn't so easy on docker with virtualbox - but I'm not sure whether to push through and find a work around or to use another way.
Thanks so much - I've been stuck on this for ages. I'm sorry if my question isn't very clear - I'm new to using node / meteor and ruby so I'm not sure the best place to start!
In my humble opinion the best solution by far is to use Vagrant. It's also free.
Not only that you can have a different environment for each project, but you can also script all the custom installations and configurations. You, or a colleague of yours, will be able to replicate the environment with a simple command, vagrant up.
A popular guide for setting up Vagrant for RoR development can be found here. However, contrary to that guide, I gave up using Chef in favor of a simple provision script. A guide can be found here.
Make sure to enable NFS though, else VirtualBox (Vagrant sits on top of it) will be quite slow.
While solutions like Cloud9 or Koding are surely useful for when you do not have access to your development machine, I wouldn't use them for day to day work.

Best practice for reusing python code [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have write a python library app(which contains several *.py files). And several of my python projects need to reuse the code in the library app. What's the recommended best practice for reusing python code? Currently I have thought out three options:
Copy and paste. This is far away from best practice. It violates the
DRY principle.(Don't repeat yourself.)
Add the folder of the library app to the environment variable PYTHONPATH: export PYTHONPATH=/path/to/library/app. Then every projects on the same computer can reference the code in the library app.
And the folder of the library app to sys.path in python code: sys.path.append('/path/to/library/app')
Among the three options above which one do you prefer? What advantage does it have compared to the other two options? Do you have any other better options? It is much appreciated that if some one with years of python development experiences could answer this question.
Allow me to propose a fourth alternative: take the time to learn how to package your library and install it in your site-packages; it's easier than one may think and I'm convinced it's time well spent. This is a very good starting point: https://packaging.python.org/en/latest/
Of your three options, PYTHONPATH is the way to go. Copy & paste is clearly out, and adding code to your other projects to modify sys.path simply pollutes those files with knowledge about their environment.
A fourth option is, create a true installable package from your common code, and install it into your Python installation. Then you can simply import those modules like any other 3rd-party install code.
If its a shared library you should package it up and add it to site-packages and then you wont have to worry about setting anything up. This is the best option.
If you dont want to use site-packages, then use PYTHONPATH. Its why it exists, and it is the way to do what you want.
You might want to look into using site.addsitedir, path.append does not prevent duplicates. It will also allow you to leverage .pth files.
Dynamically setting/adding things to PYTHONPATH via sys.path achieves the same result, but it can complicate things if you choose to reuse your new library. It also causes issues if your paths change, you have to change code versus an environment variable. Unless it is completely necessary, you should not dynamically setup your python path.
Copy & Paste is not a re-use pattern. You aren't reusing anything you are duplicating and increasing maintenance.
The first way is, as you noted yourself, hardly acceptable as it has countless well-known problems.
The other two have their own problems. For starters, they require manual work when files move (particular bad if you mix it with the application logic, i.e. put it in *.py files instead of leaving it to the computer it runs on) and requires either fixed installation locations (absolute paths) or at least a certain directory structure (relative paths). IMHO, these ways are only acceptable if the applications aren't ever going to move anywhere else. As soon as that becomes required, you should give up and use the existing solution as the one reason not to use it, being overkill for small and local scripts, doesn't apply any more:
Make the common parts, which you apparently already treat as a free-standing library (good!), a fully-fledged project in its own right, with a setup.py that allows installing and adding to PYTHONPATH in a cross-platform way with a single command. You don't need to actually publish it at PyPI, but it makes doing so easier if you should change your mind in the future. Should you do so and also publish some of your projects on PyPI, you also made installing the project in question and its dependencies easier for every potential user.

Categories

Resources