Hi Tonu,
Tonu Mikk wrote:
> I do not know what the author means by running a text file with the
> interpreter. I noticed that I came across an obstacle early on in trying
> out the code.
What plattform are you in? Linux, Windows, Mac?
Check out the faqs at:
http://www.python.org/doc/faq/windo
Teresa Stanton wrote:
> If one argument to a script is provided I am to take the input from it.
> I figure that is presented like this:
>
> filename = sys.argv[1]
Try:
filename=sys.arg[1]
except exception, E:
filename='FooBar'
> data = open(filename).read()
>
> But, if none a
"Terry Carroll" <[EMAIL PROTECTED]> wrote
>> One of my tutorial users has come upon a really weird bug.
>>
>> He has sent a transcript oif his session. Notice that wx
>> is not defined yet doing help(wx) produces a strange message.
>
> Very weird. Here's what I get, weird in a different way..
John Clark wrote:
> locals()[var]
>
> But I am not sure what the pros/cons for doing something like this would
> be...
locals() should be considered read-only. From the docs:
locals( )
Update and return a dictionary representing the current local
symbol table. Warning: The content
Andreas Pfrengle wrote:
> Bob Gailer wrote:
>>> Now I want to change the value of x, but address it via var.
>> exec is the statement for doing this, but the need to do this can
>> always be met better by using a dictionary instead of global variables.
>>
> Thanks Bob, the 'exec' saved me. But I
Andreas Pfrengle wrote:
> [snip]
> looks good if I'm happy with my values inside mydict and don't want to
> have sth. like x=5 in the end. But since 'x' is the name of a database
> field (I simplified it here for an example), I still see no way around
> the exec, so I can change the content of
On 4/8/07, Kirk Bailey <[EMAIL PROTECTED]> wrote:
> It works. but when you mouse copy and paste, you get this:
[...]
This has what to do with Python?
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tutor@python.org
http://mail.python.org
OK, riddle me this.
Using css, I supressed the bullet in unordered lists. The Print line
prints an '*' before the item in the listing. so you will see displayed:
* abba
* abbb
* abbc
* abbd
so the listing can be copied and pasted into a listing in a wiki page.
It works. but when you mouse copy
Jordan Greenberg wrote:
Andreas Pfrengle wrote:
Bob Gailer wrote:
Andreas Pfrengle wrote:
Hello,
I want to change the value of a variable whose name I don't know, but
this name is stored as a string in another variable, like:
x = 1
var = 'x'
Now I want to change the value
Bob Gailer wrote:
> Andreas Pfrengle wrote:
>
>> Hello,
>>
>> I want to change the value of a variable whose name I don't know, but
>> this name is stored as a string in another variable, like:
>>
>> x = 1
>> var = 'x'
>>
>> Now I want to change the value of x, but address it via var.
>
> exec is
Bob Gailer wrote:
>Andreas Pfrengle wrote:
>> Hello,
>>
>> I want to change the value of a variable whose name I don't know, but
>> this name is stored as a string in another variable, like:
>>
>> x = 1
>> var = 'x'
>>
>> Now I want to change the value of x, but address it via var.
>
>exec is the
Andreas Pfrengle wrote:
> Hello,
>
> I want to change the value of a variable whose name I don't know, but
> this name is stored as a string in another variable, like:
>
> x = 1
> var = 'x'
>
> Now I want to change the value of x, but address it via var.
exec is the statement for doing this, but t
Hello everyone,
A couple of months ago, I had posted on this list asking about the
usefulness of such a program. Something similar to TclTutor
(http://www.msen.com/~clif/TclTutor.html) for python.
I've spent some time on this and have come up with a crude first
version. I'd appreciate if some
Hello,
I want to change the value of a variable whose name I don't know, but
this name is stored as a string in another variable, like:
x = 1
var = 'x'
Now I want to change the value of x, but address it via var. I'm quite
sure I've already seen a solution for this, but right now I don't get it
Indeed ;)
>Python is Cool :)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Dear Greg,
thanks the link to pymedia.
> Maybe PyMedia is what you are looking for: http://www.pymedia.org
I looked for it for a while. It is very cool.
I made the next short script from one of the samples that make exactly
what I wanted.
###
import sys, os, glob, Image, time
import
linda.s wrote:
> Hi,
> I have a list: [2,5,8,0,1,7]
> how i can randomly reassign the values to different location in the list?
> for example:
> Time 1: [5,2,8,0,1,7]
> Time 2: [8,0,7,1,5,2]
>
Have a look at the .shuffle function in the random module.
TJG
___
Hi,
I have a list: [2,5,8,0,1,7]
how i can randomly reassign the values to different location in the list?
for example:
Time 1: [5,2,8,0,1,7]
Time 2: [8,0,7,1,5,2]
Thanks!
Linda
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listin
18 matches
Mail list logo