This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#26 2010-04-30 17:53:15

somelia
Scratcher
Registered: 2009-09-13
Posts: 1000+

Re: Python Talk

urhungry wrote:

What os will cake-write be for? If it's linux, I'll download it.

All OS's that Python is available for, and I KNOW that Python is available for Linux.

Offline

 

#27 2010-04-30 18:14:36

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: Python Talk

BWOG wrote:

You can make Civilization IV mods with Python  tongue

That's probably where I first heard of Python  tongue

Same!

Last edited by waveOSBeta (2010-04-30 18:15:18)


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#28 2010-04-30 21:21:10

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Python Talk

i just downloaded python. ill try and figure it out now.

Offline

 

#29 2010-04-30 22:59:04

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: Python Talk

Greatdane wrote:

ThePCKid wrote:

Code:

print "PUT SOME TEXT HERE"

Doesn't work. But this works:

Code:

print("PUT SOME TEXT HERE")

The first one works in 2.5.1.

The second one only works in 3.1.2.

Don't say things to act smart. I've seen you two times already be failed completely.  tongue

The first works with 2.6 and lower.
The second works for all versions.


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#30 2010-04-30 23:30:42

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Python Talk

urhungry wrote:

i just downloaded python. ill try and figure it out now.

Awesome! It's really interesting and fun to program with.  smile


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#31 2010-04-30 23:59:15

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Python Talk

i downloaded pythoncard, how do i run it?

Offline

 

#32 2010-05-01 00:34:24

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Python Talk

Pythoncard is a module, just leave it there.


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#33 2010-05-01 00:36:31

urhungry
Scratcher
Registered: 2009-07-03
Posts: 1000+

Re: Python Talk

ok. what's it for?

Offline

 

#34 2010-05-01 09:33:10

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Python Talk

urhungry wrote:

ok. what's it for?

It's a not that good GUI module (you still have to code the GUI though)


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#35 2010-05-01 13:08:27

somelia
Scratcher
Registered: 2009-09-13
Posts: 1000+

Re: Python Talk

gershmer wrote:

urhungry wrote:

ok. what's it for?

It's a not that good GUI module (you still have to code the GUI though)

Yeah, but it makes it way easier to make a GUI. Also, if you want a simple GUI, (dialog boxes, text boxes, ETC) try EasyGUI.

Offline

 

#36 2010-05-02 13:10:36

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Python Talk

I bumped this a lot.  wink

I finished a bit of my "notepad". It's called CodeEdit.

here

It requires PythonCard and EasyGui, but it's nice.


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#37 2010-05-02 13:31:12

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

I'm installing Python 3.1.2 right now

Offline

 

#38 2010-05-02 13:35:21

somelia
Scratcher
Registered: 2009-09-13
Posts: 1000+

Re: Python Talk

Greatdane wrote:

I bumped this a lot.  wink

I finished a bit of my "notepad". It's called CodeEdit.

here

It requires PythonCard and EasyGui, but it's nice.

May I borrow the source code for CakeWrite?

Offline

 

#39 2010-05-02 13:45:03

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

For backwards compatability, I installed 2.6.5.

Now I have 2.6.5 and 3.1.2 on my computer!

Offline

 

#40 2010-05-02 14:13:37

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Python Talk

somelia wrote:

Greatdane wrote:

....

May I borrow the source code for CakeWrite?

Absolutely!

Just remember to give credit where needed.  wink


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#41 2010-05-02 15:44:36

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

I'm such a n00b with Python.

Code:

from easygui import *
 
if ynbox("Are you gonna press the no button?", "Question"):
    msgbox("But you didn't!", "Info")
else:
    msgbox("But you just did!", "Info")

Heh heh...

Make sure you have EasyGui installed

Last edited by ThePCKid (2010-05-02 16:35:53)

Offline

 

#42 2010-05-02 15:58:16

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

Greatdane wrote:

I bumped this a lot.  wink

I finished a bit of my "notepad". It's called CodeEdit.

here

It requires PythonCard and EasyGui, but it's nice.

Should I open Codeit.py or Codeit.rsrc.py first?

EDIT: They both wont work.

EDIT: I have EasyGui and PythonCard installed but there were a couple errors in the PythonCard installation.

Last edited by ThePCKid (2010-05-02 16:01:59)

Offline

 

#43 2010-05-02 18:30:37

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Python Talk

I'll put EasyGui and PythonCard directly in the folder, so just run Codeit.

I'll upload soon.


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#44 2010-05-02 18:38:51

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: Python Talk

gershmer wrote:

My epic Python skills will be put into use in M30W.

If you know what that is, €1 for you. (If you it fn-f3 instead of shift-4, you get that sign on my comp)

M30W = Text based Scratch, also known as "Emerald". Now give me my €1 D:<

Haven't had time to mess with Phyton yet D:


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#45 2010-05-02 18:40:24

iCode-747
Scratcher
Registered: 2009-11-21
Posts: 1000+

Re: Python Talk

I'm interesting in learning another language... But ish too lazy. xD


-End Transmission-

Offline

 

#46 2010-05-02 20:05:21

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

Bump

Offline

 

#47 2010-05-02 20:40:24

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

Here's a simple calculator

Code:

num1 = float(input("First number: "))
oper = str(input("Operator (+, -, *, /, %): "))
num2 = float(input("Second number: "))

if oper == "+":
    print(num1 + num2)
elif oper == "-":
    print(num1 - num2)
elif oper == "*":
    print(num1 * num2)
elif oper == "/":
    print(num1 / num2)
elif oper == "%":
    print(num1 % num2)
else:
    print("Invalid operator.")

Offline

 

#48 2010-05-02 20:46:56

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

soupoftomato wrote:

I saw a python once. It hissed an tried to bite me. I didn't see a way to program with it, just some really scary territorial threats.

We mean the programming language not the animal

Offline

 

#49 2010-05-02 21:31:12

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

Bump

Offline

 

#50 2010-05-02 22:25:24

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Python Talk

Right now I'm making a fake OS in Python. Right now I only have the login script finished.

Code:

def load_the_os():
    print("Under construction")

def try_to_login():
    tempuser = temppass = ""
    tempuser = str(input("Username: "))
    temppass = str(input("Password: "))

    if tempuser == username:
        if temppass == password:
            print("Logged in!")

            for i in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]:
                print('\n')

            load_the_os();
        else:
            print("Incorrect password")
            try_to_login()
    else:
        print("Incorrect username")
        try_to_login()

username = password = ""

if username == "":
    username = str(input("Enter your desired username: "))
    password = str(input("Enter your desired password: "))

    for i in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]:
        print('\n')

try_to_login()

P.S. Sorry port posting 5 times in row

Offline

 

Board footer