does jython 2.7 compatible with python 3.6 code [duplicate] - python

This question already has an answer here:
Making something compatible with python 3 and 2
(1 answer)
Closed 4 years ago.
does anyone know which jython version compatible with python 3.6. I checked the jython release note, didn't get a clear clue. Thanks

There currently is no official jython 3.x version. There is a github repro, put that is unfinished. You can try that, put it will propably not work. So no, I don't believe you can use CPython 3.6 code and use it on jython without any code changes. It would be the easiest to use CPython or change the code to fit python 2.7

Related

Is it true that python 2.7 will die soon? [duplicate]

This question already has answers here:
End of support for python 2.7?
(8 answers)
Closed 3 years ago.
i've heard that python 2.7 will be removed or something like that. And i just starter so i'm confused if i should start with python 2.7 or the newest one 3.7?
Yes, https://pythonclock.org/
Python 2.7 will not be maintained past 2020.
Until you discover an explicit reason otherwise, use the current stable versions of all software and hardware dependencies to start a project. Some software (e.g. Node.js or browsers) have special releases on the long term support track (LTS), but Python versions should be all equal in this regard, so 3.7 is a good choice in 2019.
An explicit reason might be integration with existing libraries (that do not work on current version and cannot be updated or replaced), or other business reasons.

How to use 2 python mods when they both require different python versions

How would I use 2 different python mods in the same file when both mods require different python versions? I am trying to write a program that uses pygame, which only works with 3.2 and pymssql, which only works with 3.3. I get errors if I try to run them both in the same file(on either python version), but not if I run them separately.
There is no simple solution for you. In my opinion, it is the pygame communitie's responsibility to make it work on Python 3.3. Python 3.3 has a higher potential to be widely distributed than Python 3.2. Also, "supporting Python 3" nowadays should mean supporting Python 3.3/3.4, and not only Python 3.2. I guess this is on the todo list of the pygame maintainers. If in doubt, you might want to ask on the corresponding forums/mailing list if supporting Python 3.3 is already planned.
If you are curious and not frightened, you might event want to dig into why pygame fails on Python 3.3 and start fixing issue by issue. I guess this effort will be highly appreciated.
Edit:
I was assuming that you did your research homework a bit :-) Looks like pygame is available for Python 3.3:
https://bitbucket.org/pygame/pygame/downloads
Thanks #batbrat.

If Python 3 is the newest python, why is python 2 still around?

I used Python a few years ago when 2 was the only version.
Now there is 2 and 3.
Was there a a reason 2 hasn't continued to upgrade and now there is a split into two different pythons? Like no one uses Python 2.5. They all use 2.7 or whatever it is. Why not just use 3? Obviously there's a reason, but I was unable to find it googling.
My second question is, which one should I use? I am assuming 3, but that's ONLY based on the higher number. I wonder why 2 is still around if 3 is out??? If there aren't any major bugs with 3, I am just going to use that as I don't reckon it much matters: either one would probably work for py QT.
Why not just use 3?
A lot of existing Python code is not compatible with Python 3 yet. If you need to use Django for example you are forced to use Python 2.x.
My second question is, which one should I use?
Python 3 and PyQt 4 recommendations
Python 3 is significantly different than Python 2.x, and breaks numerous libraries and likely a lot of other dependent code. Python 2.x will likely be around for quite a while, as libraries are ported and 3.0 is field-tested.
it costs a lot to upgrade from python 2.x to python 3, that's why my project still uses python 2.7
The latest Ubuntu doesn't ship with Python 3. 12.04 will but that's not out yet.
OpenBSD doesn't have a package for Python 3, either.
Some people may just not have Python 3 on their platform and don't care to compile.

How can I install Python 3x and 2x into same machine? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can I install python 3.x and 2.x on the same computer?
I am learning Python which I started with 3.2. Now I know basics and want to use some frameworks to learn web development. Here, I came to notice Django doesn't supports Python 3x yet.
So, I need to use Python 2x on same machine. How can I install both?
PS. I am currently using Windows XP.
Just install them normally. By default each version of Python is installed to a different path, and won't conflict. Python 3 and Python 2 don't even use the same executable name (python vs python3), so there's not a lot to worry about.
they will install into C:\Python27, and C:\Python32 by default.
no conflicts.
i didn't want to answer this but i have to since you might have a problem that no one is talking about lol
first don't install python from the official website go to activestate and download activepython for python 2,7
here's a direct link
http://downloads.activestate.com/ActivePython/releases/2.7.2.5/ActivePython-2.7.2.5-win32-x86.msi
activepython will help a lot when downloading packages trust me, so to install django, open pypm and type pypm install django
learn python 2.x and not 3.x because:
1-All the modules work on 2.x and not 3.x, python is a modular language, it's useless if you can't find modules
2- python 2.x will be there for at least 5 years so there's a long time for you to get started on 3.x maybe by then it will be more supported
3-now we are using 2.7, starting from 2.5 python started doing small changes to help programmers have a smooth transition from 2.x and 3.x, so when 2.9 arrives it will look a lot like 3.x
4-if you installed 2.7 and 3.2 on xp and lets say you made 2.7 your default version, which is the right thing to do, then there's a big possibility that 3.2 won't work, it will give you this error: Error runtime
program C:\python32\pythonw.py
this application has requested the runtime to terminate it in an unusual way, please contact the application support team for more information
so it will just give you a headache lol

Python 2.7 or 3.1.2? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
python 2.6 or python 3.1?
Hi,
I'm new to the python world and it seems that there are currently two parallel versions in development, which would be the 2.7 versus the 3.1.2. I'm wondering what version should I use to start, and why?
Stay with 3.1.2 if you want to be on the bleeding edge.
Stay with 2.7 if you want to leverage any 3rd party libraries that haven't been ported to 3.1.2 yet or can't be backward compatible.
I'd suggest Python 3 as it has incorporated several fixes to remove some of Python's previous "warts". The primary reason for maintaining the 2.7 version is for older packages that haven't yet made the transition. There are good reasons to use 2.7 but if you're starting out, you might as well start on the path leading to the future.

Categories

Resources