Re: Basic Python help

2020-10-23 Thread mikael petterson
fredag 23 oktober 2020 kl. 13:22:55 UTC+2 skrev Frank Millman: > On 2020-10-23 12:41 PM, mikael petterson wrote: > > Hi, > > > > I need to use the following code but in java. > > > > END_DELIM = '\n##\n' > > def start_delim(data_len): return '\n#%s\n' % (data_len) > > data = "%s%s%s" % (start

Re: Basic Python help

2020-10-23 Thread Frank Millman
On 2020-10-23 12:41 PM, mikael petterson wrote: Hi, I need to use the following code but in java. END_DELIM = '\n##\n' def start_delim(data_len): return '\n#%s\n' % (data_len) data = "%s%s%s" % (start_delim(len(data)), data, END_DELIM) Can anyone help me to understand what it means: I

Basic Python help

2020-10-23 Thread mikael petterson
Hi, I need to use the following code but in java. END_DELIM = '\n##\n' def start_delim(data_len): return '\n#%s\n' % (data_len) data = "%s%s%s" % (start_delim(len(data)), data, END_DELIM) Can anyone help me to understand what it means: I am guessing now: a function defined "start_delim" ta

Re: Python help needed

2019-08-08 Thread Dan Sommers
On 8/8/19 12:26 PM, Paolo G. Cantore wrote: > I think the special case treatment could be avoided. > > First: Join all items with ' and ' > Second: Replace all ' and ' with ', ' except the last That works great, until one of the elements of the original list is "spam and eggs": >>> spam = [

Re: Python help needed

2019-08-08 Thread Paolo G. Cantore
Am 08.08.19 um 01:18 schrieb MRAB: On 2019-08-07 21:36, Kuyateh Yankz wrote: #trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous sp

Re: Python help needed

2019-08-07 Thread MRAB
On 2019-08-07 21:36, Kuyateh Yankz wrote: #trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous spam list to the function would return

Python help needed

2019-08-07 Thread Kuyateh Yankz
#trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous spam list to the function would return 'apples, bananas, tofu, and cats'. But y

Re: Beginner Python Help

2016-03-19 Thread Terry Reedy
On 3/18/2016 3:04 AM, Alan Gabriel wrote: Hey there, I just started out python and I was doing a activity > where im trying to find the max and min of a list of numbers i inputted. This is my code.. num=input("Enter list of numbers") input returns a string list1=(num.split()) list1 is

Re: Beginner Python Help

2016-03-19 Thread Martin A. Brown
Greetings Alan and welcome to Python, >I just started out python and I was doing a activity where im >trying to find the max and min of a list of numbers i inputted. > >This is my code.. > >num=input("Enter list of numbers") >list1=(num.split()) > >maxim= (max(list1)) >minim= (min(list1)) > >pri

Re: Beginner Python Help

2016-03-19 Thread Jussi Piitulainen
Terry Reedy writes: > On 3/18/2016 3:04 AM, Alan Gabriel wrote: ... >> list1=(num.split()) > > list1 is a list of strings > >> maxim= (max(list1)) >> minim= (min(list1)) > > min and max compare the strings as strings, lexicographically > >> print(minim, maxim) ... > You failed to convert strin

Re: Beginner Python Help

2016-03-19 Thread Chris Warrick
On 18 Mar 2016 08:05, "Alan Gabriel" wrote: > > Hey there, > > I just started out python and I was doing a activity where im trying to find the max and min of a list of numbers i inputted. > > This is my code.. > > num=input("Enter list of numbers") > list1=(num.split()) > > maxim= (max(list1)) >

Re: Beginner Python Help

2016-03-19 Thread Ben Finney
Alan Gabriel writes: > I just started out python and I was doing a activity where im trying > to find the max and min of a list of numbers i inputted. Welcome to Python! As a Python beginner you will be interested to join the ‘python-tutor’ forum https://mail.python.org/mailman/listinfo/tutor>

Beginner Python Help

2016-03-18 Thread Alan Gabriel
Hey there, I just started out python and I was doing a activity where im trying to find the max and min of a list of numbers i inputted. This is my code.. num=input("Enter list of numbers") list1=(num.split()) maxim= (max(list1)) minim= (min(list1)) print(minim, maxim) So the problem is th

Re: new to python, help please !!

2015-11-12 Thread Denis McMahon
On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: > i am a beginning programmer, i am trying to write a simple code to > compare two character sets in 2 seperate files. ( 2 hash value files > basically) Why? If you simply wish to compare two files, most operating systems provide executa

Re: new to python, help please !!

2015-11-12 Thread Denis McMahon
On Thu, 12 Nov 2015 17:55:33 +, Quivis wrote: > On Thu, 12 Nov 2015 13:58:35 +1100, Steven D'Aprano wrote: > >> horribly inefficient > > Assuming it was md5 values, who cares? Those are small. A file of 160 million md5 hashes as 32 character hex strings is a huge file. Your method calculat

Re: new to python, help please !!

2015-11-12 Thread Peter Otten
Tim Chase wrote: > On 2015-11-12 15:56, Peter Otten wrote: >> Tim Chase wrote: >> >> > with open("file1.md5") as a, open("file2.md5") as b: >> > for s1, s2 in zip(a, b): >> > if s1 != s2: >> > print("Files differ") >> >> Note that this will not detect extra lines in one of th

Re: new to python, help please !!

2015-11-12 Thread Tim Chase
On 2015-11-12 15:56, Peter Otten wrote: > Tim Chase wrote: > > > with open("file1.md5") as a, open("file2.md5") as b: > > for s1, s2 in zip(a, b): > > if s1 != s2: > > print("Files differ") > > Note that this will not detect extra lines in one of the files. > I recommend that

Re: new to python, help please !!

2015-11-12 Thread Peter Otten
Tim Chase wrote: > with open("file1.md5") as a, open("file2.md5") as b: > for s1, s2 in zip(a, b): > if s1 != s2: > print("Files differ") Note that this will not detect extra lines in one of the files. I recommend that you use itertools.zip_longest (izip_longest in Python 2)

Re: new to python, help please !!

2015-11-12 Thread paul.hermeneutic
Would some form of subprocess.Popen() on cmp or fc /b be easier? On Nov 12, 2015 7:13 AM, "Tim Chase" wrote: > On 2015-11-12 08:21, Marko Rauhamaa wrote: > > And if you really wanted to compare two files that are known to > > contain MD5 checksums, the simplest way is: > > > >with open('f1.md

Re: new to python, help please !!

2015-11-12 Thread Tim Chase
On 2015-11-12 08:21, Marko Rauhamaa wrote: > And if you really wanted to compare two files that are known to > contain MD5 checksums, the simplest way is: > >with open('f1.md5') as f1, open('f2.md5') as f2: >if f1.read() == f2.read(): >... >else: >... T

Re: new to python, help please !!

2015-11-11 Thread Marko Rauhamaa
Steven D'Aprano : > On Thursday 12 November 2015 04:48, Quivis wrote: > >> On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: >> >>> md5 >> >> If those are md5 values stored inside files, wouldn't it be easier to >> just hash them? >> >> import hashlib >> >> m1 = hashlib.sha224(open('f1'

Re: new to python, help please !!

2015-11-11 Thread Steven D'Aprano
On Thursday 12 November 2015 04:48, Quivis wrote: > On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: > >> md5 > > If those are md5 values stored inside files, wouldn't it be easier to > just hash them? > > import hashlib > > m1 = hashlib.sha224(open('f1').read()).hexdigest() > m2 = has

Re: new to python, help please !!

2015-11-11 Thread Ben Finney
Anas Belemlih writes: > i am a beginning programmer, i am trying to write a simple code to > compare two character sets in 2 seperate files. ( 2 hash value files > basically) Welcome, and congratulations on arriving at Python for your programming! As a beginning programmer, you will benefit f

Re: new to python, help please !!

2015-11-11 Thread Tim Chase
On 2015-11-11 08:34, Anas Belemlih wrote: > i am a beginning programmer, i am trying to write a simple code > to compare two character sets in 2 seperate files. ( 2 hash value > files basically) idea is: open both files, measure the length of > the loop on. > > if the length doesn't match, ==

Re: new to python, help please !!

2015-11-11 Thread John Gordon
In <93aef8e5-3d6f-41f4-a625-cd3c20076...@googlegroups.com> Anas Belemlih writes: > i=0 > s1=line1[i] > s2=line2[i] > count = 0 > if number1 != number2: > print " hash table not the same size" > else: > while count < number1: > if s1 == s2: > print " character", lin

new to python, help please !!

2015-11-11 Thread Anas Belemlih
i am a beginning programmer, i am trying to write a simple code to compare two character sets in 2 seperate files. ( 2 hash value files basically) idea is: open both files, measure the length of the loop on. if the length doesn't match, == files do not match if length matchs, loop while c

Re: Regex Python Help

2015-03-26 Thread Denis McMahon
27;t top post, this is usenet, we don't top post, comments go after the text they comment on soi we can read down the page and it makes sense. 2. You gave the thread the title of "regex python help". 3. Your initial comment was "I am creating a tool to search a filesystem for

Re: Regex Python Help

2015-03-25 Thread Terry Reedy
On 3/25/2015 7:10 PM, Steven D'Aprano wrote: Does Windows shell have grep? How about Powershell? No. I just use Idle's grep (Find in Files). And I generally would even if Command Prompt did have grep. Idle's has the nice feature that output goes in an Output Window, with each line found p

Re: Regex Python Help

2015-03-25 Thread Mark Lawrence
On 25/03/2015 23:10, Steven D'Aprano wrote: On Thu, 26 Mar 2015 08:19 am, Gregg Dotoli wrote: Grep is regular expressions. If I'm using Python, I'll use the Python modules. Silly It very well may be silly. You're using Python regular expressions because you're using Python. Why are you using

Re: Regex Python Help

2015-03-25 Thread Steven D'Aprano
On Thu, 26 Mar 2015 08:19 am, Gregg Dotoli wrote: > Grep is regular expressions. If I'm using Python, I'll use the Python > modules. Silly It very well may be silly. You're using Python regular expressions because you're using Python. Why are you using Python? Early in this thread you said "H

Re: Regex Python Help

2015-03-25 Thread Mark Lawrence
On 25/03/2015 21:19, Gregg Dotoli wrote: Grep is regular expressions. If I'm using Python, I'll use the Python modules. Silly Gregg Clear as mud, and please don't top post. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrenc

Re: Regex Python Help

2015-03-25 Thread Gregg Dotoli
Grep is regular expressions. If I'm using Python, I'll use the Python modules. Silly Gregg On Wednesday, March 25, 2015 at 4:36:01 PM UTC-4, Denis McMahon wrote: > On Tue, 24 Mar 2015 11:13:41 -0700, gdotoli wrote: > > > I am creating a tool to search a filesystem for one simple string. > > man

Re: Regex Python Help

2015-03-25 Thread Denis McMahon
On Tue, 24 Mar 2015 11:13:41 -0700, gdotoli wrote: > I am creating a tool to search a filesystem for one simple string. man grep STOP! REINVENTING! THE! WHEEL! Your new wheel will invariably be slower and less efficient than the old one. -- Denis McMahon, denismfmcma...@gmail.com -- https:/

Re: Regex Python Help

2015-03-25 Thread Gregg Dotoli
't understand the error message, please > say so. > > And choose a relevant subject line: this has nothing to do with regexes. You > might as well have called it "Import Python Help". > > > -- > Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Regex Python Help

2015-03-24 Thread Steven D'Aprano
sages you are given, you are truly going to struggle as a programmer. Read the error message. If you don't understand the error message, please say so. And choose a relevant subject line: this has nothing to do with regexes. You might as well have called it "Import Python Help".

Re: Regex Python Help

2015-03-24 Thread Gregg Dotoli
Here you go. Windows shell was easier!!! for /f %a in (c:\gonow) do echo %a | c:\Python34\python c:\python34\unopy.py %a Now I can use any regex pattern, I need. On Tuesday, March 24, 2015 at 3:54:25 PM UTC-4, Rob Gaddi wrote: > On Tue, 24 Mar 2015 12:43:38 -0700, Gregg Dotoli wrote: > > > [c

Re: Regex Python Help

2015-03-24 Thread Terry Reedy
On 3/24/2015 2:13 PM, gdot...@gmail.com wrote: I am creating a tool to search a filesystem for one simple string. I cannot get the syntax correct. Thank you in advance for your help. import sys import re import os path='/' viewfiles=os.listdir(path) listdir is not recursive, so this code will

Re: Regex Python Help

2015-03-24 Thread Rob Gaddi
On Tue, 24 Mar 2015 12:43:38 -0700, Gregg Dotoli wrote: > [context snipped due to top posting] > > All I need is a loop, should I bag Python and use a simple shell for loop? Honestly, yes. You're not even using a regular expression, just a fixed string you're trying to search for. You can do

Re: Regex Python Help

2015-03-24 Thread Vincent Vande Vyvre
Le 24/03/2015 20:22, Gregg Dotoli a écrit : Thank you! But The print error is gone, but now the script quickly finishes and doesnt walk the OS tree or search. Gregg On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote: I am creating a tool to search a filesystem for one simple

Re: Regex Python Help

2015-03-24 Thread Gregg Dotoli
This works fine , but I have to pipe the filename to the script python stool I am creating a tool to search a filesystem for one simple string. > I cannot get the syntax correct. > Thank you in advance for your help. > > import sys > import re > import os > path='/' > viewfiles=os.listdir(path)

Re: Regex Python Help

2015-03-24 Thread Rob Gaddi
On Tue, 24 Mar 2015 12:10:24 -0700, Gregg Dotoli wrote: > > Thank you Gary, that got rid of the error, but now there is no tree > walk, it runs and immediatley finishes. I just need to grep each file. I > have this working with the windows "for /r %a and redirecting that to > Python, but want to u

Re: Regex Python Help

2015-03-24 Thread Skip Montanaro
On Tue, Mar 24, 2015 at 2:22 PM, Gregg Dotoli wrote: > The print error is gone, but now the script quickly finishes and doesnt > walk > the OS tree or search. > You need to walk the directory tree recursively. Take a look at os.walk(). Skip -- https://mail.python.org/mailman/listinfo/python-li

Re: Regex Python Help

2015-03-24 Thread Vincent Vande Vyvre
Le 24/03/2015 20:38, Vincent Vande Vyvre a écrit : Le 24/03/2015 20:22, Gregg Dotoli a écrit : Thank you! But The print error is gone, but now the script quickly finishes and doesnt walk the OS tree or search. Gregg On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote: I am

Re: Regex Python Help

2015-03-24 Thread Gregg Dotoli
Thank you! But The print error is gone, but now the script quickly finishes and doesnt walk the OS tree or search. Gregg On Tuesday, March 24, 2015 at 2:14:32 PM UTC-4, Gregg Dotoli wrote: > I am creating a tool to search a filesystem for one simple string. > I cannot get the syntax correct.

Re: Regex Python Help

2015-03-24 Thread Gregg Dotoli
Thank you Gary, that got rid of the error, but now there is no tree walk, it runs and immediatley finishes. I just need to grep each file. I have this working with the windows "for /r %a and redirecting that to Python, but want to use Python only. I do have dummy files with the regex string. Th

Re: Regex Python Help

2015-03-24 Thread Gary Herron
On 03/24/2015 11:13 AM, gdot...@gmail.com wrote: I am creating a tool to search a filesystem for one simple string. I cannot get the syntax correct. Thank you in advance for your help. import sys import re import os path='/' viewfiles=os.listdir(path) for allfiles in viewfiles: file= os.pat

Re: Regex Python Help

2015-03-24 Thread Skip Montanaro
On Tue, Mar 24, 2015 at 1:13 PM, wrote: > SyntaxError: Missing parentheses in call to 'print' It appears you are attempting to use a Python 2.x print statement with Python 3.x Try changing the last line to print(line.rstrip()) Skip -- https://mail.python.org/mailman/listinfo/python-list

Regex Python Help

2015-03-24 Thread gdotoli
I am creating a tool to search a filesystem for one simple string. I cannot get the syntax correct. Thank you in advance for your help. import sys import re import os path='/' viewfiles=os.listdir(path) for allfiles in viewfiles: file= os.path.join(path, allfiles) text=open(file, "r") for line

Re: Python Help

2014-10-14 Thread Chris Angelico
On Wed, Oct 15, 2014 at 4:57 PM, Jeffe wrote: > Looking for a something basic yet operational, fee based or we can discuss > equity if succesfully funded. Have some Big people interested with a solid > business framework. Just need the software to show and its on.. > Unfortunately, the Python J

Python Help

2014-10-14 Thread Jeffe
Hi, I am looking for anyone who knows python (C++ is also ok) well enough to write a basic script login registration and tws ib api connected. Looking to build a asset/security trading platform and have investors interested but want to see it operational first. Looking for a something basic y

Re: New to Python, Help to get script working?

2013-12-18 Thread Mark
Actually i live stream nearly everyday for 2 years, the problem with twitch is that the more "popular" people get first dibs and get treated better, have better perks, and all of that... Its all based on your initial viewer count, 90% of viewers just click the top video. All my views and numbers

Re: New to Python, Help to get script working?

2013-12-17 Thread Joel Goldstick
On Tue, Dec 17, 2013 at 12:33 PM, Rick Johnson wrote: > On Monday, December 16, 2013 1:09:38 AM UTC-6, Mark wrote: > > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > I went and looked at the post linked to, and it has > > > buggy indentation. (Quite possibly indicates

Re: New to Python, Help to get script working?

2013-12-17 Thread Rick Johnson
On Monday, December 16, 2013 1:09:38 AM UTC-6, Mark wrote: > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > I went and looked at the post linked to, and it has > > buggy indentation. (Quite possibly indicates that the > > author has two-space tabs, and didn't notice a bug

Re: New to Python, Help to get script working?

2013-12-17 Thread rusi
On Tuesday, December 17, 2013 4:35:31 PM UTC+5:30, Mark wrote: > I am sorry, using google groups i cant tell what you see... > Anyways, I guess i will just make lots of lines instead of long sentences? > How about this, the first person that can get this to work for me... > I will paypal them 20 d

Re: New to Python, Help to get script working?

2013-12-17 Thread Mark
I am sorry, using google groups i cant tell what you see... Anyways, I guess i will just make lots of lines instead of long sentences? How about this, the first person that can get this to work for me... I will paypal them 20 dollars for helping me. I just want to get this thing up and going. Ive

Re: New to Python, Help to get script working?

2013-12-16 Thread rusi
On Tuesday, December 17, 2013 1:55:57 AM UTC+5:30, Mark wrote: > I am sorry if the way I posted messages was incorrect. Like I said, I am new > to google groups and python quite a bit but i am trying to do things > correctly by you guys. The errors that I am getting were not necessarily > postin

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
I am sorry if the way I posted messages was incorrect. Like I said, I am new to google groups and python quite a bit but i am trying to do things correctly by you guys. The errors that I am getting were not necessarily posting traceback messages. In those messages I posted my last bit of confus

Re: New to Python, Help to get script working?

2013-12-16 Thread Ned Batchelder
On 12/16/13 3:02 AM, Mark wrote: If i just try to double click the script, i get an index error, i can barely see the window it disappears so fast, but thats what I see. If you're going to participate in this forum, you'll get better help from people if you use the medium well. 1) Sending

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark Lawrence
On 16/12/2013 08:02, Mark wrote: The record for double spaced google crap, congratulations. Mind you, it's a great new game this, Spot the Text, much better than I Spy!!! On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote:

Re: New to Python, Help to get script working?

2013-12-16 Thread Frank Millman
"Mark" wrote in message news:4c2822b4-d95c-4735-af12-55ac5ff2f...@googlegroups.com... > On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: > > If i just try to double click the script, i get an index error, i can > barely see the window it disappears so fast, but thats what I see. I ha

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
On Monday, December 16, 2013 2:55:23 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > > > > > > > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > > > > > > > > > > > > >

Re: New to Python, Help to get script working?

2013-12-16 Thread Mark
On Monday, December 16, 2013 2:52:05 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > > > > > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > > > > > > > > > > > > > > >

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > > > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > > > > > > > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > > > > > > > > >

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote: > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > > > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > > > > > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano > > > > > > > > > > > > > >

Re: New to Python, Help to get script working?

2013-12-15 Thread Chris Angelico
On Mon, Dec 16, 2013 at 6:43 PM, Mark wrote: > Syntax Error: invalid syntax python twitch.py 10 10 >File " line 1 > python twitch.py 10 10 You're trying to run that from the interactive Python prompt. Run it from the system - exit Python and run just this script. ChrisA -- https://

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote: > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > > > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano > > > > > > wrote: > > > > > > > Step 1: replace the modified version of the script with a known good cop

Re: New to Python, Help to get script working?

2013-12-15 Thread Chris Angelico
On Mon, Dec 16, 2013 at 6:09 PM, Mark wrote: > Traceback (most recent call last): > File "C:\Python27\Scripts\Twitch.py", line 9, in > numberOfViewers = int(sys.argv[1]) > IndexError: list index out of range > > Is this where i would plug in the variables to make it work? I'm not quite > s

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote: > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano > > wrote: > > > Step 1: replace the modified version of the script with a known good copy. > > > > > > > Actually, this might be where the problem is, unfortunately. Not

Re: New to Python, Help to get script working?

2013-12-15 Thread Chris Angelico
On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano wrote: > Step 1: replace the modified version of the script with a known good copy. > Actually, this might be where the problem is, unfortunately. Not the OP's fault at all. I went and looked at the post linked to, and it has buggy indentation. (Q

Re: New to Python, Help to get script working?

2013-12-15 Thread Steven D'Aprano
On Sun, 15 Dec 2013 13:31:10 -0800, Mark wrote: > I originally get an indent error on line 19, i delete the indent and i > get > > ***'return outside function (Twitch.py, line 19) > > Thats where i am at. This is on version 2.7 Remember the bit where we asked you to copy and paste the entire e

Re: New to Python, Help to get script working?

2013-12-15 Thread Chris Angelico
On Mon, Dec 16, 2013 at 8:31 AM, Mark wrote: > I originally get an indent error on line 19, i delete the indent and i get > > ***'return outside function (Twitch.py, line 19) Good point, someone's made a mistake in that file. What you need to do is match the "output = ..." line and the "return ..

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
On Sunday, December 15, 2013 4:19:47 PM UTC-5, Mark wrote: > Thanks for the replies, I was hoping that one of you guys could actually try > it for me, as it might be easier to correct? In the meantime i will install > 2.7 instead of 3.3 and give it a try. > > > > Once again, i have very little

Re: New to Python, Help to get script working?

2013-12-15 Thread Mark
Thanks for the replies, I was hoping that one of you guys could actually try it for me, as it might be easier to correct? In the meantime i will install 2.7 instead of 3.3 and give it a try. Once again, i have very little experience in this, which is why i am looking for help :) I am more worri

Re: New to Python, Help to get script working?

2013-12-15 Thread Denis McMahon
On Sat, 14 Dec 2013 20:51:59 -0800, Mark wrote: > I have successfully installed python 3.3 for windows, pip and > livestreamer that is needed for it to work. They are in my scripts > folder. I either do not understand the script or it no longer works. It > is more than likely my error. I get error

Re: New to Python, Help to get script working?

2013-12-14 Thread Chris Angelico
On Sun, Dec 15, 2013 at 3:51 PM, Mark wrote: > I have successfully installed python 3.3 for windows, pip and livestreamer > that is needed for it to work. What I'm seeing in that script suggests that it actually needs Python 2.7, not 3.3. The best approach would be to make it work with Python 3,

Re: New to Python, Help to get script working?

2013-12-14 Thread Steven D'Aprano
On Sat, 14 Dec 2013 20:51:59 -0800, Mark wrote: > Hey guys, I found this website that has a script in order to increase > numbers to a live viewing stream. Being new to python, I keep running > into problems trying to get it to work. > > The original site is here, as he talks about how it works.

New to Python, Help to get script working?

2013-12-14 Thread Mark
Hey guys, I found this website that has a script in order to increase numbers to a live viewing stream. Being new to python, I keep running into problems trying to get it to work. The original site is here, as he talks about how it works. It is the top article. http://www.ericzhang.me/ I have

Re: 2's Complement in python help.

2013-05-23 Thread Chris Angelico
On Thu, May 23, 2013 at 7:54 PM, wrote: > Can anyone give me an idea of how to find the 2's Complement in python with > an example Do you know what two's complement is? (Not to be confused with two's compliment, which is when numbers start telling you how clever you are.) If not, you should pro

2's Complement in python help.

2013-05-23 Thread lokeshkoppaka
Can anyone give me an idea of how to find the 2's Complement in python with an example -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Help] learning python

2013-05-05 Thread leonardo selmi
thanks! Il giorno 05/mag/2013, alle ore 18:58, Eric Brunson ha scritto: > On 05/05/2013 10:08 AM, leonardo selmi wrote: >> hi guys >> >> i need to find a good book to learn python with exercises and solutions, any >> suggestions? >> >> thanks! >> > > Leonardo, > > There are several good

Re: [Python-Help] learning python

2013-05-05 Thread Eric Brunson
On 05/05/2013 10:08 AM, leonardo selmi wrote: hi guys i need to find a good book to learn python with exercises and solutions, any suggestions? thanks! Leonardo, There are several good online tutorials available, many listed here: http://wiki.python.org/moin/BeginnersGuide There is al

Re: [Python-Help] help to code...

2013-05-02 Thread bob gailer
On 5/2/2013 9:50 AM, leonardo selmi wrote: Please in future post plain text. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Help] how does the % work?

2013-03-22 Thread bob gailer
It is better to post to just one list at a time. On 3/22/2013 1:06 PM, leonardo selmi wrote: name = raw_input("What is your name?") quest = raw_input("What is your quest?") color = raw_input("What is your favorite color?") print """Ah, so your name is %s, your quest is %s, and your favorite col

Re: [Python-Help] idle doesn't work

2013-03-12 Thread leonardo
thanks now python shell works Il 12/03/2013 17.52, Ned Deily ha scritto: In article <513f5080.6030...@libero.it>, leonardo wrote: first of all thanks for trying to help me. the text of my email was the following: i have a mac os x 10.8, i had already python 2.7, i downloaded python 3.3 an

Re: [Python-Help] idle doesn't work

2013-03-12 Thread Ned Deily
In article <513f5080.6030...@libero.it>, leonardo wrote: > first of all thanks for trying to help me. the text of my email was the > following: > i have a mac os x 10.8, i had already python 2.7, i downloaded python > 3.3 and active tcl 8.5, but idle and the new version don't work, the > answe

Re: [Python-Help] idle doesn't work

2013-03-12 Thread leonardo
first of all thanks for trying to help me. the text of my email was the following: i have a mac os x 10.8, i had already python 2.7, i downloaded python 3.3 and active tcl 8.5, but idle and the new version don't work, the answer is:"idle's subprocess didn't make connection or personal firewall

Fwd: Re: [Python-Help] idle doesn't work

2013-03-11 Thread leonardo
sorry for that, that answer didn't help me.. regards Il 10/03/2013 23.59, Matthew Dixon Cowles ha scritto: Dear Leonardo, Sending the same message three times isn't likely to produce faster or better help. Is the reply that you got on the main Python list satisfactory? Regards,

Re: Newby Python help needed with functions

2011-06-03 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Cathy James wrote: I need a jolt here with my python excercise, please somebody!! How can I make my functions work correctly? I tried below but I get the following error: if f_dict[capitalize]: KeyError: Code below: def capitalize (s): """capitalize accepts a

Re: Newby Python help needed with functions

2011-06-03 Thread Jonathan Gardner
On Fri, Jun 3, 2011 at 7:42 AM, Cathy James wrote: > I need a jolt here with my python excercise, please somebody!! How can I > make my functions work correctly? I tried below but I get the following > error: > > if f_dict[capitalize]: > > KeyError: > This error is because the function capitaliz

Re: Newby Python help needed with functions

2011-06-03 Thread Tim Chase
On 06/03/2011 09:42 AM, Cathy James wrote: I need a jolt here with my python excercise, please somebody!! How can I make my functions work correctly? I tried below but I get the following error: if f_dict[capitalize]: KeyError: def capitalize (s): Here you define the variable "capitalize" as

Re: Newby Python help needed with functions

2011-06-03 Thread Andrew Berg
On 2011.06.03 09:42 AM, Cathy James wrote: > I need a jolt here with my python excercise, please somebody!! How can > I make my functions work correctly? I tried below but I get the > following error: > > if f_dict[capitalize]: > > KeyError: > ... > > def capitalize (s): > """capitalize accep

Newby Python help needed with functions

2011-06-03 Thread Cathy James
I need a jolt here with my python excercise, please somebody!! How can I make my functions work correctly? I tried below but I get the following error: if f_dict[capitalize]: KeyError: Code below: def capitalize (s): """capitalize accepts a string parameter and applies the capitalize() m

python help

2011-05-23 Thread pablo araya
> > Hi I'm tryin to create a game but I have a question in how to save > > (saveasfile) the value of a global variable.. and then load the same value > > with openfile. > > Also for example you have a main label and a botton on the left so when > > you click the left bottom the label will chan

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread MRAB
Peng Yu wrote: On Fri, Jul 16, 2010 at 3:10 PM, MRAB wrote: Peng Yu wrote: Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please let me know if there is a com

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread Thomas Jollans
On 07/16/2010 10:21 PM, Peng Yu wrote: > On Fri, Jul 16, 2010 at 3:10 PM, MRAB wrote: >> Peng Yu wrote: >>> >>> Hi, >>> >>> I see that there are help topics that are capitalized, which I think >>> in general are related with languages syntax. I want to see the >>> complete list of such help topics

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread Peng Yu
On Fri, Jul 16, 2010 at 3:10 PM, MRAB wrote: > Peng Yu wrote: >> >> Hi, >> >> I see that there are help topics that are capitalized, which I think >> in general are related with languages syntax. I want to see the >> complete list of such help topics. Would you please let me know if >> there is a

Re: How to list all the python help topics that are capitalized?

2010-07-16 Thread MRAB
Peng Yu wrote: Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please let me know if there is a command to do so? help('SUBSCRIPTS') Related help topics: SEQU

How to list all the python help topics that are capitalized?

2010-07-16 Thread Peng Yu
Hi, I see that there are help topics that are capitalized, which I think in general are related with languages syntax. I want to see the complete list of such help topics. Would you please let me know if there is a command to do so? >>> help('SUBSCRIPTS') Related help topics: SEQUENCEMETHODS1 >

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Varnon
>> On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert wrote: >>> On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is the behavioral sc

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Rebert
> On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert wrote: >> On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon wrote: >>> I'm sure this is a simple problem, or at least I hope it is, but I'm >>> not an experience programer and the solution eludes me. >>> >>> My realm of study is the behavioral sciences

  1   2   >