Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
dfda8d79
Kaydet (Commit)
dfda8d79
authored
Tem 07, 2003
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- explain about making Python scripts executable on Unix in more
detail - fix minor markup nit
üst
84261d2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
tut.tex
Doc/tut/tut.tex
+13
-2
No files found.
Doc/tut/tut.tex
Dosyayı görüntüle @
dfda8d79
...
@@ -299,13 +299,24 @@ executable, like shell scripts, by putting the line
...
@@ -299,13 +299,24 @@ executable, like shell scripts, by putting the line
(assuming that the interpreter is on the user's
\envvar
{
PATH
}
) at the
(assuming that the interpreter is on the user's
\envvar
{
PATH
}
) at the
beginning of the script and giving the file an executable mode. The
beginning of the script and giving the file an executable mode. The
\samp
{
\#
!
}
must be the first two characters of the file. Note that
\samp
{
\#
!
}
must be the first two characters of the file. On some
platforms, this first line must end with a
\UNIX
-style line ending
(
\character
{
\e
n
}
), not a Mac OS (
\character
{
\e
r
}
) or Windows
(
\character
{
\e
r
\e
n
}
) line ending. Note that
the hash, or pound, character,
\character
{
\#
}
, is used to start a
the hash, or pound, character,
\character
{
\#
}
, is used to start a
comment in Python.
comment in Python.
The script can be given a executable mode, or permission, using the
\program
{
chmod
}
command:
\begin{verbatim}
$
chmod
+
x myscript.py
\end
{
verbatim
}
% $ <-- bow to font-lock
\subsection
{
Source Code Encoding
}
\subsection
{
Source Code Encoding
}
It is possible to use encodings different than
ASCII
in Python source
It is possible to use encodings different than
\ASCII
{}
in Python source
files. The best way to do it is to put one more special comment line
files. The best way to do it is to put one more special comment line
right after the
\code
{
\#
!
}
line to define the source file encoding:
right after the
\code
{
\#
!
}
line to define the source file encoding:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment