Is there anything different between the filenames aside from that suffix
_vXX? If not, then you'll run into problems after the first filename is
changed; further attempts won't allow the change, since there's already a
file with that same name.
AR
On Thu, Sep 4, 2014 at 8:49 AM, Felisha Lawrence
I can't claim to be new to programming, but I've dabbled in Python over and
over again to get small problems and puzzles resolved. One thing that I
find I can't keep straight are the methods that change a list in place, vs.
those that return a copy (sometimes transformed) of the list.
Call me old-
I'm attempting to gather the pieces I need for a simple project I'd like to
do for my job, but I'm having a difficult time finding something, and I'm
appealing to the hive mind at Tutor for wisdom.
My project needs to compare two or more large textboxes (each one
containing a file or a large amoun
On Tue, Apr 2, 2013 at 12:49 PM, David Mitchell wrote:
> Hi!
>
> How do I go through a text file, finding specific words/numbers/phrases
> and edit them to say different things? I do not want to edit the text file,
> I would rather open and read from the text file and write to a new file.
>
> I do
Since the identifier and the item that you want to keep are on different
lines, you'll need to set a "flag".
with open(filename) as file:
scanfile=file.readlines()
flag = 0
for line in scanfile:
if line[0:6]=='COMPND' and 'FAB FRAGMENT' in line: flag = 1
elif line[
On Mon, Jul 16, 2012 at 10:58 AM, susana moreno colomer <
susana...@hotmail.com> wrote:
> Hi!
> I have a folder, with the following text files with columns:
>
> bb_ 1
> bb_2
> ww_1
> ww_2
> ff_1
> ff_2
>
> What I want to do is:
>
>- Extract columns 5,6, 8 from files bb_
>- Extract columns
08 AM, taserian wrote:
> First of all, determine your alphabet (the pool of characters you'll
> derive your 4-character code from):
>
> - For example, using an English alphabet with both lowercase and uppercase
> letters and digits 0-9 makes for 62 characters (26 + 26 + 10).
First of all, determine your alphabet (the pool of characters you'll derive
your 4-character code from):
- For example, using an English alphabet with both lowercase and uppercase
letters and digits 0-9 makes for 62 characters (26 + 26 + 10).
Then, ask if you want to allow a character to repeat i
In addition to the wise counsel you've already received, I noticed that your
randint goes from 0 to 10, but you have 20 possible outcomes in dice(). If
I'm counting correctly, it should be roll=random.randint(0, 19).
Tony R.
On Wed, May 11, 2011 at 6:49 AM, Johnson Tran wrote:
> Hi Guys,
>
> I'
up
that meets monthly in the Durham area (not sure how close that is to you).
You might want to subscribe to their mailing list and see if there's anyone
willing to tutor you, if that's more your style; it looks like they have a
meeting tomorrow 3/24/11. I'd contact them and see how wel
When replying to the Python Tutor list, please use "Reply All" instead of
just "Reply". I meant to put this in my previous message, but it remained in
"meant to" phase and never got implemented properly. 8-)
I don't think it's been initialized properly, but that's where I don't
understand about t
than [i]
> represents integer and the "i" in for i is the iteration of the loop so when
> you ask the question "message[i] will provide you the character at position
> i. What are you doing with it?" I'm not sure what you're asking?
>
> I'm sorry to
On Wed, Mar 23, 2011 at 9:09 AM, Lezlie Kline wrote:
> Hi,
>
> I'm trying to work out the bugs in a program for calculating the checksum
> (modulo 256) of an input string. I'm testing it with my full name and I'm a
> beginner with Python. Here's what I have so far.
>
> def main():
> print"Th
On Fri, Oct 8, 2010 at 10:27 AM, Susana Iraiis Delgado Rodriguez <
susana.delgad...@utzmg.edu.mx> wrote:
> Hi Alan:
>
> The ouput is coming from a cicle and some functions that I vae to do to
> execute an ogr2ogr command, in this output I ask the user for the name of a
> file and then make a modul
On Thu, Oct 7, 2010 at 12:48 PM, taserian wrote:
> I'm adding some line breaks to make your text a little more readable.
>
> On Thu, Oct 7, 2010 at 9:55 AM, Susana Iraiis Delgado Rodriguez <
> susana.delgad...@utzmg.edu.mx> wrote:
>
> Hello members:
>>
>&g
I'm adding some line breaks to make your text a little more readable.
On Thu, Oct 7, 2010 at 9:55 AM, Susana Iraiis Delgado Rodriguez <
susana.delgad...@utzmg.edu.mx> wrote:
> Hello members:
>
> How can I write a statement to execute the following:
>
> C:/Archivos de programa/FWTools2.4.7/bin/o
On Thu, Jan 7, 2010 at 7:43 AM, Richard D. Moores wrote:
> On p. 162 of "Programming In Python", 2nd ed., by Summerfield, the
> section entitled "for Loops" begins:
>
> =
> for expression in iterable:
> for_suite
> else:
> else_suite
>
> The expressi
I think I'm ready to start working with some simple graphic output.
Currently, I've got the basics of a Python program that calculates full
tours of a honeycomb structure, going through each cell exactly once. The
output from the program shows the paths as coordinates of each cell; what
I'd like to
One potential way to speed up is not to divide by every prime in your pz
list, but only up to the square root of i.
For example, to test if 37 is prime, you would only need to look at primes
less than or equal to int(sqrt(37)) = 6.08. . .
Tony R.
On Fri, Feb 6, 2009 at 4:19 PM, H.G. le Roy wrot
Since the variable *count* never increases inside of the loop body, it gets
stuck in the *while* loop.
I recommend taking a hard look at the program, consider what it should be
doing, and then seeing which statements should be in the *while* loop, and
which ones should be outside it.
Tony R.
On
On Thu, May 22, 2008 at 12:14 PM, GTXY20 <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I will be dealing with an address list where I might have the following:
>
> Name SSN
> John 1
> John 1
> Jane 2
> Jill 3
>
> What I need to do is parse the address list and then cre
On Wed, Apr 2, 2008 at 12:50 PM, Jeffrey Dates <[EMAIL PROTECTED]> wrote:
> Sorry forgot to post what I had so far:
>
> for code in range(ord("a"), ord("z") +1):
> if code == ord("m"):
> print chr(code +1)
>
> Now, this solves for the first letter after "M", but doesn't do it via a
> s
Sorry if this isn't the right place for it, but today's xkcd comic strip is
very apropos for the newly illuminated in all things Python.
http://www.xkcd.com/
Tony R.
On Dec 5, 2007 12:00 PM, bhaaluu <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> On Dec 5, 2007 10:30 AM, jeff witt <[EMAIL PROTECTED
On 9/28/07, James <[EMAIL PROTECTED]> wrote:
>
> All,
>
> I have a dumb question...hopefully someone can shed some light on the
> difference between for and while in the situation below.
>
> I'm trying to iterate through a list I've created. The list consists
> of a command, followed by a 'logging
>
> > The above snippet is taking advantage of a similar property of binary
> > numbers, which are base 2. What the above snippet is doing is checking
> to
> > see if that last digit is a 0 or not (asking "not n&1" is equivalent to
> > asking "n&0", since that digit can only be a 0 or 1).
>
> Not q
On 9/19/07, Boykie Mackay <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I have come across a bit of code to find if a group of numbers is odd or
> even.The code snippet is shown below:
>
> if not n&1:
>return false
>
> The above should return false for all even numbers,numbers being
> represented
I think it's intended to be a collegiate-level textbook, and not a
find-a-copy-at-your-local-bookstore type of book. Textbooks are considerably
more expensive.
Tony R.
On 8/9/07, Sean Azelton <[EMAIL PROTECTED]> wrote:
>
> Oh - I didn't mean Bookpool was too expensive - they are almost half
> the
terlaced word I could find was 11 characters long, and the longer you go,
the less probable it is that you'll find one. 31 seemed like a good enough
value, but I'll probably change my version to look like yours.
Thanks again, guys!
Tony R.
On 7/12/07, Gregor Lingl <[EMAIL PROTECTED
I've been programming for years before encountering Pythoin, but in much
more verbose languages, and I appreciate the fact that Python is so terse
and still accomplishes so much. Still, I have difficulty thinking in Python,
and tend to revert to longer programs for what seems to be simple tasks.
S
I'm trying to build the DB2 drivers I downloaded from
http://sourceforge.net/projects/pydb2
but I'm getting an error message when I try installing them (after doing
"python setup.py install"):
Your DB2 root is: C:\Program Files\SQLLIB\
WARNING: it seems that you did not install 'Application Devel
30 matches
Mail list logo