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
64313478
Unverified
Kaydet (Commit)
64313478
authored
Kas 14, 2018
tarafından
Julien Palard
Kaydeden (comit)
GitHub
Kas 14, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-32613: Update window FAQ (GH-5552)
üst
a757649f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
45 deletions
+26
-45
windows.rst
Doc/faq/windows.rst
+23
-44
susp-ignored.csv
Doc/tools/susp-ignored.csv
+1
-1
2018-02-05-15-05-53.bpo-32613.TDjgM1.rst
...xt/Documentation/2018-02-05-15-05-53.bpo-32613.TDjgM1.rst
+2
-0
No files found.
Doc/faq/windows.rst
Dosyayı görüntüle @
64313478
...
@@ -26,8 +26,7 @@ obvious; otherwise, you might need a little more guidance.
...
@@ -26,8 +26,7 @@ obvious; otherwise, you might need a little more guidance.
Unless you use some sort of integrated development environment, you will end up
Unless you use some sort of integrated development environment, you will end up
*typing* Windows commands into what is variously referred to as a "DOS window"
*typing* Windows commands into what is variously referred to as a "DOS window"
or "Command prompt window". Usually you can create such a window from your
or "Command prompt window". Usually you can create such a window from your
Start menu; under Windows 7 the menu selection is :menuselection:`Start -->
search bar by searching for ``cmd``. You should be able to recognize
Programs --> Accessories --> Command Prompt`. You should be able to recognize
when you have started such a window because you will see a Windows "command
when you have started such a window because you will see a Windows "command
prompt", which usually looks like this:
prompt", which usually looks like this:
...
@@ -52,19 +51,19 @@ compiles it into bytecodes, and then executes the bytecodes to run your
...
@@ -52,19 +51,19 @@ compiles it into bytecodes, and then executes the bytecodes to run your
program. So, how do you arrange for the interpreter to handle your Python?
program. So, how do you arrange for the interpreter to handle your Python?
First, you need to make sure that your command window recognises the word
First, you need to make sure that your command window recognises the word
"py
thon
" as an instruction to start the interpreter. If you have opened a
"py" as an instruction to start the interpreter. If you have opened a
command window, you should try entering the command ``py
thon
`` and hitting
command window, you should try entering the command ``py`` and hitting
return:
return:
.. code-block:: doscon
.. code-block:: doscon
C:\Users\YourName> py
thon
C:\Users\YourName> py
You should then see something like:
You should then see something like:
.. code-block:: pycon
.. code-block:: pycon
Python 3.
3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.16
00 32 bit (Intel)] on win32
Python 3.
6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.19
00 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
...
@@ -81,52 +80,33 @@ by entering a few expressions of your choice and seeing the results:
...
@@ -81,52 +80,33 @@ by entering a few expressions of your choice and seeing the results:
'HelloHelloHello'
'HelloHelloHello'
Many people use the interactive mode as a convenient yet highly programmable
Many people use the interactive mode as a convenient yet highly programmable
calculator. When you want to end your interactive Python session, hold the :kbd:`Ctrl`
calculator. When you want to end your interactive Python session,
key down while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get back to your
call the :func:`exit` function or hold the :kbd:`Ctrl` key down
Windows command prompt.
while you enter a :kbd:`Z`, then hit the ":kbd:`Enter`" key to get
back to your Windows command prompt.
You may also find that you have a Start-menu entry such as :menuselection:`Start
You may also find that you have a Start-menu entry such as :menuselection:`Start
--> Programs --> Python 3.
3
--> Python (command line)` that results in you
--> Programs --> Python 3.
x
--> Python (command line)` that results in you
seeing the ``>>>`` prompt in a new window. If so, the window will disappear
seeing the ``>>>`` prompt in a new window. If so, the window will disappear
after you enter the :kbd:`Ctrl-Z` character; Windows is running a single "python"
after you call the :func:`exit` function or enter the :kbd:`Ctrl-Z`
character; Windows is running a single "python"
command in the window, and closes it when you terminate the interpreter.
command in the window, and closes it when you terminate the interpreter.
If the ``python`` command, instead of displaying the interpreter prompt ``>>>``,
Now that we know the ``py`` command is recognized, you can give your
gives you a message like::
Python script to it. You'll have to give either an absolute or a
relative path to the Python script. Let's say your Python script is
located in your desktop and is named ``hello.py``, and your command
prompt is nicely opened in your home directory so you're seeing something
similar to::
'python' is not recognized as an internal or external command, operable program or batch file.
C:\Users\YourName>
or::
So now you'll ask the ``py`` command to give your script to Python by
typing ``py`` followed by your script path::
Bad command or filename
then you need to make sure that your computer knows where to find the Python
C:\Users\YourName> py Desktop\hello.py
interpreter. To do this you will have to modify a setting called PATH, which is
hello
a list of directories where Windows will look for programs.
You should arrange for Python's installation directory to be added to the PATH
of every command window as it starts. If you installed Python fairly recently
then the command ::
dir C:\py*
will probably tell you where it is installed; the usual location is something
like ``C:\Python33``. Otherwise you will be reduced to a search of your whole
disk ... use :menuselection:`Tools --> Find` or hit the :guilabel:`Search`
button and look for "python.exe". Supposing you discover that Python is
installed in the ``C:\Python33`` directory (the default at the time of writing),
you should make sure that entering the command ::
c:\Python33\python
starts up the interpreter as above (and don't forget you'll need a ":kbd:`Ctrl-Z`" and
an ":kbd:`Enter`" to get out of it). Once you have verified the directory, you can
add it to the system path to make it easier to start Python by just running
the ``python`` command. This is currently an option in the installer as of
CPython 3.3.
More information about environment variables can be found on the
:ref:`Using Python on Windows <setting-envvars>` page.
How do I make Python scripts executable?
How do I make Python scripts executable?
----------------------------------------
----------------------------------------
...
@@ -332,4 +312,3 @@ This is a mistake; the extension should be .TGZ.
...
@@ -332,4 +312,3 @@ This is a mistake; the extension should be .TGZ.
Simply rename the downloaded file to have the .TGZ extension, and WinZip will be
Simply rename the downloaded file to have the .TGZ extension, and WinZip will be
able to handle it. (If your copy of WinZip doesn't, get a newer one from
able to handle it. (If your copy of WinZip doesn't, get a newer one from
https://www.winzip.com.)
https://www.winzip.com.)
Doc/tools/susp-ignored.csv
Dosyayı görüntüle @
64313478
...
@@ -14,7 +14,7 @@ faq/programming,,:chr,">=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,
...
@@ -14,7 +14,7 @@ faq/programming,,:chr,">=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,
faq/programming,,::,for x in sequence[::-1]:
faq/programming,,::,for x in sequence[::-1]:
faq/programming,,:reduce,"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,"
faq/programming,,:reduce,"print((lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,"
faq/programming,,:reduce,"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,"
faq/programming,,:reduce,"Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,"
faq/windows,,:
bd8afb90ebf2,"Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.16
00 32 bit (Intel)] on win32"
faq/windows,,:
d48eceb,"Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.19
00 32 bit (Intel)] on win32"
howto/curses,,:black,"colors when it activates color mode. They are: 0:black, 1:red,"
howto/curses,,:black,"colors when it activates color mode. They are: 0:black, 1:red,"
howto/curses,,:red,"colors when it activates color mode. They are: 0:black, 1:red,"
howto/curses,,:red,"colors when it activates color mode. They are: 0:black, 1:red,"
howto/curses,,:green,"2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and 7:white. The"
howto/curses,,:green,"2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, and 7:white. The"
...
...
Misc/NEWS.d/next/Documentation/2018-02-05-15-05-53.bpo-32613.TDjgM1.rst
0 → 100644
Dosyayı görüntüle @
64313478
Update the faq/windows.html to use the py command from PEP 397 instead of
python.
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