Python Programming for Biology: Bioinformatics and Beyond



Download 7,75 Mb.
Pdf ko'rish
bet470/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   466   467   468   469   470   471   472   473   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Method

(pickle.)

Description

dump(obj, file,



protocol)

Saves a copy of a Python object to disk, as a serialised Pickle

file, using a specified file object.

load(file)

Loads a Python object saved as a serialised Pickle file into

memory.


dumps(obj,

protocol)

Creates a serialised Pickle string that represents a given object.

loads(string)

Creates a Python object from a serialised Pickle string version.



The ‘

sys

’ module

The sys module contains information that relates to the Python interpreter and its runtime

environment. As with the os module (which is for operating-system interaction) we only

focus on some of the more commonly used functionality.



Attribute/Method

(sys.)

Description

argv


Retrieves a list that contains the command line arguments

that were passed in when Python was run, starting with the

name of the Python script.

exit(code)

Quits the current Python session/program, optionally

passing back a specific exit status code to the system.

modules

Retrieves a dictionary that contains all of the currently

imported modules as (module name: file path), key, value

pairs.


path

Retrieves a list of strings representing the Python module

look-up paths. Starts with the value from the

PYTHONPATH environment variable. This list of paths can




be modified programmatically.

platform


Retrieves a string indicating what basic kind of computer

system Python is running on, i.e. indicating Windows, Mac

OS X, Linux etc.

stdin


Retrieves a file object that represents standard input, where

textual input is taken from, which by default is the keyboard.

stdout

Retrieves a file object that represents standard output to the



screen, where textual output, in the absence of a specific file,

is sent. This is what print writes to by default.

stderr

Retrieves a file object that represents standard error output;



usually to screen, unless otherwise redirected.

version


Retrieves a string indicating which version of Python is

being used.




Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   466   467   468   469   470   471   472   473   ...   514




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish