netbeans 7.1 and python - python

I used to use my Netbeans 6.9 for Python development. As well as Java and PHP. I had a cool debugger in PHP with xDebug, good Python support. Have no complaints whatsoever. I moved to another computer downloaded the latest netbeans(7.1) and now I have no more python plugin. I tried the solution here but this caused NetBeans not to start at all after the loading splash screen is finished NetBeans crashes.
Is there any way I can still code in Python with netbeans?
Thank you in advance

Ok, I fixed this. Say you've screwed up your netbeans installation by installing the pythonplugin then this might just work for you, provided you're using a non-windows OS. This is because Windows uses precompiled binaries to start the Netbeans IDE.
The problem that I solved is that, by default, a set of classes is not added to the Java classpath, which results in a crash. You can find whether this is also your problem by inspecting .netbeans//var/log/messages. If it displays some ClassNotFoundExceptions then we might have the same problem. If not, then at least you've got some pointers on what's going wrong and perhaps you might come up with some solution yourself. ;)
The java classpath is constructed in the file:
/<path>/<to>/<your>/<netbeans>/<installation>/platform/lib/nbexec
On OSX, this could be:
/Applications/NetBeans/NetBeans 7.1.app/Contents/Resources/NetBeans/platform/lib
In the main loop the function construct_classpath is called, which in turn calls the function build_classpath for two directories. I changed the function to this:
build_cp() {
base="$1"
append_jars_to_cp "${base}/lib/patches" "patches"
append_jars_to_cp "${base}/lib" "lib"
append_jars_to_cp "${base}/lib/locale" "locale"
# Added by me:
append_jars_to_cp "${base}/modules/ext" "ext"
}
After that modification, start your IDE and everything should work fine. Good luck!

The Solution for this problem could be found here
http://sahanlm.blogspot.com/2012/12/netbeans-7-2-crash-on-start.html

I am currently using the developer plugins on Netbeans 7.0.1 with no problem. Maybe they simply aren't compatible with the new version yet. I'd suggest just getting a 7.0 and using that.

Add org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar at
C:\Program Files\NetBeans 7.1.1\platform\lib\locale. Start NetBeans, remove the plugin or the reference with problem, later on, delete org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar

Please see the following link. It works for me:
http://wiki.netbeans.org/PythonInstall

Currently your NetBeans/Python choices are:
Try the latest development build updates against your current NetBeans version and mess with breakage at times as noted on the PythonInstall NetBeans wiki page or the link you gave.
Install the latest development version, but realize it's not a stable public release.
Wait for someone in the community to step up with continued development to keep the existing plugin in step with the latest public NetBeans release.
Install the NetBeans 6.9 (or older) version you were using with no complaints just for Python work.
I have had success with older versions and the development build. I am dabbling with other Python aware IDEs while I wait for main stream support, but I've stopped holding my breath.

If you can't change nbexec, like suggested by Bas Jacobs (e.g. on Windows), or don't want to do that, you can use the --cp:p startup parameter to append the necessary JARs to the classpath.
I only had to add the org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar file, so the complete command line under windows now looks like this:
"C:\Program Files\NetBeans 7.1\bin\netbeans.exe" --cp:a C:\\Users\\_YOUR_USERNAME_\\.netbeans\7.1\modules\ext\org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar

Related

How to setup NetBeans IDE for Python Development

I was using PyDev plugin in eclipse for developing python. But now I switched to NetBeans IDE 12.6 and I searched google for finding python plugins for NetBeans. I found a plugin called nbpython.
But it is for NetBeans 8.1 and I am using NetBeans 12.6. So is there any plugin for NetBeans IDE 12.6 for developing Python Projects. Or does nbpython work in my version?
There is no official plugin for 12.x yet. If you read on the mailing list you can see that a re-implementation of the Python support was discussed but nothing has been implemented yet.
Update: I just installed Netbeans IDE v 13. I had since long time ago the Python/Jython/PERL modules for Netbeans 8.xx Which worked for a long time. For IDE v 13 I added them via the usual method, "Tools -> Plugins -> Downloaded -> Add Plugins", and it looks like they work fine! Therefore their compatibility with Apache Netbeans is very high. The problem is with the links of nbpython, they look broken & discontinued. If one has the old modules posted somewhere, then I guess you can pick those up and feel lucky. If not, you need to find them somehow, or wait for the python project to be re-implemented. The modules I have are described below. Hope this helps:
org-netbeans-modules-python-hints.nbm
org-netbeans-modules-python-kit.nbm
org-netbeans-modules-python-options.nbm
org-netbeans-modules-python-platform.nbm
org-netbeans-modules-python-project.nbm
org-netbeans-modules-python-project2.nbm
org-netbeans-modules-python-samples.nbm
org-netbeans-modules-python-source.nbm
org-netbeans-modules-python-testrunner.nbm org-jython.nbm
org-jython-distro.nbm org-netbeans-modules-python-console.nbm
org-netbeans-modules-python-core.nbm
org-netbeans-modules-python-debugger.nbm
org-netbeans-modules-python-editor.nbm
org-netbeans-modules-python-help.nbm

What versions of Python will work in Windows XP?

I would like the most advanced version of Python that still works on Windows XP. I need both Python 2 and Python 3.
What versions of Python will work on Windows XP?
I found that Python 2.7.9 and Python 3.4.4 are the newest versions of Python that work in Windows XP. I found this out through trial and error.
I've found a desperate guy (Daniel Pistelli) who didn't give up at the windows error dialog:
https://ntcore.com/?p=458
I like how he approaches the topic:
If we try to start any new application on XP, we’ll get an error
message informing us that it is not a valid Win32 application. This
happens because of some fields in the Optional Header of the Portable
Executable.
[...]
Fortunately, it’s enough to adjust the fields in the executable we want to start (python.exe), there’s no need to adjust the DLLs as well. If we try run the application now, we’ll get an error message due to a missing API in kernel32. So let’s turn our attention to the imports.
And then he goes on for another 5-6 screens. To sum it up, apparently you'll have to:
Modify the python.exe header,
Run a tiny Python script to remap some DLL calls,
Recalculate some binary hashes,
Create a fake kernel32.dll with certain calls forwarded,
Modify python37.dll to point to this fake thing,
and then you're all set. To be honest I couldn't quite follow (let alone verify!) some of the steps but it looks legit and there are links with Daniel's half-baked solutions for the harder parts, also a lot of Python sources explained. I will definitely give this thing a try.
In fact, here are the final scripts from his GitHub page:
https://github.com/dpistelli/xptmrt
Moral of the story: you can be crazy, but you'll never be dismantle-all-dlls-and-exes-and-open-hexeditors-and-disassemble-hashing-algorithms-and-mock-it-all-together-so-it-works-under-xp-crazy!
Someone had built Python 3.4.10, which is slightly newer than the officially prescribed Python3 v3.4.3/3.4.4 for Windows XP. Since it comes from the third-party (not the official Python website), use at your own risk,
-->Download<--
i tried 3.3.3 but i came up with an error message use 3.4.3/2.7.9 they are the only versions that work now sadly
There are several custom builds of Python >3.44 suitable for Windows XP. A poster at reddit has provided Python 3.55 here:
https://www.reddit.com/r/Python/comments/3tgi0t/python_35_x86_on_windows_xp/
Here is an XP compatible build of 3.6.15 source code only:
https://alex-free.github.io/winxp_python3.6.15/
At the MSFN forums someone has provided an XP compatible build of 3.8.1350 here:
https://msfn.org/board/topic/183741-python-3813-for-windows-xp-sp3/
Official website says about 3.4.10: https://www.python.org/downloads/release/python-3410/
Any of them, python is very platform independent. Some features might not work, but that would best be found in the documentation.

Python3/MacOSX integration into pycharm

I have had trouble setting up the pycharm ide on my macosx10.7 with python3..
I have scoured every resource available and tried hundreds of approaches, at this point I must accept my incompetence and seek help via this channel.
In my research, I notice a lack of ground-up explanations on python integration into macosx and how to configure pycharm to import modules, run code within the editor, etc. If i ever solve this I will make a very detailed tutorial.
I have imported python3 successfully, it looks like it is linked appropriately from /sys/lib/frameworks to /usr/lib ...etc -- version control is working just fine.
I think my issue is either in setting environmental variables (tried the program to fix this and tried macports) and in the script needed to execute. it will catch errors throughout but final product does not run in python and returns printout of :
/Library/Frameworks/Python.framework/Versions/3.2/bin/python3.2 /Users/anon/Desktop/pythonpractice/Py_Ex/classes.py
Process finished with exit code 0
i really need to get this configuration sound for my python programming class. please help (I've been through every line of pycharm website) .. preferably is there a way to map it via terminal? thanks for anyone who took the time to read this.
Summary of the discussion above:
Python 3.2.2 installation was broken on this Mac, installing ActiveState Python 3.2.2 from scratch and configuring it in PyCharm has fixed the problem.
Python path to be used in PyCharm settings: /Library/Frameworks/Python.framework/Versions/3.2/bin/python3
Incompatible third-party plug-ins may break PyCharm, uninstall/disable them in Preferences | Plugins.
Ensure the latest PyCharm version is installed.
User's code depends on the graphics.py module which was not in the project or in the PYTHONPATH. Putting it into the project has solved the problem.
Most likely the wrong Run/Debug configuration was used in PyCharm, the easiest way to run or debug such scripts is by using the editor context menu Run and Debug actions. PyCharm creates the configuration automatically and debugging works fine as shown of the screenshot:
If one wants to configure and debug it, he can use the code.zip file to get started.
Sorry for the comments mess above, but it was not possible to move it into chat as user had only 1 reputation point, hence not able to use the chat feature of StackOverflow.

best version control system for personal/home use when developing with eclipse and python/django

I am working on a small django project at home. I would like to install and use a small version control system for personal use for free. I don't want to use a web service like github because I am not always connected. I would like to have the VCS server/daemon installed and use it at my home pc (windows 7).
I would also like it to be compatible with eclipse+pydev which I use for programming.
Any help would be greatly appreciated!
Thanks,
Chris
GIT is built in a way that you can use it 'offline': doing commit, reverting change, browsing history.
I don't see any advantage in your case to use SVN instead of GIT (you can host your own GIT server, no need to use github.com)
http://book.git-scm.com/4_setting_up_a_public_repository.html
There are also GIT alternatives for distributed SCM:
Mercurial
Bazaar
BTW, for my personal prototype DropBox is sufficient ;)
I suggest using mercurial with a Bitbucket private repository. Mercurial will work just fine when you're offline, and you can push your changes to Bitbucket to access your code elsewhere (your laptop, server, etc.) later.
There's also mercurial plugins for eclipse. (see Mercurial Eclipse Plugin)
I would recommend to use Mercurial together with DropBox in order to make sure that you don't lose everything in case of crash.
See http://www.h4ck3r.net/2010/05/11/mercurial-hg-with-dropbox/
I hope it helps
For personal version control, I would recomend the following:
FileHamster
Oops! Backup
FolderTrack
Note: I am an author of FolderTrack. I recomend it for use with programming because it will treat a group of source files as one "work product". If you want to rewind your code to yesterday and that requires deleting 2 files, renameing 1 file, and chaning 15 more then foldertrack will do it.
The free license for Foldertrack is: BOS
SVN has Eclipse plugins (Subclipse, Subversive), I don't know for pydev though. But it is one of the most used version control system and it is free.
If it is for personal use, thus you probably don't have to go with distributed vcs, I would definitely go with subversion (svn). It has nice plugin for eclipse: subversive. I'm using it for years.
http://subversion.apache.org/
for eclipse:
http://www.polarion.com/products/svn/subversive.php

How to get started with a bare-bones Eclipse + PyDev

I am planning to move from SPE to Eclipse + PyDev for better code completion. I think SPE's code completion is rather weird.
Anyway, how should I get started with Eclipse + PyDev? I browsed http://www.eclipse.org and I found that Eclipse is made up of some base/core system and plugins are added for more functionality. I also stumbled upon http://www.easyeclipse.org which offers a ready-to-use Eclipse + PyDev distribution.
I have two options: the easy way and the hard way.
EASY WAY
Just download from http://www.easyeclipse.org. Problem is, I can't decide which version to use, v1.2.2.2 or v1.3.1?
HARD WAY
I want to keep a lean Eclipse installation, so I want to start out with a bare-bones download, then add plug-ins as I advance in skill. As of the moment, all I want in an IDE is the following:
Proper code completion, and
An easy shortcut key to run the current program. It should be something like F5 or F9.
Eventually, I will want to use more advanced tools, but I want to add plug-ins when I need or want to learn them:
Debugging
Unit testing
Version control
What plug-ins should I install to get the specific features I just mentioned?
The leanest Eclipse installation is the Platform Runtime Binary at around 50MB (look for it in the middle of the page). Install it and then once in eclipse go to Help->Install New Software... and use http://pydev.org/updates as link to install PyDev and you are done. Not very hard at all.
I've never really used the PyDev with Eclipse, but Eclipse comes with shortcut keys - you can change them to whatever suits you. If you install the standard version of Eclipse (which isn't exactly "lean", you know) with PyDev, you should have debugging built in. You can get Eclipse plugins for virtually any VCS you like, whether that's git or bazaar, subversion or CVS. Just check out the list.
edit: and it doesn't look like there's any reason not to use the newest stable version of Easyclipse, if that's what you decide.
I have used EasyEclipse for a while, but though less errors and incompatibilities occurred than in the standard version at that time, I didn't like that some modules were either too old or not supported at all. Meanwhile the standard distribution is stable enough.
Debugging and unit testing are integrated in PyDev. You must configure the Python interpreter in the preferences, "Auto config" should do, then choose "Run as..." "Python unit-test" on a Python module, and for debugging see the "Run" menu. Version control depends on what you use, I think CVS is already integrated, but I use Subversion, and for that you need to install the Subversive plugin (meanwhile available from the Eclipse repositories, but you must still install it).

Categories