Hi,
I tried to define SEQUENCE with:
The script is working now, exept that I do'nt get a menu in terminal for "s" to
stop.
-
def SEQUENCE():
while notDone:
if mindist > us_dist(15):
for (dir
He,
Thank you for making some time for it.
Is this your code ?
I am also using python 3
I got an error with execute the scipt:
---
Enter command> Traceback (most recent call last):
File "test06.py", line 44, in
for (dir, t
Oke, lets try your code.Can you help me with that.
This is my code:
-
from gopigo import *
import time
set_right_speed(150)
set_left_speed(105)
enable_servo()
fwd()
print("forward 1x")
time.sleep(4)
stop()
while True:
servo(90)
mindist = 80
input/ldompel...@casema.nl wrote:
>>The code in capture_key.py may look a bit scary, but just as I took it
>>without bothering the details you can take the resulting module without
>>caring about the code in it. Alternatively you can search
>
>>https://pypi.python.org
>
> Thanks for the link. I
>The code in capture_key.py may look a bit scary, but just as I took it
>without bothering the details you can take the resulting module without
>caring about the code in it. Alternatively you can search
>https://pypi.python.org
Thanks for the link. I realy appreciate it.
Can you also tell me wha
input/ldompel...@casema.nl wrote:
> In reply to "Peter Otten" who wrote the following:
>
>> input/ldompel...@casema.nl wrote:
>>
>> > > choices = raw_input("letter s to stop:")
>> >
>> > Oh no, this is not what I want. Now it is waiting for input when its go
>> > further with the script. Beca
In reply to "Peter Otten" who wrote the following:
> input/ldompel...@casema.nl wrote:
>
> > > choices = raw_input("letter s to stop:")
> >
> > Oh no, this is not what I want. Now it is waiting for input when its go
> > further with the script. Because I have an while True: so I want that the
input/ldompel...@casema.nl wrote:
> > choices = raw_input("letter s to stop:")
>
> Oh no, this is not what I want. Now it is waiting for input when its go
> further with the script. Because I have an while True: so I want that the
> script go's continue only when I press a key then it must sto
In reply to "Peter Otten" who wrote the following:
> input/ldompel...@casema.nl wrote:
>
> > while True:
> > enable_servo()
> > servo(90)
> > mindist = 80
> > choices = input("letter s to stop:")
> > if choices == 's':
> > print ("stop")
> > break
> > if mindis
input/ldompel...@casema.nl wrote:
> while True:
> enable_servo()
> servo(90)
> mindist = 80
> choices = input("letter s to stop:")
> if choices == 's':
> print ("stop")
> break
> if mindist > us_dist(15):
> bwd()
> print ("backward 1x")
> In this script
In reply to "tian.su.y...@gmail.com" who wrote the following:
> =E5=9C=A8 2015=E5=B9=B411=E6=9C=884=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 UTC=
> -6=E4=B8=8B=E5=8D=883:45:09=EF=BC=8Cinput/ld...@casema.nl=E5=86=99=E9=81=93=
> =EF=BC=9A
> > I have an continues loop with "while True:"
> > Now I want to
在 2015年11月4日星期三 UTC-6下午3:45:09,input/ld...@casema.nl写道:
> I have an continues loop with "while True:"
> Now I want to use "raw_input" and when I press "s" on the keybord that it
> will
> "break" the continues loop.
>
> I tried:
> choices = raw_input
> if choises == s:
> break
>
> But even when
On Thu, 5 Nov 2015 09:37 am, input/ldompel...@casema.nl wrote:
> I quote the s, but its still break even when I not press the s.
The code you have shown us is so full of bugs and typos that you cannot
possibly be running that code.
Unfortunately, we do not have magical powers. We cannot see the
In reply to "Joel Goldstick" who wrote the following:
> On Wed, Nov 4, 2015 at 4:44 PM, wrote:
>
> > I have an continues loop with "while True:"
> > Now I want to use "raw_input" and when I press "s" on the keybord that it
> > will
> > "break" the continues loop.
> >
> > I tried:
> > choices =
On Wed, Nov 4, 2015 at 4:44 PM, wrote:
> I have an continues loop with "while True:"
> Now I want to use "raw_input" and when I press "s" on the keybord that it
> will
> "break" the continues loop.
>
> I tried:
> choices = raw_input
> if choises == s:
> break
>
> But even when I not press "s" it
On Wed, Nov 4, 2015 at 2:44 PM, wrote:
> I have an continues loop with "while True:"
> Now I want to use "raw_input" and when I press "s" on the keybord that it will
> "break" the continues loop.
>
> I tried:
> choices = raw_input
This doesn't call raw_input. For that you need to write raw_input
On Wed, Aug 21, 2013, at 12:42, David M. Welch wrote:
> Hi all,
>
> This is an old thread, but I'm having the same behavior in my terminal
> when
> I run some code but kill the process in the terminal (Ctrl-C). The code
> has
> two prime suspects (from a simple google search):
> 1. Creates ssh p
Hi all,
This is an old thread, but I'm having the same behavior in my terminal when
I run some code but kill the process in the terminal (Ctrl-C). The code has
two prime suspects (from a simple google search):
1. Creates ssh port forward via the subprocess module
(http://unix.stackexchange.com/q
(You forgot to separate the parts of my comments that you were quoting
from your responses. Any decent email program will do that for you
automatically, inserting "< " in front of each quoted line. Then you
just hit enter a couple of times to type the new stuff right after the
part you're quo
Now you've saved the data in a different file. How does the next run of
the program find it?
What user? In what environment can a user enter function calls into
your code?
-The user will call the function out from IDLE
Why is the command invalid?
-Because the user need to type out a name
On 04/06/2013 11:22 PM, Frank wrote:
Hi Dave,
Sorry for my unclear question.
I didn't use the d = load_friends('friends.csv') now because I'm going use it
for other function later on, I should have remove it first to avoid confusion.
This is the code for load_friends , add_info ,display_frie
Hi Dave,
Sorry for my unclear question.
I didn't use the d = load_friends('friends.csv') now because I'm going use it
for other function later on, I should have remove it first to avoid confusion.
This is the code for load_friends , add_info ,display_friends, save_friends
function:
def load_
On 04/06/2013 09:03 PM, Frank wrote:
Hi all, I would require advise on this question for function call interact:
the desire outcome:
interact()
Friends File: friends.csv
Command: f John Cleese
John Cleese: Ministry of Silly Walks, 421, 27 October
Command: f Michael Palin
Unknown friend Micha
In article ,
John O'Hagan wrote:
>On Mon, 19 Oct 2009, Aahz wrote:
>> In article ,
>> John O'Hagan wrote:
>>>
>>>I'm getting input for a program while it's running by using raw_input in a
>>>loop in separate thread. This works except for the inconvenience of not
>>> having a command history or t
On Mon, 19 Oct 2009, Aahz wrote:
> In article ,
>
> John O'Hagan wrote:
> >I'm getting input for a program while it's running by using raw_input in a
> >loop in separate thread. This works except for the inconvenience of not
> > having a command history or the use of backspace etc.
> >
> >That ca
In article ,
John O'Hagan wrote:
>
>I'm getting input for a program while it's running by using raw_input in a
>loop in separate thread. This works except for the inconvenience of not having
>a command history or the use of backspace etc.
>
>That can be solved by loading the readline module; ho
Luca wrote:
> On Sun, Jun 21, 2009 at 12:51 PM, Peter Otten<__pete...@web.de> wrote:
>> import readline
> Any one knows is this working also on Windows? I've no Win system
> right no to test this...
I do not have Windows available, either, but you might try
http://ipython.scipy.org/moin/PyRea
On Mon, Jun 22, 2009 at 1:19 AM, Luca wrote:
> On Sun, Jun 21, 2009 at 12:51 PM, Peter Otten<__pete...@web.de> wrote:
>> With "traduced" you stumbled upon another false friend ;)
>>
>> http://it.wikipedia.org/wiki/Falso_amico
>
> D'oh!!! x-)
>
>> import readline
>>
>> def input_default(prompt, de
On Sun, Jun 21, 2009 at 12:51 PM, Peter Otten<__pete...@web.de> wrote:
> With "traduced" you stumbled upon another false friend ;)
>
> http://it.wikipedia.org/wiki/Falso_amico
D'oh!!! x-)
> import readline
>
> def input_default(prompt, default):
> def startup_hook():
> readline.insert
Peter Otten wrote:
Luca wrote:
On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebert wrote:
On Sat, Jun 20, 2009 at 7:17 AM, Luca wrote:
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
abl
Luca wrote:
> On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebert wrote:
>> On Sat, Jun 20, 2009 at 7:17 AM, Luca wrote:
>>> Hi all.
>>>
>>> I need to use a function like the raw_input to read data from user
>>> command line, but I really like to pre-compile the choice and I'm not
>>> able to do this. T
On Sat, Jun 20, 2009 at 6:38 PM, Chris Rebert wrote:
> On Sat, Jun 20, 2009 at 7:17 AM, Luca wrote:
>> Hi all.
>>
>> I need to use a function like the raw_input to read data from user
>> command line, but I really like to pre-compile the choice and I'm not
>> able to do this. There is some other fu
patx wrote:
Could you use if elif statements? Don't understand what you mean really?
On Sat, Jun 20, 2009 at 3:01 PM, Dave Angel wrote:
Luca wrote:
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice a
Luca wrote:
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
able to do this. There is some other function/module I can use?
I wanna to pre-compile the raw_input input line with the current working pa
En Sat, 20 Jun 2009 11:17:01 -0300, Luca escribió:
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
able to do this. There is some other function/module I can use?
I wanna to pre-compile the raw_input input
On Sat, Jun 20, 2009 at 7:17 AM, Luca wrote:
> Hi all.
>
> I need to use a function like the raw_input to read data from user
> command line, but I really like to pre-compile the choice and I'm not
> able to do this. There is some other function/module I can use?
> I wanna to pre-compile the raw_in
Ahh ok, tried out your example and it works just fine. Turns out the
actual problem is what I was doing with the input. Elsewhere, I call
urlparse.urlparse() on the filename past in, which splits up the
filename where the # sign is, so that's why it looked to me like the
characters after the # were
On Fri, 26 Dec 2008 20:20:16 -0800, Jugdish wrote:
> Hi, I'm having problems getting a pound sign to go through as input sent
> to the raw_input() command. I'm running Python 2.5.1 on Windows XP.
> Here's my simple little script:
>
> while True:
> response = raw_input("Please enter a file nam
On Sat, 02 Aug 2008 21:58:09 +0200, TP wrote:
> Hi everybody,
>
> When using raw_input(), the input of the user ends when he types Return
> on his keyboard.
> How can I change this behavior, so that another action is needed to stop
> the input? For example, CTRL-G. It would allow the user to inpu
TP wrote:
Hi everybody,
When using raw_input(), the input of the user ends when he types Return on
his keyboard.
How can I change this behavior, so that another action is needed to stop the
input? For example, CTRL-G. It would allow the user to input several lines.
Thanks
Julien
How abou
How can I change this behavior, so that another action is needed to stop the
input? For example, CTRL-G. It would allow the user to input several lines.
I don't think you can change raw_input's behaviour in this respect, but
you could build something yourself that's based on interpretation o
TP wrote:
Hi everybody,
When using raw_input(), the input of the user ends when he types Return on
his keyboard.
How can I change this behavior, so that another action is needed to stop the
input? For example, CTRL-G. It would allow the user to input several lines.
Thanks
Julien
Just put raw
On Jun 30, 11:55 am, [EMAIL PROTECTED] wrote:
> Is there any way to type into a Tkinter frame window?
> I want to use raw_input() within a Tkinter frame.
import sys
import Tkinter
import cStringIO
class GUIInputMgr(Tkinter.Entry):
def __init__(self, parent):
Tkinter.Entry.__init__(se
Matimus <[EMAIL PROTECTED]>:
> On Jun 30, 9:55 am, [EMAIL PROTECTED] wrote:
>> Is there any way to type into a Tkinter frame window?
>> I want to use raw_input() within a Tkinter frame.
>
> `raw_input(prompt)` just calls `sys.stdout.write(prompt)` and returns
> `sys.stdin.readline()`.
It does mor
On 30 jun 2008, at 18:55, [EMAIL PROTECTED] wrote:
Is there any way to type into a Tkinter frame window?
I want to use raw_input() within a Tkinter frame.
--
http://mail.python.org/mailman/listinfo/python-list
You could use the Tkinter.Entry option from dialog windows...
http://www.pythonwa
On Jun 30, 9:55 am, [EMAIL PROTECTED] wrote:
> Is there any way to type into a Tkinter frame window?
> I want to use raw_input() within a Tkinter frame.
`raw_input(prompt)` just calls `sys.stdout.write(prompt)` and returns
`sys.stdin.readline()`. So, you can just create file-like objects to
replac
[EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Is there any way to type into a Tkinter frame window?
Maybe using a proper text/line edit widget?
> I want to use raw_input() within a Tkinter frame.
The builtin raw_input is for console input only. Of course, one could
implement a raw_input using a Tki
YES!
This is what I was looking for.
Great! All works fine now.
Thank you very much Gabriel.
Gabriel Genellina schreef:
> Add this on your sitecustomize.py module (or create one)
>
> import sys
> def raw_input(prompt=None):
>if prompt: sys.stdout.write(prompt)
>return original_raw_input()
On Sat, 26 Jan 2008 04:23:36 -0800 (PST), Dox33
<[EMAIL PROTECTED]> wrote:
>WHERE IS THE SECOND LINE?
>It is in the file stderr_catch.txt!!!
>
> See the problem?
>Please Tell me? Why is the prompt produced by raw_input() printed to
>the error channel? It should be stdout, just as the print s
En Sun, 27 Jan 2008 12:51:51 -0200, Dox33 <[EMAIL PROTECTED]>
escribi�:
> Yes, I know.
> There are several ways to work around the problem.
> (Look at the innitial code I provided in this discussion start)
> Fact is, every time I'm getting a script from somewhere or someone, I
> have to search a
Yes, I know.
There are several ways to work around the problem.
(Look at the innitial code I provided in this discussion start)
Fact is, every time I'm getting a script from somewhere or someone, I
have to search and replace all the affected code.
Not very conveniant.
That's why I rather would have
Dox33 <[EMAIL PROTECTED]> writes:
> Thanks for your reply. Since I momentarily do not have the ability
> to build a new python executable, I would like to ask for your help
> in this case. Are you able to supply me with a corrected version?
You can simply choose not to use raw_input, and use sy
I believe a workaround to the bug of raw_input sending the prompt to stderr
is
print 'prompt:',
a = raw_input()
Not nice, but possibly better that waiting for a corrected binary.
--
http://mail.python.org/mailman/listinfo/python-list
Hello Mike,
Thanks for your reply.
Since I momentarily do not have the ability to build a new python
executable, I would like to ask for your help in this case.
Are you able to supply me with a corrected version?
Friendly greetings
Rens Duijsens
On 26 jan, 16:50, Mike Kent <[EMAIL PROTECTED]> w
On Jan 26, 7:23 am, Dox33 <[EMAIL PROTECTED]> wrote:
> I ran into a very strange behaviour of raw_input().
> I hope somebody can tell me how to fix this.
===CUT===
> *** Thirst, redirect stderr to file, STRANGE behaviour..
> From the command prompt I run:
> python script.py 2> stderr_catch.txt
On Thu, 01 Nov 2007 19:21:03 -0700, 7stud wrote:
> BeautifulSoup can convert an html entity representing an 'A' with
> umlaut, e.g.:
>
> Ä
>
> into an without every touching my keyboard. How does BeautifulSoup
> do it?
It maps the HTML entity names to unicode characters. Take a look at the
On Oct 13, 12:42 pm, MRAB <[EMAIL PROTECTED]> wrote:
> You can
> decode that into the actual UTF-8 string with decode("string_escape"):
>
> s = raw_input('Enter: ') #A\xcc\x88
> s = s.decode("string_escape")
>
Ahh. Thanks for that.
>On Oct 12, 2:43 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECT
On Oct 13, 3:09 am, 7stud <[EMAIL PROTECTED]> wrote:
> On Oct 12, 2:43 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
> > You mean literally!? Then of course I get A\xcc\x88 because that's what I
> > entered. In string literals in source code the backslash has a special
> > meaning but
On Fri, 12 Oct 2007 19:09:46 -0700, 7stud wrote:
> On Oct 12, 2:43 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> You mean literally!? Then of course I get A\xcc\x88 because that's what I
>> entered. In string literals in source code the backslash has a special
>> meaning but `raw_in
On Oct 12, 2:43 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> You mean literally!? Then of course I get A\xcc\x88 because that's what I
> entered. In string literals in source code the backslash has a special
> meaning but `raw_input()` does not "interpret" the input in any way.
>
Th
On Fri, 12 Oct 2007 13:18:35 -0700, 7stud wrote:
> On Oct 12, 1:18 pm, [EMAIL PROTECTED] wrote:
>> On Oct 12, 1:53 pm, 7stud <[EMAIL PROTECTED]> wrote:
>>
>> > s = 'A\xcc\x88' #capital A with umlaut
>> > print s #displays capital A with umlaut
>>
>> > s = raw_input('Enter: ') #A\xcc\
On Oct 12, 1:18 pm, [EMAIL PROTECTED] wrote:
> On Oct 12, 1:53 pm, 7stud <[EMAIL PROTECTED]> wrote:
>
> > s = 'A\xcc\x88' #capital A with umlaut
> > print s #displays capital A with umlaut
>
> > s = raw_input('Enter: ') #A\xcc\x88
> > print s#displays A\xcc\x88
>
>
On Oct 12, 1:53 pm, 7stud <[EMAIL PROTECTED]> wrote:
> s = 'A\xcc\x88' #capital A with umlaut
> print s #displays capital A with umlaut
>
> s = raw_input('Enter: ') #A\xcc\x88
> print s#displays A\xcc\x88
>
> print len(input) #9
>
> It looks like every ch
[EMAIL PROTECTED] wrote:
> How could I resolve this?
>
Try to keep each answer so it makes sense on its own, please. I presume
you are responding to this:
> In <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>
>> > if __name__ == "__main__":
>> >bucket_name = raw_input('Name of the bucket y
How could I resolve this?
Many thanks,
O
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> if __name__ == "__main__":
> bucket_name = raw_input('Name of the bucket you wish the files to be
> placed into? ')
> update_s3()
>
>
> Basically I pipe some files into the script - so would this cause a
> linebreak?
Yes of course.
Hi There,
Here's the full code, if it helps:
"""
Takes a list of filenames via standard input and uploads them to
Amazon S3.
Requires S3.py:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=134&categoryID=47
Usage:
cd /directory/with/media/files/
fin
[EMAIL PROTECTED] wrote:
> if __name__ == "__main__":
> bucket_name = raw_input('Name of the bucket you wish the files to be
> placed into? ')
> update_s3()
>
> Basically, it just asks the question and continues anyway?
It reads stdin until a line break. Then it continues. Exactly what
On Apr 3, 8:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hey Everyone,
>
> This is probably going to sound like a bit of a stupid question - but
> why does (in the following code) the script just continue to run past
> the raw_input, when the user hasn't entered anything?
>
> if __name__
John Machin <[EMAIL PROTECTED]> writes:
> On 28/04/2006 2:04 PM, Gary Wessle wrote:
> > the output of this code below is not what one would expect, it
> > outputs
> > all kind of numbers and it never stops, I want to ask the user for a
> > number and then print out the multiplication table up to t
On 28/04/2006 2:04 PM, Gary Wessle wrote:
>
> the output of this code below is not what one would expect, it outputs
> all kind of numbers and it never stops, I want to ask the user for a
> number and then print out the multiplication table up to that number.
That's what you want, but not what yo
Tim Williams (gmail) wrote:
> The following will accept any subset of "carmel" in upper, lower or
> mixed case
>
> EG Carmel, carmel, Carm, mel etc
>
> >>> if raw_input ("hello what's your name? ").lower() in 'carmel':
> print "Ahh the boss's wife"
It's so powerful, it accepts ev
On 23/03/06, cm012b5105 <[EMAIL PROTECTED]> wrote:
if
s = raw_input
("hello what's your name? ")
if s=='carmel
':
print "Ahh the boss's
wife"
What i would like to know is what if she doesn't write
carmel
she rights say carm
short of me writing if s=='carm': on a ne
On 23/03/06, cm012b5105 <[EMAIL PROTECTED]> wrote:
Hi there i am hoping some one could help me out with a small problem
i am in the process of learning python. I am trying
to write an interactive programme,
This is a short example.
if s = raw_input
("hello what's your name? ")
if
"john boy" <[EMAIL PROTECTED]> :
>I am having trouble with the following example used in a tutorial:
>
> print "Halt !"
> s = raw_input ("Who Goes there? ")
> print "You may pass,", s
>
> I run this and get the following:
> Halt!
> Who Goes there?
>
> --thats itif I hit enter again "You may pa
"A D" <[EMAIL PROTECTED]> wrote:
>> print "You may pass,", s
>
> at this print line you need to do
> print "you may pass, %s" % s
>
> this will allow you to enter the string s into the output sentence
where did you buy your python license ?
>>> s = "josh"
>>> print "hello,", s
hello,
The raw_input('Who Goes there?') function writes out the arg and then
waits for *user input* , and that is considered terminated when you hit
return.
Since you only hit return without typing 'Josh' first you get an empty
string "" which is then printed to screen... ('You may pass,'+"")
Type somet
john boy wrote:
>
>
> --thats itif I hit enter again "You may pass,"
> appears...
> ...
> What am I doing wrong?
raw_input accepts, that's right, input. So, when you get the line
"Who goes there?"
You don't hit enter; you type whatever you want to be printed with "You
may pass,". Then y
On Mon, 07 Nov 2005 12:14:15 -0600, A D <[EMAIL PROTECTED]> wrote:
>On Mon, 2005-11-07 at 07:57 -0800, john boy wrote:
>> I am having trouble with the following example used in a tutorial:
>>
>> print "Halt !"
>> s = raw_input ("Who Goes there? ")
>> print "You may pass,", s
>
>at this print line y
On Mon, 2005-11-07 at 07:57 -0800, john boy wrote:
> I am having trouble with the following example used in a tutorial:
>
> print "Halt !"
> s = raw_input ("Who Goes there? ")
> print "You may pass,", s
at this print line you need to do
print "you may pass, %s" % s
this will allow you to enter
80 matches
Mail list logo