[Tutor] Searchlight/MVPA/ValueError

2010-02-22 Thread J
= svmc.svm_check_parameter(prob.prob, param.param) 268 if msg: --> 269 raise ValueError, msg 270 self.model = svmc.svm_train(prob.prob, param.param) 271 ValueError: C <= 0 --- Your input would be greatly appreciated. Thanks a lot, J ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] datetime a.m. not AM

2010-02-08 Thread bevan j
Hello, I have an issue with data that I am trying to convert to datetime. It has 'a.m.' rather than 'am' and the %p format doesn't seem to work. I am pretty sure there should be an easy solution. That said I can not see it at the moment. the following illustrates the issue. test1 and test2 w

Re: [Tutor] datetime a.m. not AM

2010-02-08 Thread bevan j
Well, I have managed to get it working by using the locale setting. It would be nice to use the am/pm setting only and leave the rest unset. Will have to look into it further. Any tips? import locale #to set locale to use a.m. instead of AM locale.setlocale(locale.LC_ALL, '') bev

Re: [Tutor] Distributing Python Code for Commercial Porpoises?

2010-08-06 Thread j ram
> > My intent though is really not to produce a commercial product. My question > relates to difficulty my partner and I have to exchanging py programs w/o > him stumbling. I send him a py program written using Windows Python 2.5. He > has the same. I've executed it IDLE and it works fine. He execu

[Tutor] toggle through a list

2009-04-01 Thread j mercedes
Hi, I have problem here...I am writing a program but I am getting stucked at how to solve the mode of a series of numbers...any ideas???following is the program:def mode(data):num=0count=0mx=0mode=0for i in data: if num!=data[i]:num=data[i]coun

[Tutor] FW: another newbie

2009-04-12 Thread j mercedes
hi, its me again jay, thanks alot everyone for your input on the last program i created that solved for the mode,mean, and average of a set of numbers it actually worked great...i used the import in a bit different method but still very valuable...if anyone can give me any ideas on thi

[Tutor] help

2009-04-14 Thread j mercedes
hi, its me again jay, thanks alot everyone for your input on the last program i created that solved for the mode,mean, and average of a set of numbers it actually worked great..if anyone can give me any ideas on this program i am doing now it would be appreciated.I keep would like to understand

[Tutor] How to pass command line variables to this python code...

2009-07-14 Thread J Cook
Hello, I have some autogenerated code from Selenium which I cannot figure out how to pass some command line variables to. For example I could export the same in Perl and it would be for example: use strict; use warnings; use Time::HiRes qw(sleep); use Test::WWW::Selenium; use Test::More "no_

Re: [Tutor] How to pass command line variables to this python code...

2009-07-14 Thread J Cook
he quickest import sys print sys.srgv sys.argv will it output a array of all command line args ./selenium-google-test.py yankees will out put: ['selenium-google-test.py', 'yankees'] so args = sys.argv args[0] == 'yankees' True for a more functional way, check

Re: [Tutor] How to pass command line variables to this python code...

2009-07-15 Thread J Cook
Yeah, I figured that. I got it to work thanks, but I still don't understand how exactly. Coming from Perl I am used to a more procedural type of programming. BTW - Selenium is a great tool for web testing, and the way it will translate your web clickstream into your choice of languages rocks.

[Tutor] simple text replace

2009-07-26 Thread j booth
Hello, I am scanning a text file and replacing words with alternatives. My difficulty is that all occurrences are replaced (even if they are part of another word!).. This is an example of what I have been using: for line in fileinput.FileInput("test_file.txt",inplace=1): > line = lin

Re: [Tutor] simple text replace

2009-07-26 Thread j booth
oops, I mean that the script opens a file and splits it into words; Then it takes each word and searches for an alternative online; with the alternative now stored in a variable, it simply needs to be written back over the original word in the same file. at the moment this might solve the problem,

Re: [Tutor] Eng to Leet Speek

2009-07-27 Thread J Sisson
place("3","e") > astring = astring.replace("|#","f") > astring = astring.replace("6","g") > astring = astring.replace("#","h") > astring = astring.replace("1","i") > astring = as

[Tutor] word replace

2009-08-30 Thread j booth
Hello, I have been experiencing such difficulty with something that should be easy-- pretty new to programming.. Need to: (1) open a text file (2) iterate through it word by word (3) replace each word with an alternative word and close the file. **I don't know what the alternative word will be b

[Tutor] default parameters in classes

2007-03-12 Thread J Greg
I want my object to create a fresh dictionary if its not passed one. Perhaps I don't understand. In the example below, the first instance correctly creates a fresh dictionary. But the second instance seems to inherit the now dirty dictionary from the first instance. What am I missing? class n

Re: [Tutor] Converting .pyd to .so

2011-02-28 Thread j ram
> Wine is a good suggestion, but it takes up 3.53 MB. Is there a lighter >> alternative? >> > > So far, you didn't state whether the DLL actually uses Windows calls, but I > would imagine it does, and if so, you can't use it on anything but Windows > without emulating those calls, thus using Wine.

[Tutor] Reading video streams from Internet

2011-04-22 Thread Ryan J
Hello Python gurus! I am trying to 1) Read and decode video streams from internet. 2) Store them in a buffer. 3) Eventually convert them into data that can be used in Cycling '74's Jitter. If anyone has any idea how to start with this, that would be great! I have limited experience with Python, b

[Tutor] help with comparing list of tuples in python 2

2016-06-17 Thread Lulu J
Hi there, My apologies if this is a trivial question but I am sort of new to python. Here is my problem: I have a list of dictionaries. Each dictionary has a word and its position in the text the positions are in the form of a tuple. Here is an example: [ {'position': (5, 4), 'term': u'happy',},

Re: [Tutor] help with comparing list of tuples in python 2

2016-06-20 Thread Lulu J
2016 at 8:34 AM, Muhubo Yusuf wrote: > > > From: Alan Gauld via Tutor > Date: Fri, Jun 17, 2016 at 6:36 PM > Subject: Re: [Tutor] help with comparing list of tuples in python 2 > To: tutor@python.org > > > On 17/06/16 20:18, Lulu J wrote: > > > I have a li

[Tutor] Writing to CSV string containing quote and comma

2013-12-09 Thread J Sutar
r example below). Numbers=[1,2,3,4,5] Words=["One", "Two", "Three, with comma", "Four 'with single quote'", "Five"] NumPlusWordQuoted=[] for (i, j) in zip(Numbers,Words): NumPlusWordQuoted.append([str(i) + " " + chr(34)

Re: [Tutor] Writing to CSV string containing quote and comma

2013-12-09 Thread J Sutar
writerow(words) writer.writerow([str(n) + " " + chr(34) + s + chr(34) for n, s in zip(numbers, words)]) On 9 December 2013 22:54, Steven D'Aprano wrote: > On Mon, Dec 09, 2013 at 09:52:34PM +, J Sutar wrote: > > > I'm trying to write to csv a string which

[Tutor] help

2014-03-18 Thread y j
how can i split a word into letters in python 2.7.6? -- Y D Jain ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Assistance with UnicodeDecodeError

2015-01-31 Thread J Mberia
Hi, I am teaching myself programming in python and assistance with UnicodeDecodeError I am trying to scrap text from a website using Python 2.7 in windows 8 and i am getting this error *"**UnicodeDecodeError: 'charmap codec can't encode character u'\u2014 in position 11231 character maps to "* *

[Tutor] Command Line Editting: How to improve options?

2015-04-02 Thread J L
 Win 7Python v 3.4.3 I'm new to Python and only have coursework under my belt in another object oriented programming language as well as limited systems skills. After launching Python from the command line with py.exe, it appears that the interrupter starts up fine. I've read on Python.Org's sit

Re: [Tutor] Command Line Editting: How to improve options?

2015-04-02 Thread J L
attachments is prohibited without prior consent. On Thursday, April 2, 2015 5:09 AM, Steven D'Aprano wrote: On Thu, Apr 02, 2015 at 06:36:03AM +0000, J L wrote: >  Win 7Python v 3.4.3 > I'm new to Python and only have coursework under my belt in another > object o

[Tutor] Running a dos program with python

2010-03-10 Thread Armstrong, Richard J.
: New modulus reduction curves for clays added* * using results from Sun et al (1988) * * by: J. I. Sun & Ramin Golesorkhi* * February 26, 1988 * * --- *

Re: [Tutor] Running a dos program with python

2010-03-10 Thread Armstrong, Richard J.
From: sri...@gmail.com [mailto:sri...@gmail.com] On Behalf Of Wayne Werner Sent: Wednesday, March 10, 2010 2:24 PM To: Armstrong, Richard J. Cc: tutor@python.org Subject: Re: [Tutor] Running a dos program with python On Wed, Mar 10, 2010 at 3:20 PM, Armstrong, Richard J. wrote: Hello

Re: [Tutor] Running a dos program with python

2010-03-10 Thread Armstrong, Richard J.
From: sri...@gmail.com [mailto:sri...@gmail.com] On Behalf Of Wayne Werner Sent: Wednesday, March 10, 2010 3:00 PM To: Armstrong, Richard J. Cc: tutor@python.org Subject: Re: [Tutor] Running a dos program with python On Wed, Mar 10, 2010 at 4:51 PM, Armstrong, Richard J. wrote: The

Re: [Tutor] Running a dos program with python

2010-03-10 Thread Armstrong, Richard J.
python I use wxPython, which allows a statement like: wx.Execute('c:\shake91.exe "FLAC.txt" "a.txt" "b.txt"') From: Armstrong, Richard J. <mailto:rarms...@water.ca.gov> Sent: Wednesday, March 10, 2010 4:51 PM To: Wayne Werne

[Tutor] How to add a description to a module

2010-03-23 Thread Armstrong, Richard J.
Hello, I have a simple question. I have created a module call Newmark.py and it runs fine, however, I want to add some documentation so that when I type in the console help(Newmark) it will give a description of the module. Any ideas? Thanks, Richie

[Tutor] Interpolation function

2010-03-25 Thread Armstrong, Richard J.
Hello all, Does anyone have a suggestion for a good interpolation function in numpy or scipy. I have an earthquake time history with a time step of 0.005 sec and want to convert it to a time history with a time step of say 0.01. The interpolation function numpy.interp is too "coarse" and modifi

Re: [Tutor] [Python-ideas] "value" ~ "data" ~ "object"

2010-04-17 Thread Stephen J. Turnbull
Alan Gauld writes: > Ooh I was deliverately steering clear of the distinctions between data, > information and knowledge! There lie religious wars! :-) That's precisely why Guido says "don't say 'data' in this context." It's not your choice to steer clear of those differences of definition, i

[Tutor] read line x from a file

2005-01-21 Thread J. M. Strother
I have a text file containing 336 records. I can read and print out the whole file without any problem. What I want to do is read and print out one record only (chosen at random). So I need to get to record x, select it, and then print it (or store it in a variable). Can anyone tell me now to do

Re: [Tutor] Tutor Digest, Vol 15, Issue 40

2005-05-17 Thread J. Gabriel Schenz
>At 02:17 PM 5/12/2005, Bernard Lebel wrote: >>Just a generic question: why one would use apply()? >> >>In Learning Python, on page 357, there is an example of generating an >>instance using apply(): >> >>class A: >> def __init__( self, number ): >> self.number = number >> >>a =

Re: [Tutor] wxPython GUI builders?

2007-06-17 Thread Colin J. Williams
Alan Gauld wrote: > What's available and in what state of readiness? > > I tried Boa Constructor but after half a dozen code tweaks > I was still running into compatibility errors with the latest > wxPython and gave up. > > I know that Glade is out there, but what state is it in? > And PythonC

Re: [Tutor] avoid eval how???

2005-11-03 Thread Colin J. Williams
Pujo Aji wrote: > Hello > > I have a dynamic functions which created by some algorithms during > runtime. > These functions are in string type. > When I want to use it, I can use eval command. > But can someone give me more suggestion about how to handle this > problem, I want to avoid eval.

Re: [Tutor] avoid eval how???

2005-11-03 Thread Colin J. Williams
Danny Yoo wrote: >>>I have a dynamic functions which created by some algorithms during >>>runtime. These functions are in string type. When I want to use it, I >>>can use eval command. But can someone give me more suggestion about >>>how to handle this problem, I want to avoid eval. >>> >>>

Re: [Tutor] printing statement

2005-11-03 Thread Colin J. Williams
bob wrote: >At 11:31 AM 11/3/2005, Johan Geldenhuys wrote: > > >>Hi all, >>Just a quick question; >> >>How do I code this output: >>""" >>files dirs >>== >>""" >> >>I want to print something a few space away from the left side or in the >>middle of the line. >> >> > >In the

Re: [Tutor] File IO

2005-11-03 Thread Colin J. Williams
Michael Haft wrote: >Hello, > I tried the following code: > >def readSOMNETM(inputName): >input = open(inputName, "r") >result = [] >for line in input: >fields = line.split() >data = fields[1] + fields[2] + fields[7] >result.append(data) >input.close() >

Re: [Tutor] avoid eval how???

2005-11-03 Thread Colin J. Williams
Danny Yoo wrote: >>You make some good points here but I suggest that, in the real world, >>the risks are small. >> >> > >Hi Colin, > >But that's the point I'm trying to make; eval() is appropriate only for >toy code. In real world code that's exposed to the world, using eval() is >usually the

Re: [Tutor] testing: doctest and unittest

2005-11-08 Thread Colin J. Williams
Alex Hunsley wrote: >Regards testing, I've been playing with both the unittest >(http://pyunit.sourceforge.net/pyunit.html) and doctest >(http://docs.python.org/lib/module-doctest.html). I was wondering what >peoples thoughts were on the effectiveness and convenience of one versus >the other.

Re: [Tutor] Who called me?

2005-11-08 Thread Colin J. Williams
Liam Clarke-Hutchinson wrote: >I believe only by explicitly passing a reference to the parent? > >Liam Clarke-Hutchinson > >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf >Of Bill Campbell >Sent: Wednesday, 9 November 2005 7:00 a.m. >To: Tutor >Subject: [Tu

[Tutor] Louis J Martin is out of the office.

2006-03-16 Thread Louis J Martin
I will be out of the office starting 03/16/2006 and will not return until 03/20/2006. I will respond to your message when I return. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Two Newbile Questions: porting drawmap.c, & Python as a lifetime language

2006-07-04 Thread Dustin J. Mitchell
[EMAIL PROTECTED] wrote: > 1. What's involved in a port of a C program into Python? (drawmap is > offered in a number of linux distributions btw.) It really (really) depends on the C program -- C's so flexible that you can write in a "Pythonish" style (specifically, avoiding pointer tricks, kee

Re: [Tutor] time(duration) formats & basic time math query

2006-07-05 Thread Dustin J. Mitchell
kevin parks wrote: > I have been handed a huge number of documents which have hundreds of > pages of times and durations, all calculated and notated by several > different people over the course of many years. Sadly, no made any > guidelines at all about how this work would proceed and all th

Re: [Tutor] How can I copy files recursively?

2006-07-10 Thread Dustin J. Mitchell
Richard Querin wrote: > I know this is probably a dumb question: > > I've got mp3 files that are downloaded (by ipodder) into individual > subfolders. I'd like to write a quick script to move (not copy) all the > mp3 files in those folders into a single destination folder. I was > thinking I could

Re: [Tutor] question about headers and smtplib

2006-07-31 Thread Dustin J. Mitchell
shawn bright wrote: > the only difference in one from the other is that in the headers of the > other app (not my python script) > there exist the following lines: > > MIME-Version: 1.0 > X-Mailer: OstroSoft SMTP Control (4.0.20) > Content-Type: text/plain; charset="us-ascii" > Content-Transfer-En

Re: [Tutor] Python for basic web-testing

2006-08-06 Thread Dustin J. Mitchell
Hans Dushanthakumar wrote: > Hi, >How do I use python for basic web-tasks like inputting data or > clicking buttons on web-pages. For eg, how do I enter my username and > password and click on the "OK" button on the yahoo mail page? > I had a look at the webbrowser module documentation > (http:

Re: [Tutor] Syntax Error? Variable Scope?

2006-11-02 Thread Dustin J. Mitchell
Chuck Coker wrote: > from net.grinder.script import Test > from net.grinder.script.Grinder import grinder > from net.grinder.plugin.http import HTTPPluginControl, HTTPRequest > from HTTPClient import NVPair > connectionDefaults = HTTPPluginControl.getConnectionDefaults() > httpUtilities = HTTPPlugi

Re: [Tutor] Two Questions...(i) Checking for None (ii) Making commandline arguments mutually exclusive

2006-11-04 Thread Dustin J. Mitchell
> if x == None > > As simple as that. In fact, I think the following is even a little more readable: if x is None and in fact that syntax has some advantages in various corner cases. It's largely a matter of preference. Dustin ___ Tutor maillist

Re: [Tutor] A question abt exception handling

2006-11-04 Thread Dustin J. Mitchell
import traceback try: something_funny() except: traceback.print_exc() should do the trick for you. Dustin ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help me to debug this script .. I tried but ....

2006-11-05 Thread Dustin J. Mitchell
Asrarahmed Kadri wrote: > "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\project stuff-programs\Scriptdate.py", line 18, in ? > t1 = my_version_datecheck.dateCheck(dt1,0) > File "my_ver

Re: [Tutor] Encoding and XML troubles

2006-11-05 Thread Dustin J. Mitchell
For what it's worth, the vast majority of the XML out there (especially if you're parsing RSS feeds, etc.) is written by monkeys and is totally ill-formed. It seems the days of 'it looked OK in my browser' are still here. To find out if it's your app or the XML, you could try running the XML thro

Re: [Tutor] Help me to debug this script .. I tried but ....

2006-11-05 Thread Dustin J. Mitchell
Kent Johnson wrote: > Dustin J. Mitchell wrote: >> Asrarahmed Kadri wrote: >>> "C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", >>> line 310, in RunScript >>> exec codeObject in __main__.__dict__ >>> File

[Tutor] SIP-4.4 Install Borked

2006-11-15 Thread J. D. Leach
other apps. Question: I want to remove SIP and revert to old version and can not find documentation that outlines the procedure. Any suggestions? -- J. D. Leach Columbus, Indiana USA Uptime: 19:37:45 up 1 day, 7:52, 1 user, load average: 1.00, 1.28, 1.49 Linux/Open Source Computer using: Mandriva Lin

Re: [Tutor] SIP-4.4 Install Borked

2006-11-15 Thread J. D. Leach
07:46 pm, J. D. Leach wrote: > To All, > > This is, and isn't, Python related, but thought you may be of some > assisstance. Running Mandriva 2006 on a 1.8Mhz Dell GX260. Also: Python > 3.4.2, ERIC3 3.8.1, etc. > Problem: was going to update to ERIC3 3.9.2 and downloaded

Re: [Tutor] Idle

2008-03-14 Thread Bartruff, Pamela J.
I'm very new to Python, but it seems like I just learned in a class for a random number, you would need the : import random -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Marlett Sent: Thursday, March 13, 2008 7:44 PM To: tutor@python.org Subj

[Tutor] how to write a function

2008-03-24 Thread Bartruff, Pamela J.
Hello Python users, I am very new to Python, how do I program that converts 24 hour time to 12 hour time? The program should have three functions(input, conversion and output function) Thanks for any help Pamela Bartruff ___ Tutor maillist -

Re: [Tutor] how to write a function

2008-03-24 Thread Bartruff, Pamela J.
m." -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 8:07 AM To: Bartruff, Pamela J. Cc: tutor@python.org Subject: Re: [Tutor] how to write a function Bartruff, Pamela J. wrote: > Hello Python users, > > I am very new to Pyth

Re: [Tutor] how to write a function

2008-03-24 Thread Bartruff, Pamela J.
Thank you so much. I appreciate the help, I am very new to Python, but I would very much like to learn more... -Original Message- From: bhaaluu [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2008 9:17 AM To: Bartruff, Pamela J. Cc: tutor@python.org Subject: Re: [Tutor] how to write a

[Tutor] How to match strange characters

2008-09-07 Thread J. Van Brimmer
I have a legacy program at work that outputs a text file with this header: ÉÍÍ» º Radio Source Precession Program º º by John B. Doe º º 31 August 1992 º ÈÍÍÍ

Re: [Tutor] How to match strange characters

2008-09-08 Thread J. Van Brimmer
Kent Johnson wrote: On Mon, Sep 8, 2008 at 2:46 AM, J. Van Brimmer <[EMAIL PROTECTED]> wrote: I have a legacy program at work that outputs a text file with this header: ÉÍÍ» º Radio Source Precession Program

Re: [Tutor] How to match strange characters

2008-09-08 Thread J. Van Brimmer
Thanks Paul, this looks like just what I need to reformat PRECESS's output into what I need. Thanks, Jerry Paul McGuire wrote: Instead of trying to match on the weird characters, in order to remove them, here is a pyparsing program that ignores those header lines and just extracts the interest

Re: [Tutor] absolute beginner

2008-09-10 Thread J. Van Brimmer
Johnny wrote: Anyone have any advice for an all out beginner? Advice as in... The best book?...best tutor web page? I am wanting so badly to learn Python. I have went to this site... http://www.awaretek.com/tutorials.html This gave me lots of info,, but with so many books to choose from, I can

Re: [Tutor] absolute beginner

2008-09-10 Thread J. Van Brimmer
John Fouhy wrote: 2008/9/11 J. Van Brimmer <[EMAIL PROTECTED]>: This should be enough to get you started. You'll just have to jump in and read, read, and read. :-) I would say: jump in and code, code, and code. Reading's easy, but if you're anything like me, you&

[Tutor] python question

2008-11-21 Thread Daniel J Kramer
you soon -- Daniel J Kramer Constant Fables 249 12th st #3 Brooklyn, NY 11215 (h) 347 223 4571 (m) 646 427 7430 test.py Description: Binary data ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] python question

2008-11-25 Thread Daniel J Kramer
11:52 AM, Daniel J Kramer > <[EMAIL PROTECTED]> wrote: > > Hi Kent > > > > I have been playing with the ,lower command and am not having much luck. > It > > seems like a simple task, but it is not working for me. Here is the code > > > > def main():

[Tutor] importing images and sound

2008-12-02 Thread Daniel J Kramer
, I do not know where to begin thank you -- Daniel J Kramer Constant Fables 249 12th st #3 Brooklyn, NY 11215 (h) 347 223 4571 (m) 646 427 7430 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] AUTO: David J Pearson Is Attending An IBM Redbook residency (returning 19/02/2013)

2013-02-10 Thread David J Pearson
I am out of the office until 19/02/2013. I am attending an IBM Redbook residency in Raleigh, NC, USA ... and have limited access to my mail. My response to your email will be delayed during this time. Thanks David J Pearson MBCS CITP CEng MIET Technical Staff Member Solution Architect [Mobile

Re: [Tutor] Newbie Here -- Averaging & Adding Madness Over a Given (x) Range?!?!

2013-02-15 Thread Michael J. McConachie
@Bob @David -- I gave you all the other parts to give you a background, and context as it relates to my 'problem'. My apologies if it seems obfuscated. I took an hour to write that email, and revised it several times in an attempt to provide good information. Please disregard my OP. On 02/14/

Re: [Tutor] Newbie Here -- Averaging & Adding Madness Over a Given (x) Range?!?!

2013-02-15 Thread Michael J. McConachie
gt; interpreted as "from the end" rather than "from the beginning". > > Item positions are counted from 0, which will be very familiar to C > programmers. The start index is included in the slice, the end > position is excluded. > > The model that you should think o

Re: [Tutor] Newbie Here -- Averaging & Adding Madness Over a Given (x) Range?!?!

2013-02-15 Thread Michael J. McConachie
On 02/15/2013 04:03 PM, Albert-Jan Roskam wrote: > >> Eventually what I'll need to do is: >> 1. Index the file and/or count the lines, as to identify each line's >> positional relevance so that it can average any range of numbers that are >> sequential; one to one another. > In other words: you

[Tutor] Question regarding list editing (in place)

2008-02-05 Thread David J. Weller-Fahy
through the list) to removing items from a list without replacing the list? Specifically, I'm looking for something that would be similar to the concept, "Remove every list item that starts with X." Regards, -- David J. Weller-Fahy (please don't CC me) __

Re: [Tutor] Question regarding list editing (in place)

2008-02-14 Thread David J. Weller-Fahy
ction "3.1.4 Lists" in the python tutorial, I might have noticed the example which is similar to that form: #v+ >>> # Clear the list: replace all items with an empty list >>> a[:] = [] >>> a [] #v- Ah, well. Thanks again for the tips, gentlemen. Regards, -

[Tutor] Need Help

2006-07-11 Thread Shappell, John J CW2
Title: [Tutor] Need Help Here is the assignment You've been given an assignment by your supervisor to program a small application to monitor the current status of the cash account in the firm's petty cash fund (the amount of cash kept on hand in the office for incidental purchases). The requ

[Tutor] Needing to create a program that will search my hard drive for certain folders

2006-07-14 Thread Bobby J. Howerton Jr.
Hello,I am new to programming in Python, but I am very excited about the possibilities that it (Python) has.I maybe jumping the gun a little bit here, but this is what I would like to do:I would like to crea

[Tutor] Needing to create a program that will search my hard drive for certain files in certain folders

2006-07-19 Thread Bobby J. Howerton Jr.
Hello,I am new to programming in Python, but I am very excited about the possibilities that it (Python) has.I maybe jumping the gun a little bit here, but this is what I wouldlike to do:I would like to creat

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread J or M Montgomery
On Wed, 14 Feb 2007 09:08:38 -0800 Dave Kuhlman <[EMAIL PROTECTED]> wrote: > On Wed, Feb 14, 2007 at 05:20:44PM +0100, Rikard Bosnjakovic wrote: > > > Why is there no reply-to-tag in all the posts, making the list > > recipient at all times? > I use Sylpheed 2.2.7 in a Linux box. There are 'Reply

Re: [Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

2018-11-07 Thread Brian J. Oney via Tutor
On Wed, 2018-11-07 at 10:22 +0100, srinivasan wrote: > blkid -o export %s | grep \'TYPE\' | cut -d\"=\" -f3 You don't need to escape the single quotes. Try either: "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3" or: 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3' or: "blkid -o export %s | g

[Tutor] max(len(item)) for cols

2005-06-17 Thread =?ISO-8859-1?Q?J=E1nos_Juh=E1sz?=
Dear Guys, I have a 2D array: >>>[['1', '2 ', '3'], ['longer ', 'longer', 'sort']] How can I get what is the max(len(item)) for the columns ? I would like to get a list with the max_col_width values. I hope that, it can wrote with some nice list comprehension, but I can't do that