On Wed, 2009-09-16 at 18:03 +0530, Ansuman Dash wrote:
> if "Request timed out.." not in a:
> print("Ping is not successful.")
> pLogger.info("Ping is not successful.")
This will check for the string "Request timed out.." is NOT in a. Now
when the ping i
Hi,
Thank you very much for the quick response.
Code is working fine.
Now I am trying to validate that the command is executed successfully.
I have written following script to validate the log file which is created
after running the command.
=
Ansuman Dash schrieb:
Hello Everybody,
In Python scripting, how can I execute a command (which can be run from
spcific directory) and then retrieve the result (after executing the
command it give the command is executed successfull or not), so that I
can validate it.
Thanks,
AD
import
> From: chris Hynes
> Date: 2009/7/15
> Subject: The why
> To: roadier...@googlemail.com
>
>
> Well, I'm trying to create an interactive program, let's say I'm
> running the program, I ask the user to give the array a name, I then
> do some computations and store the results in that array. While I
You need to read what dictionaries are.
Essentially, any time you think "oh I need to keep separate variables
for these values, but I won't know what their names are until
runtime!" the correct answer is to not try to manipulate them into
variables, but to use them as dictionary keys, or organize t
"Angus Rodgers" wrote
parsing these two sentences:
Time flies like an arrow.
Fruit flies like a banana.
Or the translation program that translated the expression
Out of sight, out of mind
from English to Russian and back with the result:
Invisible, lunatic
Alan G.
>Date: Thu, 9 Jul 2009 04:12:55 +0100
>From: Rich Lovely
>Message-ID:
>
>
>Natural language parsers are one of the hardest things to create.
I think the most famous illustration of this is the problem of
parsing these two sentences:
Time flies like an arrow.
Fruit flies like a banana.
--
oops.. I just realized I attached the wrong example for the API-- it was off
by number, this one works:
print urllib.urlopen('
http://words.bighugelabs.com/api/2/e413f24701aa30b8d441ca43a64317be/moving/').read(
)
The example makes sense to me and I can see how it is difficult to figure
out a natu
2009/7/9 Pete Froslie :
> I see.. that makes sense. Kind of new with python -- sorry for that.
>
> after printing using this:
>
> print
> urllib.urlopen('http://words.bighugelabs.com/api/2/e413f24801aa30b8d441ca43a64317be/moving/').read()
>
> I'm getting a format like this returned:
>
> adjective|s
I see.. that makes sense. Kind of new with python -- sorry for that.
after printing using this:
print urllib.urlopen('
http://words.bighugelabs.com/api/2/e413f24801aa30b8d441ca43a64317be/moving/').read(
)
I'm getting a format like this returned:
adjective|sim|streaming
adjective|sim|swirling
ad
2009/7/9 Pete Froslie :
> No problem, thanks for taking the time.
>
> I'm actually trying to resolve this error now:
>
> buff.append(" ".join(lookup(Word) for Word in line.split()))
> NameError: global name 'lookup' is not defined
>
> ..also assume I need to change 'Word' to something that check
No problem, thanks for taking the time.
I'm actually trying to resolve this error now:
buff.append(" ".join(lookup(Word) for Word in line.split()))
NameError: global name 'lookup' is not defined
..also assume I need to change 'Word' to something that checks the next word
in the text file and
2009/7/9 Pete Froslie :
> Great Richard, thanks..
>
> I'm getting an error as follows:
>
> from __future__ import with_statement
> SyntaxError: from __future__ imports must occur at the beginning of the file
>
> I don't think this is the issue in need of rework and have tried a few quick
> reworks.
Great Richard, thanks..
I'm getting an error as follows:
from __future__ import with_statement
SyntaxError: from __future__ imports must occur at the beginning of the file
I don't think this is the issue in need of rework and have tried a few quick
reworks.. I'll read up a bit on 'with'
cheers
2009/7/9 Pete Froslie :
>
>
> -- Forwarded message --
> From: Pete Froslie
> Date: Wed, Jul 8, 2009 at 8:53 PM
> Subject: Re: [Tutor] thesaurus
> To: Robert Berman
>
>
> Thanks Robert,
>
> I will try this out.. at the moment I'm playing with an API from
> 'http://words.bighugelabs
On Wed, Jun 24, 2009 at 6:16 PM, Richard
Lovely wrote:
> (oops... forgot to reply-all)
>
>
> -- Forwarded message --
> From: Richard Lovely
> Date: 2009/6/25
> Subject: Re: [Tutor] Problems with parameter queries
> To: Eduardo Vieira
>
>
> 2009/6/24 Eduardo Vieira :
>> Hello, I am
def get(numbers):
print 'Calling ', numbers
sleep(1)
print 'Connected '
sleep(1)
def call_numbers():
for i in range(9549355543, 9549355560):
numbers = i
get(numbers)
call_numbers()
Is there a technical name for a loop like this?
For loop? That is what I c
David wrote:
Subject:
Re: [Tutor] Find files without __doc__ strings
From:
David
Date:
Mon, 18 May 2009 14:02:38 -0400
CC:
tutor@python.org
Lie Ryan wrote:
David wrote:
spir wrote:
Le Sat, 16 May 2009 21:46:02 -0400
Dave
Slashes in linux indicate a directory path. You use them when trying to specify
paths. You can also use them to specify a path to a file.
Sent from my Verizon Wireless BlackBerry
-Original Message-
From: David
Date: Tue, 12 May 2009 20:07:10
To:
Subject: [Tutor] [Fwd: Re: simply
On Sat, Jan 24, 2009 at 10:36 AM, Vicent wrote:
> But this is not nice:
>
type(a)
>
a
> True
a = 0
type(a)
>
>
>
> I mean, being "a" a boolean variable, it works as if it was a number, but
> every time I want to update the value of "a", I must put "False" for 0 and
> "True"
Thx for help,
extreme lack of free time lately,
will look into it.
[Wouldn't've noticed myself that urlopen is not a class.]
On Tue, Dec 23, 2008 at 6:03 PM, Richard Lovely
wrote:
> OK, going on Kent's post:
>
> from urllib import urlopen
>
> class fetch(object):
>def __init__(self, *args):
OK, going on Kent's post:
from urllib import urlopen
class fetch(object):
def __init__(self, *args):
self.response = urlopen(*args)
self.content = self.response.read()
I forgot urlopen was a function. It made sense in my head for it to
be a class, instead of _returning_ a c
On Tue, Dec 23, 2008 at 9:31 AM, Omer wrote:
from urllib import urlopen
class fetch(urlopen):
> ... def __init__(self,*args):
> ... urlopen.__init__(self, *args)
> ... self.content = self.read()
> ...
>
> Traceback (most recent call last):
> File "", line 1, in
>
With the amount of information provided so far, I'd say you need to step
back and question your initial assumptions. Python shouldn't have a
great deal of trouble reading variable-length binary data blocks, and
the overhead of doing that is probably a lot less than it would be to
have another
> > high, low = ((num % 2**16) >> 8, num % 2**8) or something thereabouts.
My take would be something like
high, low = (num >> 8) & 0xff , num & 0xff
In case you want another option. This is probably more
efficient since you're not raising to powers or taking the
modulus, although for all I kn
I'm not sure if those values are correct; I can check later tonight,
but I'm doing some statechart diagrams for class right now. They
sound reasonable but I can't be sure.
On Mon, Oct 20, 2008 at 11:20 AM, shawn bright <[EMAIL PROTECTED]> wrote:
> jeez, i screwed up, i ment num = 600, not 6
> th
No, I'm not sure what you mean.
Given this number
100101010101101011
the operation will slice off bits on the left with the % 2**16 so that
we only have 16 bits,
0101010101101011
then it will shift this value to the right so that we only have the
highest 8 bits
01010101
that will be stored in hig
thanks, Luke,
got me started anyway.
shawn
On Mon, Oct 20, 2008 at 11:23 AM, Luke Paireepinart
<[EMAIL PROTECTED]> wrote:
> I'm not sure if those values are correct; I can check later tonight,
> but I'm doing some statechart diagrams for class right now. They
> sound reasonable but I can't be su
jeez, i screwed up, i ment num = 600, not 6
thanks
On Mon, Oct 20, 2008 at 11:16 AM, Luke Paireepinart
<[EMAIL PROTECTED]> wrote:
> No, I'm not sure what you mean.
> Given this number
>
> 100101010101101011
>
> the operation will slice off bits on the left with the % 2**16 so that
> we only have 1
so using this, if num ==6, then i should get 2 and 88 ?
thanks, just checking to make sure i get what you wrote.
shawn
On Mon, Oct 20, 2008 at 11:00 AM, Luke Paireepinart
<[EMAIL PROTECTED]> wrote:
> -- Forwarded message --
> From: Luke Paireepinart <[EMAIL PROTECTED]>
> Date: Mon,
Title: Signature.html
I've done far worse by hitting the wrong key! ;-) I see a post above
gets into the class idea.
Jaggo wrote:
Silly google sent in the middle of my editing. Good
thing it only sent to you then. Please, ignore these 2 messages. Sorry
'bout the mess.
-- Forwa
>if pitch == csharp:
>runmyprogram(now)
Yep, that is something what I'm looking for. And maybe with some other
thing than pitch too (don't know what you can get from a sound file).
But I looked at most of the examples of the modules and couldn't find
anything like this.
W W schreef:
The point of a lot of these challenges is to be smart with your math as well
as your code. A brute force approach isn't going to work very well,
especially in this case. An integer with 7^20 trailing zeros isn't even
going to fit in your RAM.
An observation: every trailing zero implies a fac
Just a tidbit:
A neat function my friend came up with last year to figure out the
length of a whole number (now converted to python for your viewing
pleasure):
from math import log10 as log
from math import floor
def findNumberLength(number):
number = float(number)
x = log(number)
x
On Fri, June 6, 2008 3:37 pm, Andreas Kostyrka wrote:
> On Friday 06 June 2008 18:19:23 you wrote:
>
>> On Thu, June 5, 2008 9:39 am, Andreas Kostyrka wrote:
>>
>>> On Thursday 05 June 2008 00:18:55 Marilyn Davis wrote:
>>>
You listed __init__ and I'm not sure I know what you mean.
>>>
>
On Friday 06 June 2008 18:19:23 you wrote:
> On Thu, June 5, 2008 9:39 am, Andreas Kostyrka wrote:
> > On Thursday 05 June 2008 00:18:55 Marilyn Davis wrote:
> >> You listed __init__ and I'm not sure I know what you mean.
> >
> > Well, __init__ can assign attributes to the instance that are callabl
On Thursday 05 June 2008 00:18:55 Marilyn Davis wrote:
>
> You listed __init__ and I'm not sure I know what you mean.
>
Well, __init__ can assign attributes to the instance that are callable.
Andreas
signature.asc
Description: This is a digitally signed message part.
___
I´m running Fedora 8, in this case the command is
su -c 'command'.
I also think it's better to allow a specific user to use smartctl.
I will do that.
Thank´s, it was really helpfull.
_Ricardo
2008/5/30 W W <[EMAIL PROTECTED]>:
> Curse my forgetting to reply to all!
>
> -- Forwarded m
On Fri, May 23, 2008 at 2:25 PM, Moishy Gluck <[EMAIL PROTECTED]> wrote:
> I came in python around 2.5. So I've been using "Boolean and 1 or 2".
For Python 2.5 you should use the new syntax
1 if Boolean or 2
It doesn't have the problems of the unofficial syntax you quote.
Kent
I don't know if this is the best solution, but what I usually do is
create a list that matches the key:
mydict = {}
mylist = []
for x in range(1, 10):
key = raw_input("Enter the key: ")
mydict[key] = value
mylist.append(key)
You just have to change it to read from a file/hard code all
On Wed, May 21, 2008 at 12:00 PM, Moishy Gluck <[EMAIL PROTECTED]> wrote:
> You appear to be referring to list comprehension.
No, it is not a list comp. See my separate reply.
Kent
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/
line.strip()
for line in file: => line will contain '\n' at the end of the string.
Andreas
Am Montag, den 14.04.2008, 00:08 -0700 schrieb Que Prime:
>
> This is what I came up with after writing it out and reading the
> corresponding functions. I feel I'm close but something is still
> awry.
>
Marc Tompkins wrote:
> Myself, I have a horrible time writing pseudocode without slipping into
> real-code syntax
Me too - often Python is more concise, precise and expressive than
English for expressing an algorithm.
> while len(possibleQuestions) > 0:
could be simply
while possibleQuest
Would you consider a python-Tutor team member who:
1. Is new to Python?
2. Never worked with a programming team before?
3. Doesn't have much gaming experience?
4. Doesn't have a recent version of MS-Windows (has Mac OS X or GNU/Linux)?
5. May not be running the latest and greatest version of Pytho
On 10/10/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Stephen Nelson-Smith wrote:
> > But if I want to run the same procedure on a remote host, and store
> > the results in a dictionary so they can be compared, what would I do?
>
> What kind of access do you have to the remote host? If you have
>
Stephen Nelson-Smith wrote:
> But if I want to run the same procedure on a remote host, and store
> the results in a dictionary so they can be compared, what would I do?
What kind of access do you have to the remote host? If you have
filesystem access you can use the same program running locally.
> print 'testvar: %.2f' % testvar
> Output:
> testvar: 10.0123
Should be:
print 'testvar: %.4f' % testvar
Output:
testvar: 10.0123
--
bhaaluu at gmail dot com
On 9/24/07, bhaaluu <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I ran the code sample you sent and found a couple of errors
> that woul
Greetings,
I ran the code sample you sent and found a couple of errors
that wouldn't let the code run.
The first error has to do with variable assignment.
When you assign a variable, it is usually on the left and
what you want to assign to it is on the right. See Lines 25,29.
The second error ha
It's not a homework problem it is a practice problem to figure out how to
code, to be able to do the assignments...
Chris wrote:
> If I sent you the problem can you build it so I know what it is suppose to
> look like? I've spend too much time it, and made it worse...all I know is
> that it does
"Terry" <[EMAIL PROTECTED]> wrote
> I was using the "t1 == int(t1)" type compare, that I
> learned in BASIC about 25 years ago, to discover
> a remainder or no.
What a pity. Even the most elementary BASIC has
always had the MOD operator for finding remainders.
and a \ operator for integer d
Adam Urbas wrote:
> Sorry about all that trouble for you Alan, after I posted that, I
> reformatted my code a bit and updated it to do the defining and then
> the calling, like you said. The only problem I had, and I was
> probably doing something wrong, was that I would do:
>
> choice()
> if choi
Sorry about all that trouble for you Alan, after I posted that, I
reformatted my code a bit and updated it to do the defining and then
the calling, like you said. The only problem I had, and I was
probably doing something wrong, was that I would do:
choice()
if choice in["1","circle"]:
circle
Hi Adam
> flaw in my loop. It is not infinite.
In fact you don't have a loop, your program
is really just a simple sequence.
#Welcome screen:
def welcome():
print "Welcome to the Area Calculation Program."
print
welcome()
AG:Since you only call this once there is no point in putting
A
Once again this is my latest version. I know of several problems,
such as the previously posted infinite looping problem. Also, if
sends you to the wrong place sometimes. Ex: a second ago, I pressed
4 to exit (which does not work either) and it took me to triangle.
I'm not sure how to end the
Ok I forgot to put some things on the previous one. I discovered a
flaw in my loop. It is not infinite. If you select circle, radius,
enter the radius, circle, radius, enter the radius, then the program
stops. I want it to be able to keep going as many times as needed,
infinitely. So that the
I think I may have figured it out. I just switched some things around.
On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote:
I can't seem to get the type with the parameters to work. I can get
def answer(): to work, but not def
answer(my_first_parameter,my_second_parameter):. I'm not too
concerne
I can't seem to get the type with the parameters to work. I can get
def answer(): to work, but not def
answer(my_first_parameter,my_second_parameter):. I'm not too
concerned, as I haven't yet needed to use that. But, when I use the
parameter type, it runs without error messages, but doesn't disp
Adam Urbas said unto the world upon 05/30/2007 11:01 AM:
> I can't exactly show you the error message anymore, because the program is
> now screwed up in so many ways that I can't even get it to do the things it
> used to.
>
> It says things like ERROR: Inconsistent indentation detected!
> 1) Your
Ahahahahaha... I have figured these out beyond comprehension and power.
Wahhaha. It feels good to get something to work correctly. Thanks much
Andre. I don't quite understand the putting of things inside the
parentheses, but I've discovered that I don't really need to, because def
text(): works
I can't exactly show you the error message anymore, because the program is
now screwed up in so many ways that I can't even get it to do the things it
used to.
It says things like ERROR: Inconsistent indentation detected!
1) Your indentation is outright incorrect (easy to fix), OR
2) Your indenta
2007/5/30, Brian van den Broek <[EMAIL PROTECTED]>:
> Another fwd, folks.
>
> Brian vdB
>
> Original Message
> Subject: Re: [Tutor] trouble with "if"
> Date: Tue, 29 May 2007 23:28:46 -0500
> From: Adam Urbas <[EMAIL PROTECTED]>
> To: Brian van den Broek <[EMAIL PROTECTED]>
> Refe
Cecilia Alm wrote:
> 2007/4/30, Kent Johnson <[EMAIL PROTECTED]>:
> . Also if you are adding or deleting from the dict
>> during the iteration then dict.keys() is safer because the list of keys
>> is created before the add and delete.
>
> Thanks for the response; by adding and deleting, I assume y
Anil,
I'm also confused about what you are trying to do. Are you writing a
client application that talks to a web application? A web application
that talks to a different web application? A new part of an existing web
application? What are you using web.py for? What does facebook have to
do wi
* Stefan Heyne <[EMAIL PROTECTED]> [061218 09:51]:
> OK, thanksno I get the data into a file output..but I still am stuck
> with the formatting...
> 1) there are brackets around the data that are due to the necessary (??)
> conversion to a string
> 2) I cannot figure out how to insert a newli
doug shawhan wrote:
> [lots of stuff!]
You seem to have a penchant for choosing entertaining, albeit confusing,
words to explain what you're thinking.
I have a similar inclination; however, I'll attempt to avoid this so
that my explanation will make more sense :)
Now we begin.
First, an example
> From: Asrarahmed Kadri <[EMAIL PROTECTED]>
> Date: Oct 12, 2006 9:17 AM
> Subject: Re: [Tutor] Help with basic user-data file
> To: Rob Andrews <[EMAIL PROTECTED]>
>
>
> Thanks.
> Can you please also tell me how to check the existence of a file using
> python builtin functions.
If path is a st
Python wrote:
> On Thu, 2006-10-05 at 09:17 -0500, Luke Paireepinart wrote:
> (actually from Frank)
>>> I have a parameterized string template, I publish it using
>>>
>>> print mytemplate % locals()
> Original post asked to create variable in local namespace from string.
>> so I want to assign a
On Thu, 2006-10-05 at 09:17 -0500, Luke Paireepinart wrote:
(actually from Frank)
> > I have a parameterized string template, I publish it using
> >
> > print mytemplate % locals()
Original post asked to create variable in local namespace from string.
> so I want to assign a value to a variable w
On Tue, Oct 03, 2006 at 05:05:59PM +1300, Liam Clarke wrote:
>
>
> Original Message
> Subject: Re: [Tutor] database web app, what tool?
> Date: Mon, 02 Oct 2006 09:33:28 +0100
> From: [EMAIL PROTECTED]
> To: Liam Clarke <[EMAIL PROTECTED]>
> References:
2006/10/4, Kent Johnson <[EMAIL PROTECTED]>:
> hey i added another guessing feature that shuld guess the number in the
> most
> effective way
> but i keep getting into endless loops thought you might want it
> any help with the loops would be great
What's the value of number? Where is it defined
> To: Liam Clarke <[EMAIL PROTECTED]>
> References: <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
>
>
>
> Thank you Liam,
>
>
> Our web server is IIS, but it would be no problem to use
> another one for this
> particular purpose.
>
> I'v been looking for information on h
Alan Gauld wrote:
>
>> Why does the python shell says this:
>>
> print exec.__doc__
>> File "", line 1
>>print exec.__doc__
>> ^
>> SyntaxError: invalid syntax
>
>
> exec, like print, is a statement, or command, not a function.
>
> You get the same response if you try
>
>
> Why does the python shell says this:
>
print exec.__doc__
> File "", line 1
>print exec.__doc__
> ^
> SyntaxError: invalid syntax
exec, like print, is a statement, or command, not a function.
You get the same response if you try
>>> print print.__doc__
or
>>> help(pr
Zsiros Levente wrote:
> Why does the python shell says this:
>
>
print exec.__doc__
> File "", line 1
> print exec.__doc__
> ^
> SyntaxError: invalid syntax
>
>
> While it works with "eval".
exec is a statement that is interpreted by the compiler and compil
Why does the python shell says this:
>>> print exec.__doc__
File "", line 1
print exec.__doc__
^
SyntaxError: invalid syntax
While it works with "eval".
Anyway, I'm quite impressed with the resposiveness of this list. Thanks
a lot.
Zsiros Levente wrote:
>
>
> Sorry, the s
Zsiros Levente wrote:
> Sorry, the source was for my tkinter question. I'm a bit disorganized
> today.
>
> The problematic part is the 11. line, where I have to convert the item
> selected from the list to an object, or something like that. At the
> moment it only applies to a string object, but
> I forgot the most important thing: the attachment.
OK, Here is my annotated version. not sure if it
will solve your problem though...
#
#!/usr/bin/python
# In this program I wanted to write the event
> on my own, combining , and
from Tkinter import *
def handl
Bill Carson wrote:
> Do you know how to create instances of dictionaries, lists, integers,
> longs, etc without having to specify it in code...
>
> Instead of specifying:
> a={"bla":1}
> or ...
> a=[1,2,3]
>
> Is there another way??
I'm not really sure what you are looking
shivayogi kumbar wrote:
>
>
> I downloaded python plugin for eclipse by directly downloading zip file
> and extracting under eclipse folder; because it could not update via
> PROXY. It was suggested to update plugins from eclipse IDE only. I am
> unable to use that plugin(Python) in eclipse.
On 15/03/06, Sam B <[EMAIL PROTECTED]> wrote:
> I'm keen!
>
> what shoe type do you reccomend?
Non-marking cross trainers will do.
If you want to spend more money, go into shoe clinic and tell them you
want shoes for playing indoor ultimate. I ended up with a pair of
Adidas handball shoes. Expe
Sorry guys, total brain fart there :-)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Ben,Yes, that's the point: Python doesn't know when to stop. *grin*
The way we've rewritten the loop:while True:...is an "infinite" loop that doesn't stop unless something in the loop'sbody does something extraordinary, like "breaking" out of the loop.
Python is much dumber than we
> Here's one way we can avoid the problem:
>
> while True:
> word = f.readline()
> defn = f.readline()
> if not word or not defn:
>break
> ...
>
> Does this make sense?
>
> It does mostly...I don't see why you need the:
>
> if not word or not defn:
Simon Gerber wrote:
>>store.write(rate + '\n')
>>
>>
>
>With this:
>
> store.write(`rate` + \n')
>
>Note that these are not your regular sungle quotes. You'll find them
>above the tab key, under escape, on most standard keyboards.
>
>
I have to say I don't like that. It's
Hi Ismael,
I'm glad you found the answer. It is very enlightening as I thought I
had to do with locale and did some tests without getting the problem (I
do not have BS installed now)
As I speak Spanish this had got me worried. :/
Hugo
Ismael Garrido wrote:
> Found the problem myself.
> (loo
Found the problem myself.
(look down)
Ismael Garrido wrote:
> This is the script:
>
> import BeautifulSoup
> import os
>
> a = open("zona.htm")
> text = a.readlines()
> a.close()
>
> BS = BeautifulSoup.BeautifulSoup(str(text))
Apparently, str(text) is the cause of the problem. If instead I do:
Liam Clarke wrote:
> And, a question for the group, I've always found that line[:1] is a
> complicated way of writing line[0]... is there any time when line[:1]
> != line[0]?
Actually I would say that the general case is for them to be different and in
the special case where line is a string they
On 10/21/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Ed Singleton wrote:
> > A quick tip for the Windows command line.
> >
> > Ctrl-C, Ctrl-A etc don't work, neither does right-clicking
> > (menu-click). However, right-clicking does work on the blue title
> > bar.
>
> If you turn on Quick Edit (
Ed Singleton wrote:
> A quick tip for the Windows command line.
>
> Ctrl-C, Ctrl-A etc don't work, neither does right-clicking
> (menu-click). However, right-clicking does work on the blue title
> bar.
>
> Right-click on the blue title bar and then go down to Edit and then
> you can Select All.
Michael Cotherman wrote:
> The c code seems to be walking through the list moving
> bytes from src to dst, but the python code below seems
> to take one byte from src, start counitng up to the
> value from 1 and appending each and every value along
> the way to dst, no?
Ah, right you are. You are
The c code seems to be walking through the list moving
bytes from src to dst, but the python code below seems
to take one byte from src, start counitng up to the
value from 1 and appending each and every value along
the way to dst, no?
-mike
--- Alan Gauld <[EMAIL PROTECTED]> wrote:
> > I am a
Michael Cotherman wrote:
>>... is the decoding code, it does what you
>>describe below. It is adding the zeros back in, that
>>is the dst.append('\0')
>>
>>Kent
>
> Really??? I am a noob, but it looks like it only puts
> a \0 at the end if code (the length) is less than 255,
> as the if statem
> ... is the decoding code, it does what you
> describe below. It is adding the zeros back in, that
> is the dst.append('\0')
>
> Kent
Really??? I am a noob, but it looks like it only puts
a \0 at the end if code (the length) is less than 255,
as the if statement is out of the for loop? thi
Michael Cotherman wrote:
> def UnStuffData(src,dst,len):
>
>for code in src:
> for i in range(1,code):
> dst.append(i)
>
> if code < 0xff
> dst.append('\0')
>
> the above is the below code uncommented...
> it(and the original code) just seem to find the end
def UnStuffData(src,dst,len):
for code in src:
for i in range(1,code):
dst.append(i)
if code < 0xff
dst.append('\0')
the above is the below code uncommented...
it(and the original code) just seem to find the end
and puts a zero there...
I do not see the exis
This is exactly what i was looking for
For those following, the \x00 added at the end of the
packet is just imaginary and represents
in the meantime, I made the following that just
'decobs' a series of packets (only 8-10 bytes) that
are coming in over the com port. (my incoming packets
also b
Alan Gauld wrote:
>> return (UINT)(dst - dstStart);
>> }
>
>
> This looks odd, I don't think I understand what it does.
> It seems to return an address thats potentially (probably?!)
> before the start of the original dst...
It's returning the length of dst.
Kent
__
> I am a noob to converting pointers in C++ to arrays in
> python, although the first time I see it done, I will
> have no problem. Can you help converting the below
> (what I think is the 'decoder' section) to python?
It won't be working code but I think this is whats happening...
> UINT CCobsPa
Alberto Troiano wrote:
> Now I'm stucked in the riddle 6
>
> As I understand I have to find a secret file (which I have but inside there
> is like 900 files)
> and do something with it
One of the files has a name that is unlike all the other ones; take a
look at that one.
> Is it like number
>From: "D. Hartley" <[EMAIL PROTECTED]>
>Reply-To: "D. Hartley" <[EMAIL PROTECTED]>
>To: Alberto Troiano <[EMAIL PROTECTED]>
>Subject: Re: [Tutor] Fwd: Fwd: Python riddles
>Date: Sat, 7 May 2005 17:45:32 -0700
>
>Alberto, "banner" i
301 - 400 of 407 matches
Mail list logo