On Sat, 28 May 2022 21:11:00 -0500, Jack Gilbert <00jhen...@gmail.com>
declaimed the following:
>also, the same line: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022,
>23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 in CMD prompt
>
>for the life of me I can't figure out how to launch python??
>
On 5/28/22 20:11, Jack Gilbert wrote:
> I downloaded 3.10.4 on a 64 bit , 8.1
> also, the same line: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022,
> 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32 in CMD prompt
>
> for the life of me I can't figure out how to launch python??
Sounds like you'r
On 29/05/2022 14.11, Jack Gilbert wrote:
> I downloaded 3.10.4 on a 64 bit , 8.1
> I can see IDLE shell 3.10.1, I see Python 3.10.4 (tags/v3.10.4:9d38120, Mar
> 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
>
> also, the same line: Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022,
> 23:1
On 10/04/2021 22.57, Joseph Roffey wrote:
> Hi, Im looking for some help with my program, I have been set a task to make
> a Strain Calculator. I need it to input two numbers, choosing either Metres
> or Inches for the 'Change in Length' divided by the 'Original Length' which
> can also be in Me
On 2021-03-26 12:42 p.m., Igor Korot wrote:
On top of that - usual stanza applies:
1. OS - Windows, Linux, Mac?
2. OS version?
3. Python version?
4. Are you able to run python interpretor?
5. Socks version you are trying to install?
6. Was install successful?
7. Use a subject that describes th
Hi,
On Fri, Mar 26, 2021 at 11:36 AM Anis4Games wrote:
> Hello python support team , i need help about packages and python modules
>
> That Video Will Explain My Problem
>
Please don't send any attachment to the list - it will be dropped from the
E-mail.
Cut'n'paste any errors you receive dire
Am 03.10.2018 um 09:34 schrieb Timothy Cowell via Python-list:
Could I please ask for help installing Python on Windows 10 - I've tried twice
(Version 3.7 for windows) selecting the install now option. After first attempt
I uninstalled and tried again.
Each time it has put 4 items in the progr
To murdock: What Rhodri wrote is correct. I sense that it might be helpful
for you if I were to tell you that there is a difference between a function
and a function call. If your function were named
MyFunction
then
print (MyFunction)
would print a user-friendly-ish message about the function.
On 02/05/17 03:57, murdock wrote:
I am having a problem that seems to persist. I have written a program that
makes a mathematical calculation and uses a uses library that I have written.
It had been working but somehow in playing around with it, it stoppedgo
figure! But here is the thing,
On Tue, 2 May 2017 12:57 pm, murdock wrote:
> I am having a problem that seems to persist. I have written a program that
> makes a mathematical calculation and uses a uses library that I have
> written. It had been working but somehow in playing around with it, it
> stoppedgo figure! But here
murdock wrote:
BW = float (input ("Enter the Receiver Bandwidth in Hz"))
Signal_to_Noise = float (input ("Enter the Signal to Noise in dB"))
RX_Sensitivity = float (input ("Enter the RX_Sensitivity in dBm"))
#
print ("The Receiver Noise Figure = ",Hamath._Noise_Figure," dBm" )
I
On 05/01/2017 08:57 PM, murdock wrote:
> I am having a problem that seems to persist. I have written a program that
> makes a mathematical calculation and uses a uses library that I have written.
> It had been working but somehow in playing around with it, it stoppedgo
> figure! But here is
On 12/02/2015 04:08 PM, John Strick wrote:
On Wednesday, December 2, 2015 at 12:58:30 PM UTC-6, Dylan Riley wrote:
hi all,
I have been trying to figure out all day why my code is printing single
characters from my list when i print random elements using random.choice the
elements in the list a
On Wednesday, December 2, 2015 at 12:58:30 PM UTC-6, Dylan Riley wrote:
> hi all,
> I have been trying to figure out all day why my code is printing single
> characters from my list when i print random elements using random.choice the
> elements in the list are not single characters for example w
On Wed, Dec 2, 2015 at 1:44 PM, Dylan Riley wrote:
> hi ian what would be the correct code to use in this situation then because
> as far as i am aware the elements of my list should be printed as whole
> elements and not just characters of the elements.
order.append(choice)
--
https://mail.py
On Wednesday, December 2, 2015 at 7:09:23 PM UTC, Ian wrote:
> On Wed, Dec 2, 2015 at 12:58 PM, Dylan Riley wrote:
> > hi all,
> > I have been trying to figure out all day why my code is printing single
> > characters from my list when i print random elements using random.choice
> > the elements
On Wed, Dec 2, 2015 at 12:58 PM, Dylan Riley wrote:
> hi all,
> I have been trying to figure out all day why my code is printing single
> characters from my list when i print random elements using random.choice the
> elements in the list are not single characters for example when i print,
> pri
On Fri, Nov 14, 2014 at 7:45 AM, Rich Cook wrote:
> print "There are", numimages, "images" # 256 in fact...
> for imagenum, (row, col) in enumerate([(row,col) for row in range(numrows)
> for col in range(numcols)]):
> b = Tkinter.Label(frame, compound = Tkinter.TOP)
> b['text'] = os.path
On 11/13/2014 3:45 PM, Rich Cook wrote:
Hi, I'm trying to toss together an image browser in tkinter, and it is so slow
it is unworkable. Here is my code. Can someone point out why it's so slw?
:-) Thanks
root = Tkinter.Tk()
root.geometry("1000x280+300+300")
label = Tkinter.Button(root,
Thanks for the contructive critisism - :D I'll try fix it up!
--
https://mail.python.org/mailman/listinfo/python-list
On 13/09/2013 23:12, William Bryant wrote:
On Thursday, September 12, 2013 9:39:33 PM UTC+12, Oscar Benjamin wrote:
On 12 September 2013 07:04, William Bryant wrote:
> Thanks everyone for helping but I did listen to you :3 Sorry. This is my
code, it works, I know it's not the best way to do i
In <364bcdb3-fdd5-4774-b7d2-040e2ccb4...@googlegroups.com> William Bryant
writes:
> Hello, I've done this so far but why doesn't the mode function work?
> def mode():
> global NumberOfXItems, Themode
> for i in List:
> NumberOfXItems.append(i)
> NumberOfXItems.append(Lis
On Thursday, September 12, 2013 9:39:33 PM UTC+12, Oscar Benjamin wrote:
> On 12 September 2013 07:04, William Bryant wrote:
>
> > Thanks everyone for helping but I did listen to you :3 Sorry. This is my
> > code, it works, I know it's not the best way to do it and it's the long way
> > round b
On 12 September 2013 07:04, William Bryant wrote:
> Thanks everyone for helping but I did listen to you :3 Sorry. This is my
> code, it works, I know it's not the best way to do it and it's the long way
> round but it is one of my first programs ever and I'm happy with it:
Hi William, I'm glad
Thanks everyone for helping but I did listen to you :3 Sorry. This is my code,
it works, I know it's not the best way to do it and it's the long way round but
it is one of my first programs ever and I'm happy with it:
'''#*'
On 09/12/2013 02:08 AM, Jugurtha Hadjar wrote:
Try this on your python prompt
mystring = "ThIs Is ThE wAy SoMe StUpId PeOpLe WrItE i DoN't KnOw WhY!"
mystring.lower()
This should return:
"You shouldn't treat people of stupid, but I feel your pain", or let's
be more realistic:
"this is th
On 09/11/2013 08:33 PM, William Bryant wrote:
@Jugurtha Hadjar
What does user_input.lower() mean/do?
Hello,
As did other people point out, it returns the lower case of a string.
It's not user_input.lower(), it's any_string.lower()
For example:
Try this on your python prompt
mystring = "T
On 9/11/2013 3:31 PM, William Bryant wrote:
What is .lower() ?
The Python docs have a pretty good index that includes 'lower() (str
method)'. Learn to use it.
If you know that .lower is a str method,
>>> help(str.lower)
at interactive prompt prints a page. Learn to use help(ob) also.
--
William Bryant wrote:
> Sent: Wednesday, September 11, 2013 2:32 PM
> To: python-list@python.org
> Subject: Re: Help please, why doesn't it show the next input?
>
> @Dave Angel
>
> What is .lower() ?
Thanks for bottom posting and trimming, but you should
leave some
On 11/9/2013 15:31, William Bryant wrote:
> @Dave Angel
>
> What is .lower() ?
It is a method on the str class.
You could teach yourself. At the interpreter prompt, type
help("test response".lower)
Or on the web:
http://docs.python.org/2/library/stdtypes.html#str.lower
There are lots of
In William Bryant
writes:
> @Jugurtha Hadjar
> What does user_input.lower() mean/do?
String objects have a number of built-in functions, lower() being one of
them. It returns a copy of the string with all uppercase letters converted
to lowercase.
Example:
>>> x = "Hello There"
>>> y
@Dave Angel
What is .lower() ?
--
https://mail.python.org/mailman/listinfo/python-list
@Jugurtha Hadjar
What does user_input.lower() mean/do?
--
https://mail.python.org/mailman/listinfo/python-list
On 11/9/2013 01:39, William Bryant wrote:
> On Wednesday, September 11, 2013 5:11:23 PM UTC+12, John Gordon wrote:
>> In William Bryant
>> writes:
>>
>>
>>
>> > Hey, I am very new to python, I am 13 years old. I want to be able to make
>> > =
>>
>> > a program the caculates the mean, meadi
Hello, William
On 09/11/2013 06:39 AM, William Bryant wrote:
> user_input1 = input(prompt)
I take it you are using Python 3.x . If that's not the case, take a look
at raw_input().
def NOS():
if user_input1 == "String" or user_input1 == "string" or user_input1 == "STRING" or user_inp
On Wednesday, September 11, 2013 5:11:23 PM UTC+12, John Gordon wrote:
> In William Bryant
> writes:
>
>
>
> > Hey, I am very new to python, I am 13 years old. I want to be able to make =
>
> > a program the caculates the mean, meadian and mode. When i run the program,=
>
> > an input fiel
In William Bryant
writes:
> Hey, I am very new to python, I am 13 years old. I want to be able to make =
> a program the caculates the mean, meadian and mode. When i run the program,=
> an input field pops up and says 'Does your list contain, a number or a str=
> ing?' like I want it to, but w
On Sun, 31 Mar 2013 22:41:32 -0700, khaosyt wrote:
> On Monday, April 1, 2013 1:24:52 AM UTC-4, Chris Angelico wrote:
>> On Mon, Apr 1, 2013 at 4:15 PM, wrote:
>>
>> > integer = input("Enter a positive integer: ")
>>
>> > again = raw_input("Again? (Y/N): ")
>>
>>
>>
>> Okay, the fir
On Monday, April 1, 2013 1:24:52 AM UTC-4, Chris Angelico wrote:
> On Mon, Apr 1, 2013 at 4:15 PM, wrote:
>
> > integer = input("Enter a positive integer: ")
>
> > again = raw_input("Again? (Y/N): ")
>
>
>
> Okay, the first thing I'm going to say is: Don't use input() in Python
>
>
On Mon, Apr 1, 2013 at 4:15 PM, wrote:
> integer = input("Enter a positive integer: ")
> again = raw_input("Again? (Y/N): ")
Okay, the first thing I'm going to say is: Don't use input() in Python
2. It's dangerous in ways you won't realize. Use int(raw_input(...))
for something like this
Thanks mucho! That was it!
-- Steve Ferg
--
http://mail.python.org/mailman/listinfo/python-list
Steve Ferg wrote:
> I have a short Python script that uses Tkinter to display an image.
> Here is the script
>
> ===
> import sys, os
> from Tkinter import *
> root = Tk() # A: create a global variable named "root"
>
> def sh
Why do you post the same question twice within 5 minutes of each other?
--
http://mail.python.org/mailman/listinfo/python-list
Sounds like this might do exactly what you need...
http://xoomer.alice.it/infinity77/main/FourWaySplitter.html
Cheers,
John
On Thu, Mar 13, 2008 at 1:45 AM, moonrie <[EMAIL PROTECTED]> wrote:
> On Mar 13, 12:47 pm, "Andrew Rekdal" <@comcast.net> wrote:
> > This seems to work... split then spli
On Mar 13, 12:47 pm, "Andrew Rekdal" <@comcast.net> wrote:
> This seems to work... split then split each side. then tandem the size.
>
> import wx
>
> class Layout(wx.Frame):
>
> def __init__(self, parent, id, title):
>
> wx.Frame.__init__(self, parent, id, title)
>
> sizer = wx.BoxSizer(wx.HORIZON
This seems to work... split then split each side. then tandem the size.
import wx
class Layout(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title)
sizer = wx.BoxSizer(wx.HORIZONTAL)
panel = wx.Panel(self,-1)
splitter = wx.SplitterWindow(panel)
En Mon, 31 Dec 2007 05:09:37 -0200, <[EMAIL PROTECTED]> escribió:
> I am sorry if I was not clear in what I was trying to achieve. All I
> wanted was simple way to achieve what windows does when you use search
> for Files or Folders, and all the files that mach two words like foo
> and bar in the
On Sun, 30 Dec 2007 22:52:32 -0800, Dennis Lee Bieber
<[EMAIL PROTECTED]> wrote:
>On Sun, 30 Dec 2007 23:58:17 -0500, [EMAIL PROTECTED] declaimed the
>following in comp.lang.python:
>
>
>> I am sorry i thought I did say what I was tryng to do.
>
> The only thing I picked up from the thread i
On Sun, 30 Dec 2007 20:49:29 -0800 (PST), John Machin
<[EMAIL PROTECTED]> wrote:
>On Dec 31, 2:44 pm, [EMAIL PROTECTED] wrote:
>> On Sun, 30 Dec 2007 19:29:38 -0800 (PST), John Machin
>>
>>
>>
>>
>>
>> <[EMAIL PROTECTED]> wrote:
>> >On Dec 31, 1:04 pm, [EMAIL PROTECTED] wrote:
>> >> Hello,
>>
>> >
On Dec 31, 2:44 pm, [EMAIL PROTECTED] wrote:
> On Sun, 30 Dec 2007 19:29:38 -0800 (PST), John Machin
>
>
>
>
>
> <[EMAIL PROTECTED]> wrote:
> >On Dec 31, 1:04 pm, [EMAIL PROTECTED] wrote:
> >> Hello,
>
> >> I am new to python and wanted to write something for myself where
> >> after inputing two wo
On Sun, 30 Dec 2007 19:29:38 -0800 (PST), John Machin
<[EMAIL PROTECTED]> wrote:
>On Dec 31, 1:04 pm, [EMAIL PROTECTED] wrote:
>> Hello,
>>
>> I am new to python and wanted to write something for myself where
>> after inputing two words it would search entire drive and when finding
>> both names i
On Dec 31, 1:04 pm, [EMAIL PROTECTED] wrote:
> Hello,
>
> I am new to python and wanted to write something for myself where
> after inputing two words it would search entire drive and when finding
> both names in files name would either copy or move thoe files to a
> specified directory.
>
> But co
>
> after changing i got this
>
> path = r"c:\"
> ^
> SyntaxError: EOL while scanning single-quoted string
Sorry about that. You can't end with a backslash - my bad. I just
tried this in the interpreter and 'c:' works.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 30 Dec 2007 18:42:50 -0800 (PST), infixum <[EMAIL PROTECTED]>
wrote:
>
>> path = r"c:\\"
>
>I don't know if this is the whole problem, but this line should read
>r'c:\' (one backslash).
after changing i got this
path = r"c:\"
^
SyntaxError: EOL while scanning single-
> path = r"c:\\"
I don't know if this is the whole problem, but this line should read
r'c:\' (one backslash).
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 13, 12:38 pm, sberry <[EMAIL PROTECTED]> wrote:
> I have a SOAP server running using SOAPpy. The problem I am having is
> that it only handles a single request at a time. It needs to be able
> to accept as many simultaneous requests as come in.
>
> What is the best way to achieve this? I
darren112 wrote:
> Hi Im new to python and I desperately need help with this task
> This is everything of what I need to do...
>
> The program to be written in Python obviously..
>
> The program should support brute-forcing of the authentication process
> for a Telnet server via a dic
Hey yo kiddie, I hope that you are using the web for some time. So you
can get the meaning from my post.:
LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL,
ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL,
ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL, ROTF, LOL,
En Sun, 11 Feb 2007 16:40:45 -0300, darren112 <[EMAIL PROTECTED]>
escribió:
> The program should support brute-forcing of the authentication process
> for a Telnet server via a dictionary attack.
You should first read the Python Tutorial. After you get proficient with
the basic programming st
On Sunday 11 February 2007 13:40, darren112 wrote:
> Hi Im new to python and I desperately need help with this task
> This is everything of what I need to do...
>
> The program to be written in Python obviously..
>
> The program should support brute-forcing of the authentication process
well, this sounds funn.
1) dont expect someone to do your homework.
2) dont expect someone to do dirty homework
3) dont expect someone to do your home work especially when it's
something that could make you problems, or the person that is helping
you
4) from your message i can "read" that you need
darren112 wrote:
> Hi Im new to python and I desperately need help with this task
> This is everything of what I need to do...
>
> The program to be written in Python obviously..
>
> The program should support brute-forcing of the authentication process
> for a Telnet server via a di
Simplest explanation is that you can't do a 'show run' from global
configuration mode
try something like
#exit global configuration mode
tn.write('end\n')
print tn.read_until('#')
#disable pause after 24 lines
tn.write('term len 0\n')
tn.read_until('#')
#now show the entire running-config
t
Ralph H. Stoos Jr. wrote:
> File "autotp.py", line 21
> ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ")
> ^
please post the entire output and the surrounding code (as much as
reasonable).
It may well be some paranthesis error, as alreasy stated.
--
Thomas Jollans - http:
Ralph H. Stoos Jr. enlightened us with:
> File "autotp.py", line 21
> ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ")
> ^
Please post the entire traceback, so we can see the actual error
message. Posting the context of the bad line also wouldn't hurt.
Sybren
--
The probl
Welcome to Python! :-)
You may find this mailing list useful:
http://mail.python.org/mailman/listinfo/tutor
--
http://mail.python.org/mailman/listinfo/python-list
"Ralph H. Stoos Jr." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> HELP PLEASE: What is wrong with this?File "autotp.py", line 21
> ready = raw_input("Ready to proceed ? TYPE (y)es or (n)o: ")
> ^
Probably the parenthesis you forgot to close on the preceding line ...
C
Oh, no I did not create any modules, wish I had the knowledge to do so!
I think I've moved beyond whatever that issue was and now getting a timeout.
The info is below... any help you can give is appreciate!
I'm running this code...
import os, re, string, urllib, types
data = urllib.urlencode({
livin wrote:
> I beleive so... I cannot know for sure becasue the models are not
> separate... they are in the python23.zlib file... I'm no sure how to check
> the file, it looks as if it is compiled (I'm new to python so forgive my
> ignorance)
Yes, there should be an re module in your Python
I beleive so... I cannot know for sure becasue the models are not
separate... they are in the python23.zlib file... I'm no sure how to check
the file, it looks as if it is compiled (I'm new to python so forgive my
ignorance)
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROT
livin wrote:
> my log...
>
> INFO urllib.urlopen('http://192.168.1.11/hact/kitchen.asp',
> urllib.urlencode({'Action': 'hs.ExecX10ByName+Kitchen+Lights%2C+On
> %2C+100&x=4&y=6'}))
> INFO
> INFO File "Q:\python\python23.zlib\urllib.py", line 78, in urlopen
> INFO File "Q:\python\python23.zli
Grant
Perfect!
Thanks :)
Stewart
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2006-01-01, Stewart Arnold <[EMAIL PROTECTED]> wrote:
>
>> I'm trying to convert a Real Basic routine into Python and I
>> can't read the long integer data from a file.
>
> http://d
On 2006-01-01, Stewart Arnold <[EMAIL PROTECTED]> wrote:
> I'm trying to convert a Real Basic routine into Python and I
> can't read the long integer data from a file.
http://docs.python.org/lib/module-struct.html
--
Grant Edwards grante Yow! Here I am in 53
John Machin wrote:
> BTW, don't use "l".
Excellent advice.
But since the original poster appears to be rather a
newbie, perhaps a little bit of explanation would be
useful.
Variables like l and I should be avoided like the
plague, because in many fonts and typefaces they are
indistinguishab
[EMAIL PROTECTED] wrote:
> Good day:
> Probably the answer to my question is staring me in the face, but the
> solution escapes me.
>
> The following is the input line of the file: SoftDict-.csv:
> ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14
>
> I expected an instance of Machine()
On 29 Jun 2005 17:55:44 -0700,
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> The following is the input line of the file: SoftDict-.csv:
> ca1017,GRPHScriptSet,ADD/REM,Adobe Acrobat 4.0=2005/06/14
> I expected an instance of Machine() to be created with a name ca1017.
> Instead, an object i
"gargonx" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Even if i put it in exactly the way you did:
>
> >>> import re
> >>> charmatcher = re.compile(r' [A-Z] [\d]?')
> >>>
> >>> ext = dict(D="V1", O="M1", G="S1")
> >>> std = dict(S="H")
> >>>
> >>> decode_replacements ={}
> >>> de
Dennis Lee Bieber wrote:
On 20 Feb 2005 20:12:50 -0800, "gargonx" <[EMAIL PROTECTED]> declaimed
the following in comp.lang.python:
decode_replacements.update([(std[key], key) for key in std])
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: keys
Did you read the reference
gargonx wrote:
Even if i put it in exactly the way you did:
import re
charmatcher = re.compile(r' [A-Z] [\d]?')
ext = dict(D="V1", O="M1", G="S1")
std = dict(S="H")
decode_replacements ={}
decode_replacements.update([(std[key], key) for key in std])
Traceback (most recent call last):
File "", lin
Even if i put it in exactly the way you did:
>>> import re
>>> charmatcher = re.compile(r' [A-Z] [\d]?')
>>>
>>> ext = dict(D="V1", O="M1", G="S1")
>>> std = dict(S="H")
>>>
>>> decode_replacements ={}
>>> decode_replacements.update([(std[key], key) for key in std])
Traceback (most recent call las
gargonx wrote:
I think there's a problem with the code:
py> decode_replacements.update([(std[key], key) for key in std])
py> decode_replacements.update([(ext[key], key) for key in ext])
when i run this i get an error:
AttributeError: keys
I can't get that figured out
Can you show the part of you
I think there's a problem with the code:
py> decode_replacements.update([(std[key], key) for key in std])
py> decode_replacements.update([(ext[key], key) for key in ext])
when i run this i get an error:
AttributeError: keys
I can't get that figured out
--
http://mail.python.org/mailman/list
gargonx wrote:
let's take the word "dogs"
ext = dict("D":"V1", "O":"M1", "G":"S1")
std = dict("S":"H")
encode("DOGS") # proc()
we'll get: "V1M1S1H"
let's say i want to do just the opposite
word: "V1M1S1H"
decode("V1M1S1H")
#how do i decode "V1" to "D", how do i keep the "V1" together?
an
let's take the word "dogs"
ext = dict("D":"V1", "O":"M1", "G":"S1")
std = dict("S":"H")
encode("DOGS") # proc()
we'll get: "V1M1S1H"
let's say i want to do just the opposite
word: "V1M1S1H"
decode("V1M1S1H")
#how do i decode "V1" to "D", how do i keep the "V1" together?
and get: "DOGS
gargonx wrote:
Well that seems to work like a champion, but my prob then would be; how
do i get the double character values of ext to turn back to the single
character keys. The reversed (decode if you will).
It's unclear what you want to do here. If you have say:
ext = dict(aa='A', ab='B', bb='C'
Well that seems to work like a champion, but my prob then would be; how
do i get the double character values of ext to turn back to the single
character keys. The reversed (decode if you will). Thanks a lot Steve
this has been a great learning!
--
http://mail.python.org/mailman/listinfo/python-li
gargonx wrote:
yes the items in std are always single to single, and ext single to
double. basicly the ext are refernce to the std itmes. the second
character in ext is a number depending on how far it is from the item
in std. this is just a simple encoding program.
If your keys are always single c
yes the items in std are always single to single, and ext single to
double. basicly the ext are refernce to the std itmes. the second
character in ext is a number depending on how far it is from the item
in std. this is just a simple encoding program.
--
http://mail.python.org/mailman/listinfo/py
gargonx wrote:
This works much better, aside from the fact that it does'nt work for
the std dictionary. the letters used from here stay the same. that
dictionary looks like this:
std = {
"A":"Z",
"Z":"A",
"B":"Y",
"Y":"B",
"C":"X",
"X":"C",
"E":"V",
"V":"E",
"H":
[EMAIL PROTECTED] wrote:
add just below the procedure declaration 'global t2' as you're
referring to a global variable ...
More specifically, *modifying* it. Just referring to it
doesn't require a "global" declaration...
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Thanks that works very well
--
http://mail.python.org/mailman/listinfo/python-list
This works much better, aside from the fact that it does'nt work for
the std dictionary. the letters used from here stay the same. that
dictionary looks like this:
std = {
"A":"Z",
"Z":"A",
"B":"Y",
"Y":"B",
"C":"X",
"X":"C",
"E":"V",
"V":"E",
"H":"S",
"S":"
add just below the procedure declaration 'global t2' as you're
referring to a global variable ...
--
http://mail.python.org/mailman/listinfo/python-list
Erik Max Francis wrote:
[EMAIL PROTECTED] wrote:
UnboundLocalError: local variable 't2' referenced before assignment
...
t2=""
def Proc(text): # "text" is some random text or use OrigText
...
The fix is to declare t2 global at the top of Proc:
def Proc(text):
global t2
.
[EMAIL PROTECTED] wrote:
t2=""
def Proc(text): # "text" is some random text or use OrigText
for word in text:
for letter in word:
if letter in std.keys():
letter=std[letter]
t2=t2+letter # the problem is referene to this
elif lett
[EMAIL PROTECTED] wrote:
UnboundLocalError: local variable 't2' referenced before assignment
...
t2=""
def Proc(text): # "text" is some random text or use OrigText
for word in text:
for letter in word:
if letter in std.keys():
letter=std[letter]
96 matches
Mail list logo