zling.
From the 2to3 --help:
-w, --write Write back modified files
So it's normal nothing happens to your files without the -w argument. It
just prints the changes to stdout.
Timo
Jim
___
Tutor maillist - Tutor@python.org
To un
I have a datafile which is parsed by an external library, I'm having
trouble creating a hierarchical structure of the data.
This is what I got so far:
items = get_items() # returns a generator
for item in items:
print(item)
children = get_children(item) # also returns a generator
for
ur results.
Something like;
cur = g.db.cursor()
cur.execute(.)
Not really.
sqlite3.connect() returns a sqlite3.Connection object which has a
execute method. It will create a cursor object for you.
Cheers,
Timo
HTH
___
Tutor maillist - Tutor@pyt
Here are the docs:
http://getbootstrap.com/
Everything is set up for you already so you can create good looking
websites in a flash.
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.or
cups, this is a project with Python bindings for
cups: https://pypi.python.org/pypi/pycups/1.9.66
Timo
Am 14.03.2014 11:40, schrieb Ulrich Goebel:
Hallo,
is there another way to pritt a PDF form python?
My problem is a PDF which is printed well by evince, but not with lp,
even not out of p
Shift+tab does that in my editor. I don't know if this is a common
keybinding or editor specific.
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
Op 05-02-15 om 18:48 schreef Alan Gauld:
try:
>>> help( enumerate() )
Should be
>>> help(enumerate)
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ing list():
unvisited_caves = range(0,20)
I think you missed your own solution here, Alan. You probably meant:
unvisited_caves = list(range(0, 20))
Timo
...
unvisited_caves.remove(0)
However remove() may not do what you think. It removes the
value zero from your list not the first element. I th
raceback (most recent call last):
File "", line 1, in
AttributeError: 'float' object has no attribute 'append'
Exactly the same as yours!
So, a float has no 'append' attribute, but what objects do have that?
Sounds like you need a list to hold an arbitr
g the rstrip function instead of calling
it and store the result. A big difference.
The fix is very easy, just call rstrip in your list comprehension:
k = [word.rstrip() for word in words]
A little tip: errors like these are easy to debug by printing your
values. If you printed k before continuing it wo
your example you convert the first
one to a list with list(), but not the second, so it prints the range
object.
>>> range(2)
range(0, 2)
>>> list(range(2))
[0, 1]
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or
remove(...)
L.remove(value) -> None -- remove first occurrence of value.
Raises ValueError if the value is not present.
The same for help(list.sort) BTW.
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options
Instance created"
Foo() # print "Instance created"
Two instances are created, just that the second one isn't accessible.
Timo
main.mainloop()
===
any explanation gratefully recieved
Regards, Chris ROy-Smith
___
Op 21-08-18 om 13:16 schreef Jacob Braig:
I am just starting out coding and decided on python. I am confused with
something I go shooting a lot so i wanted to make some stupid easy
calculator for ammo and slowly build the program up when I understand
python better but the code I have now keeps po
I read that it is advised to subclass object.
Is it really necessary? I mean, everything works, why should I add it to my
code?
Cheers,
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org
Hello all,
At the moment I'm using 3 files as datastorage for my program. One file
using ConfigParser and two use the Pickle module.
File one contains for example:
[ID]
option1 = string1
option2 = string2
option3 = string3
And is connected to one of the Pickle files which is like this:
{ID : [{k
d().
What should I use the best for this? Maybe examples of other programs that
do something alike?
Thanks,
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
ail from a user with the following error:
IOError: [Errno 2] No such file or directory: 'nul'
Now, I thought the nul-file always existed, shouldn't it?
Is there another way to disable output, if this one fails?
Cheers,
Timo
___
Tutor
case of opening an
existing file).
I already installed Python a second time, but this also does not help.
Has anybody an idea how to fix this problem?
Thanks and all best
Timo
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
101 - 119 of 119 matches
Mail list logo