Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to set python2 as my default? Post 303035086 by wisecracker on Tuesday 14th of May 2019 01:03:01 PM
Old 05-14-2019
Hi Circuits...

In a short word, DON'T!
Python 2.x.x and 3.x.x are worlds apart.
If your install uses Python 3.x.x then leave well alone as it could well be used by the OS for other things during bootup and the like.
There is nothing to stop you using Python 2.x.x but expect significant differences between the two.
One simple major difference is Python 2.x.x uses print as a statement/command whereas Python 3.x.x has print() as a function.
Another important one is raw inputting is raw_input() in Python 2.x.x and just input() in Python 3.x.x.
Python 2.x.x input() is NOT the same as Python 3.x.x input() .
There are numerous more differences that you should recode anything you write to suit version 3.x.x as 2.x.x is not being supported after around 2020.

So to reiterate DON'T make python2 your default OR vice-versa!
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to set server's ip address, router, network mask and set if it is an internal or external ip?

Hello, I need to write a program which sets server's ip address, router, network mask. Program also should set if it is an internal or external ip. Maybe someone can help me ? Any information from u is very useful :b: I stopped at .. :( #!/bin/sh A=`hostname -i` echo "server ip address is $A"... (4 Replies)
Discussion started by: zagaruika
4 Replies

2. Shell Programming and Scripting

set Net:SSH:Expect timeout and set it again.

SSHing into a machine can take a few seconds, but after I'm in, the commands return quickly. I was wondering if the timeout setting can be changed once I'm logged into the machine. Does anyone know if this can be set on the fly? The problem here is, if I have to set timeout = 10, it'll take 10... (1 Reply)
Discussion started by: mrwatkin
1 Replies

3. UNIX and Linux Applications

[Urgent]Problem on setting up the apache2.2.6 and mod_wsgi3.2 and python2.5.4

Hi everyone, So far, I have done all the steps (including creating django.wsgi in the project). The step left is to turn on the httpd, but error put exit in this very last step. :( <user> #: ./apachetrl start httpd: Syntax error on line 450 of /usr/local/apache2/conf/httpd.conf: Cannot... (1 Reply)
Discussion started by: AlexCheung
1 Replies

4. Web Development

[Urgent]Problem on setting up the apache2.2.6 and mod_wsgi3.2 and python2.5.4

Hi everyone, So far, I have done all the steps (including creating django.wsgi in the project). The step left is to turn on the httpd, but error put exit in this very last step.:( <user> #: ./apachetrl start httpd: Syntax error on line 450 of /usr/local/apache2/conf/httpd.conf: Cannot load... (1 Reply)
Discussion started by: AlexCheung
1 Replies

5. Shell Programming and Scripting

python2.3 to python2.6

Hi All i have a script written in python2.3 but it no longer works for python2.6 is there an easier way to check what needs to be changed (1 Reply)
Discussion started by: ab52
1 Replies

6. Solaris

LC_ALL & LANG are set OK, but others couldn't set locale correctly.

Hi, I have a Solaris (SunOS 5.10) installed, by default with the en_AU.UTF-8 locale. I want to change it to en_US.UTF-8 With AU, I have no issues whatsoever, so I installed the language package and now locale -a shows "en_US.UTF-8". Problem is even with LC_ALL set in etc/default/init, the... (2 Replies)
Discussion started by: asdfg
2 Replies

7. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies
pydhcplib(3)							     PYDHCPLIB							      pydhcplib(3)

NAME
pydhcplib - une librarie dhcp en python DESCRIPTION
pydhcplib is a library written in python to reading, writing, encode or decode dhcp packets on network. The man pages of pydhcplib describe the various classes defined in pydhcplib and usable in your python programs. TYPES
PACKET CLASSES
NETWORK CLASSES
EXAMPLES
SEE ALSO
pydhcp(8), pydhcplib.hwmac(3), pydhcplib.ipv4(3), pydhcplib.strlist(3), pydhcplib.DhcpPacket(3), pydhcplib.DhcpBasicPacket(3), pydhc- plib.DhcpNetwork(3), pydhcplib.DhcpClient(3), pydhcplib.DhcpServer(3) BUGS
pydhcplib is under development. See http://pydhcplib.tuxfamily.org/ for more information. AUTHOR
Mathieu Ignacio (mignacio[AT]april.org) pydhcplib(3)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy