in python , could I accomplish the purpose that "a=Console.read ()" used
in C?
when program is running, I wanna add a statement like
"a=Console.read ()" in C language,it will wait for user's input, after
user's typing a character , and click "enter" key, the program will go
on running. 4 1822
python wrote: in python , could I accomplish the purpose that "a=Console.read ()" used in C? when program is running, I wanna add a statement like "a=Console.read ()" in C language,it will wait for user's input, after user's typing a character , and click "enter" key, the program will go on running.
Use raw_input() <http://docs.python.org/lib/built-in-funcs.html>:
age = raw_input("Your age: ")
print age
Bye,
Dennis
python a écrit : in python , could I accomplish the purpose that "a=Console.read ()" used in C?
<ot mode='pedantic' >
There's nothing like "Console.read() " in ansi-C.
</ot>
(see Dennis's post for the answer to your question)
Bruno Desthuilliers wrote: python a écrit : in python , could I accomplish the purpose that "a=Console.read ()" used in C?
<ot mode='pedantic' > There's nothing like "Console.read() " in ansi-C. </ot>
He probably got it mixed up with C# which ( almost - Console.Read() )
has that.
Ravi Teja a écrit : Bruno Desthuilliers wrote:
python a écrit :
in python , could I accomplish the purpose that "a=Console.read ()" used in C?
<ot mode='pedantic' > There's nothing like "Console.read() " in ansi-C. </ot>
He probably got it mixed up with C# which ( almost - Console.Read() ) has that.
Yeps. Or may be MS-C++ too AFAICT. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Askari |
last post by:
Yesterday, ALL code in python work and nothing when I close(finish) a code.
Today, when I close, some raise this windows error :
Instruction at "0x00FC3D70" use memory address "0x00000000". Can't be
"read".
Click on "OK" to exit program.
Why this error, today and not before today?
|
by: ZafT |
last post by:
Thanks in advance for any tips that might get me going in the right
direction.
I am working on a simple exercise for school that is supposed to use read to
read a file (about 10 MB). I am supposed to change the buffer size and see
how this affects the read time. In other words, the buffer is supposed to
limit how much of the file gets read per call, and cause some change in
speed. I am supposed to do the same with fread as well, but...
|
by: Kerwin Cabrera |
last post by:
I am writing a console application and I would like to put a "Press any key..." message once the program is done executing. Currently, when it executes it returns to the prompt. I have tried console.read and console.readline but they both require an <Enter> key to be hit. Any suggestions
Thanks
-KC
|
by: Ross Marchant |
last post by:
Hi all,
I wrote a simple server console application, and i notice that if I click on
the console window is stops processing because the window is in a text
select mode. Is there anyway to turn off this select mode. BTW VC# 2005
express on Win 2000.
Ross
|
by: Gary |
last post by:
Hi,
I would like to display a form and draw some line graphics on the form,
and do all of this from a "console" program. I would like control to
remain with the console program before, during, and after the form is
displayed (i.e. I don't want to switch to an event driven model).
Is there a way to do this? Is there some sample code available that
demonstrates this?
| |
by: cool2005 |
last post by:
I am new to Opera and tried to use its "javascipt console" and only saw
"Java console" and "Error console" under tools|advance.
Any idea?
thanks
mark
|
by: Jerry |
last post by:
I have created an application using wxPython and compiled it using
py2exe. When I put
setup(console=)
in my setup.py file, the resulting application runs just fine. But
when I change it to
setup(windows=)
|
by: Kerem Gümrükcü |
last post by:
Hi All,
i am too tired now to find this out by my own, but why does
my while loop "while(readline==Console.ReadLine())" needs
twice return hit to read the line, after setting
"Console.TreatControlCAsInput = true". How can i make it
work like it would be set to "false", so that i only must hit the
return once to get the input,...
TIA
|
by: Curious |
last post by:
I''ve created a simple Console Application in C#.NET (.NET 2.0), and I
have the following code:
Console.WriteLine("Now let us begin!");
However, the string, "Now let us begin!", never shows up in the "View"-
FYI, the text in the "View"->"Output" window is below instead:
'IO.vshost.exe' (Managed): Loaded 'C:\WINDOWS\assembly\GAC_MSIL
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |