Hello,
I am new here, and new with Python.
I use Python 2.7 on a windows computer in Pyscripter.
I've got the next problem witch I need some help with:
I need to copy several files, from several folders to a new location in the
same folder structure as they are now.
And all the files I need to
t len(line)" and see if the lines are empty,
or filled with unprintable things.
Also, what sort of file is it?
Remco
On Jan 24, 2008 11:42 AM, SwartMumba snake <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am trying to read from a specific .lst file. When I read from it, it
>
nary on its own.
Remco
On Jan 24, 2008 8:20 AM, Garry Willgoose <[EMAIL PROTECTED]>
wrote:
> Is there any easy way to create a nested dictionary. I want to be
> able to allocate like
>
> pdb[dataset][modulename][parametername]['value']=value
>
> where dataset,
ict
while level > 1:
result = lambda: defaultdict(result)
level -= 1
return result
d = deep_default_dict(4)()
Should give a dictionary for level=1 and the appropriate defaultdict for the
number of levels you need.
But I can't test right now...
Remco
On Jan 24, 2008 8:20
string into a list,
splitting at every space.
Also, I'd recommend adding ( and ) around the tuple for readability, so
you'd get this:
ch = ("So good to see you!",
"How are you?",
"Everything good today?",
"Glad you're here!",
h what they ask, since you have
the level of Python knowledge that you claimed.
Remco Gerlich
On Jan 19, 2008 3:09 AM, Varsha Purohit <[EMAIL PROTECTED]> wrote:
> Hello All,
>I have an interview in python program development. Can i know some
> interview questions in python
Hi,
A few days ago, someone posted a "daemon.py" to Reddit, that's supposed to
do everything needed. Haven't used it myself, but here it is:
http://hathawaymix.org/Software/Sketches/daemon.py
Remco
On Jan 10, 2008 6:41 AM, Allen Fowler <[EMAIL PROTECTED]> wrote:
>
Hi,
a = [4,3,2,6,7,9]
b = [8,6,3,3,2,7]
You can turn this into a list of two element tuples with zip():
>>> zip(a,b)
[ (4,8),(3,6,),(2,3),(6,3),(7,2),(9,7) ]
Now you can loop through that and compare both elements, for instance I
believe this list comprehension is what you're looking for:
[ t[0
On Dec 18, 2007 2:44 AM, Jim Morcombe <[EMAIL PROTECTED]> wrote:
> Below, "student_seats" is a list of the class "student".
How do you create the list?
And yes, the naming is confusing, but I believe that only masks the class,
it shouldn't
Hi,
In this case, I'd go for the simple old fashioned for loop with a boolean:
found = False
for thing in Things:
if thing.value > 0:
found = True
if found:
thing.value = 2
Remco Gerlich
On Dec 6, 2007 9:48 AM, ted b <[EMAIL PROTECTED]> wrote:
> Can y
x27;s fun, and it's a tour of what Python can do - but you'll have to find
the way yourself :-)
Remco Gerlich
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
It arrived.
Since you appear to be the only one reporting the problem, perhaps it's
something on your end?
Remco Gerlich
On Dec 3, 2007 11:51 PM, Tim Johnson <[EMAIL PROTECTED]> wrote:
> On Monday 03 December 2007, Tim Johnson wrote:
> > I appear to be having a weird p
ctly normal windows, that contain normal HTML.
It's hard to give more help without knowing more about your problem.
Hope this helps a little,
Remco Gerlich
On Nov 27, 2007 1:10 AM, Chiar Nimeni <[EMAIL PROTECTED]> wrote:
> i basicly need python to open a certain javascr
rt is
a statement, not an expression.
However, you can use the built-in function __import__(), that imports
the module and returns it. That loads it into memory, but it doesn't
add the module to the current namespace.
What do you need this for?
Remco Gerlich
On Nov 15, 2007 4:25 PM, Mihai I
e to the PyExif library (
http//pyexif.sourceforge.net/ ) and this post by someone who did the
exact thing you want to do:
http://www.leancrew.com/all-this/2007/08/photo_file_renaming_again.html
Hope this helps :-)
Remco
On Nov 14, 2007 1:04 PM, Roy Chen <[EMAIL PROTECTED]> wrote:
> Hello,
&g
15 matches
Mail list logo