spangled spanner wrote:
> G'day,
>
> I have a comprehension issue here! I have made two simple scripts:
>
> ## script1
>
> import os
>
> print os.getcwd()
>
> -
> ## script 2
>
> import os
>
> f = open('test', 'wb')
> f.write(os.getcwd())
> f.close()
>
> ___
hi,
I am a beginner. I am using a unix sytem (ubuntu 12.10). Python 2.7.3
is installed in my system. I found out that Python has version upto 3.3.2.
Should I update my python version? Is the syntaxes of the each version
different?
Thanks,
Thomas
___
On 20/05/13 17:55, Peter Otten wrote:
I've rerun the script and it still works over here. I'm in Germany, though,
and therefore there's a small chance that I'm being served different data.
What does
import urllib2
Thank you Peter for your detailed reply, I now have a better
understanding of
On 05/20/2013 05:59 AM, Amal Thomas wrote:
hi,
I am a beginner. I am using a unix sytem (ubuntu 12.10). Python 2.7.3
is installed in my system. I found out that Python has version upto 3.3.2.
Welcome, and thanks for telling us your environment up front.
Should I update my python version?
On Mon, May 20, 2013 at 5:59 AM, Amal Thomas wrote:
> I am a beginner. I am using a unix sytem (ubuntu 12.10). Python 2.7.3 is
> installed in my system. I found out that Python has version upto 3.3.2.
> Should I update my python version?
Ubuntu 12.10 should have 3.2.3 installed (the python3 pack
Thank you very much..!! I am starting to learn python for my Bioinformatics
work, so I would look for the version that has libraries helpful for me..
On Mon, May 20, 2013 at 6:38 PM, Dave Angel wrote:
> On 05/20/2013 05:59 AM, Amal Thomas wrote:
>
>> hi,
>> I am a beginner. I am using a uni
>On Mon, May 20, 2013 at 5:59 AM, Amal Thomas wrote:
>> I am a beginner. I am using a unix sytem (ubuntu 12.10). Python 2.7.3 is
>> installed in my system. I found out that Python has version upto 3.3.2.
>> Should I update my python version?
>
>Ubuntu 12.10 should have 3.2.3 installed (the pyth
On 20/05/13 23:22, Albert-Jan Roskam wrote:
To what extent is Ubuntu (I use Mint, but I think that's almost the same)
already using Python 3.2 internally?
Zero.
As far as I know, the only major Linux distro using Python 3 as the standard
Python is Arch Linux, and they have a reputation for
Hello,
I wrote a simple program, and I was expecting that I would get 100
different random numbers. Instead, I am getting 100 times exactly the same
random number. Can anyone advise how I should alter my program?
Thank you!
All the best,
Rafael
PS. I am using Python 3.3.0
print ("""
This game
On Mon, May 20, 2013 at 11:31 AM, Rafael Knuth wrote:
>
> Hello,
>
> I wrote a simple program, and I was expecting that I would get 100 different
> random numbers. Instead, I am getting 100 times exactly the same random
> number. Can anyone advise how I should alter my program?
>
> Thank you!
>
You need to move this line:
Random_Number = random.randint(1, 100)
into the loop body, like this:
while Count <= 100:
Random_Number = random.randint(1, 100)
print (Random_Number)
Count = Count + 1
Hope this helps.
On Mon, May 20, 2013 at 9:31 AM, Rafael Knuth wrote:
> Hello
On 05/20/2013 12:31 PM, Rafael Knuth wrote:
Hello,
>
> I wrote a simple program, and I was expecting that I would get 100
different random numbers. Instead, I am getting 100 times exactly the
same random number. Can anyone advise how I should alter my program?
>
> Thank you!
>
> All the best,
But this is all a distraction -- how exactly are you invoking what you think
is Python 3.3.0? What is your operating system?
My mistake, I am using two laptops with different operating systems
(Windows 7 & SUSE 12.3). I am using Python 3.3.0 on the Windows laptop and
I was wrongly assuming that I
Your variable assignment for Random_Number is outside of your while
loop. Therefore its value never changes. Put it inside the while loop
just before the print statement and I think you will get what you
That was it! Thank you, you made my day, Bob :-)
On Mon, May 20, 2013 at 6:37 PM, boB Stepp
Mitya,
Why is it best in this situation to use range() rather than a while
loop? Curious about best practices for the various iterating
functions. Thanks!
> There are a few issues here:
> * variable names should be lower case
> * for this case it's best to use for loop with range()
> * you calcul
On 05/20/2013 12:55 PM, Thomas Murphy wrote:
Mitya,
Why is it best in this situation to use range() rather than a while
loop? Curious about best practices for the various iterating
functions. Thanks!
There are a few issues here:
* variable names should be lower case
* for this case it's best t
> > import random
> >
> > Count = 0
> >
> > Random_Number = random.randint(1, 100)
> >
> > while Count <= 100:
> > print (Random_Number)
> >
> > Count = Count + 1
>
> There are a few issues here:
> * variable names should be lower case
> * for this case it's best to use for loop with ran
Hi python folks,
I have a list of lists that looks something like this:
tst = [ [], ['test'], ['t1', 't2'], ['t1', 't1', 't2'] ]
I want to change the empty sets to a blank string, i.e., '' and the lists with
repeat values to the unique set of values. So I have done the following:
>>> for
On 21/05/13 08:49, Treder, Robert wrote:
Hi python folks,
I have a list of lists that looks something like this:
tst = [ [], ['test'], ['t1', 't2'], ['t1', 't1', 't2'] ]
I want to change the empty sets to a blank string, i.e., '' and the lists with
repeat values to the unique set of values. S
If I make a package called jimlib with __init__.py in it, and a
program called bark.py in it, and even put it in site packages, I
still have to import the program with import jimlib.bark
But I noticed that the pygraphics package is in site packages, and has
media.py in it, and all I have to do w
Hi Rafael,
On Tue, May 21, 2013 at 2:51 AM, Rafael Knuth wrote:
>
> Your variable assignment for Random_Number is outside of your while
> loop. Therefore its value never changes. Put it inside the while loop
> just before the print statement and I think you will get what you
>
> That was it! Tha
Hello Amal,
On Mon, May 20, 2013 at 11:24 PM, Amal Thomas wrote:
> Thank you very much..!! I am starting to learn python for my Bioinformatics
> work, so I would look for the version that has libraries helpful for me..
Do you already have any libraries in mind (or aware of) that you
would want
On 05/20/2013 09:43 PM, Jim Mooney wrote:
If I make a package called jimlib with __init__.py in it, and a
program called bark.py in it, and even put it in site packages, I
still have to import the program with import jimlib.bark
But I noticed that the pygraphics package is in site packages, an
On Mon, May 20, 2013 at 9:43 PM, Jim Mooney wrote:
> If I make a package called jimlib with __init__.py in it, and a
> program called bark.py in it, and even put it in site packages, I
> still have to import the program with import jimlib.bark
>
> But I noticed that the pygraphics package is in
24 matches
Mail list logo