So it's 2.6. Actually, I made a console logo for this:
print "_/_/_/_/ _/_/ _/_/ _/_/_/_/ _/_/_/_/ _/ _/ _/_/_/_/" print "_/ _/_/ _/_/ _/ _/ _/ _/ _/ _/ _/" print "_/_/_/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/" print "_/ _/ _/ _/ _/ _/ _/_/_/_/ _/_/_/ _/ _/ 0.1 _/" print "_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/" print "_/_/_/_/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/_/ _/_/_/_/" print "" print "Easy Programming --------------------------------------------- by Emerald Team"
It's ready to paste in program.
Offline
1. Idk
2. I think we should just keep it as it is, I can make those too but I didn't bother to put it in. I could just take the logo and make it show up at the beginning.
3. And where would I find that?
I'm using Python 2.5 so most people should be able to use it.
Offline
There was a module named py2exe that could convert a .PY file into a .EXE file, so anyone could read it, and they wouldn't need python.
Offline
The thing you're doing wrong is you don't define an object to the file.
Oh, here it is. It's like this to read a file:
my_file = open('my_notes.txt', 'r')
'r' stands for read. You should just leave the file in the same directory as the program.
my_file = open(my_notes.txt', 'a')
'a' means Append, or to add on to a file.
You'll get an error if you try to append to a file that's blank.
However:
my_file = open('my_notes.txt', 'w')
If the file doesn't exist this will work, but be careful, because when you write a file it replaces all the contents with what you wrote.
my_file = open('my_notes.txt, 'a') my_file.write('\nSpend allowance') my_file.close()
This appends to a file. You need to close a file after you're done using it.
my_file = open('notes.txt', 'r') my_line = my_file.readlines()
This reads the whole file and makes a list(my_line) with each line an item in a list. THAT'S what you're looking for!
Last edited by Greatdane (2009-09-12 10:35:54)
Offline
I've been reading a book I know. Hmm...Would this work?
program = open("program","r")
How about you do that coding?
Offline
Well, this would be file without any extension, plus, I thought we're gonna save things to XML-like files (you know, the file that links sprites with their scripts), and if so, we're gonna need XML for Python (I think it's already there). Plus, I have Python 2.6 (2.5 is sorta outdated), and I recommend you to upgrade yours to 2.6.
That XML based file should be simple, like this one:
<emerald-program name="standards test" author="emerald team">
<author-trackback>
<author version-created="1">Magine</author>
<author version-created="2">filo5</author>
</author-trackback>
<stage>
<sounds>
<sound name="emerald-ping">/files/stage/sounds/emerald-ping.ogg</sound>
</sounds>
<costumes>
<background-costume name="(default)">/files/stage/backgrounds/white.gif</background-costume>
</costumes>
<script-file src="/scripts/stage.ems">
</stage>
</emerald-program>
---> file extension: .EMERALD or .EML
Offline
The EMERALD file tree: <this is folder>
program_name.eml
<files>
author_traceback.eml
<stage>
<sounds>
emerald-ping.ogg
<backgrounds>
white.gif
<scripts>
stage.ems
EML stands for Emerald Markup Language. All of it will be stored in a ZIP archive which will have .emerald extension (though it's still a ZIP archive).
Also, some ideas for syntax (and default syntax coloring):
`variable`
^parameter that script is called with^
Object_with_script_to_be_called::script_to_be_called [parameters: ^parameter1^="LOL"]; //notice the semicolon - required to end the command (inherited from C-family) (it's a comment - formatting inherited from C-family)
script "script_to_be_called" [parameters: ^parameter1^] {
//that script's body
} //end - those braces were taken from C-family.
Last edited by filo5testing (2009-09-13 03:12:14)
Offline
I have no idea of what you're talking about, but how about .erd for extension?
Offline
For what? The project file? Because I think it's the best thing to do like in my 2 previous posts, but it may be .erd instead of .emerald extension, but you should keep the .eml for project descriptors (but then the .eml extension for saved emails will be invalidated...)
Offline
Okay, but I'll still need help to understand what you're talking about.
Offline
Imagine as emerald project as a compressed folder (eg. ZIP file) - and it has a structure like this one I mentioned before. And there must be a file that tells Emerald script runner where to look for files, and the best language for this is XML-based thing (XML stands for eXtensible Markup Language) because it's implemented widely in many programming languages. An example XML tag looks like this:
<tag thing="value">inner value</tag>
Or like this:
<tag thing="value" />
That /> means the tag has no inner value.
So, extension for project file would be .erd... Wait, if it's hidden from user, why would we need a specific extension for project "descriptor"? We'll just leave the .xml thing...
Offline
Okay, but I think Ima stick to Python. Maybe once I get a new computer and get all the things I want on it instaled I'll try C/C++/C# or any other programing languages.
Offline
But I think Python can import DLL libraries as objects, so I can write DLLs in C#...
I weren't talking about any pythons there, I was just trying to propose a project descriptor file standards. We'll gonna need it when we start to make it graphics & stuff. I personally think that it's the best way to make it from existing standarts, and thus, .erd file will be the same like .zip file but with other extension; and for project description (needed to tell program where costumes, sprites and scripts are), I think we'll need a good data storage files. XMLs are light, powerful and implemented in almost any programming language possible. Take a look at this:
Offline
i wouldn't mind doing the guior that stuff, but how do i do it? Iv never really been told how... or seen it done
Offline
Just make images, Make a GUI like Scratch. But take out the blocks and that type of stuff, not the costume area and sounds.
Offline
At first, we need a cool icon for Emerald. Let's say we could borrow Ruby's for a while (of course I'll do a trick to make it green), or something like that. Or, markyparky, if you could, you can draw a rough copy or concept of the icon and post it here. I don't have experience in icons, but I'm sure we could figure out how to make that icon an icon.
Magine, do you understand what I was talking about in my previous post? Let's say, that a DLL file is like a set of classes exported to another file, waiting to be used. And now, Python has ability to import DLLs and treat them just like sets of classes. And of course, those classes are not just simple classes; with those all things available for .NET apps, including DirectX, GDI+ (you don't have to understand what GDI+ is, and I'm sure you've met DirectX somewhere) and of course Windows Forms (I mean windows, they call it forms). And if you somehow manage to get .NET DLLs working with Python, I think I'll start to make them. The first one could be simple class(es) for easier Emerald-XML handling.
As for blocks, I'm sure they won't look like Scratch block. Just give'em some shine up!
Offline
Actually there won't be blocks, just text. and yes I think I understood what you meant in your old post.
Offline
My school has a program in their programming folder, called GreenFish Icon Editor Pro. You should get that, or i could do it at school?
Magnie: Ok, ill start working on it as soon as i can. Would editing the scratch one be ok, or a completely new GUI? i would suggest editing the original, it would help people be able to know their way around it.
edit: Do i have to save it as a certin file type? Like an image file?
Last edited by markyparky56 (2009-09-18 08:39:31)
Offline
Marky: Yes, like that one.
Off: I'm learning how to get images in! But, now the text, this is so hard.
Offline
kk... ill start. Thanks!
Edit: Should there be an erea to show how to do certin commands?
Last edited by markyparky56 (2009-09-18 09:28:30)
Offline
Idk, lets just make a script area, where everything is happening, and buttons.
Offline
ok, another question, is there any writing, or is that all added in with the programing part?
Offline
There might be writing. I just found out how to add items to add GUI, but it's EXTREMELY complicated, or at least the changing stuff, I have a new idea just now, but now we all need PyGame now. I'll keep looking into this.
Idea: Program in non GUI and animation and stuff in GUI. Just make a box, how about that?
Offline
i dont understand the idea part, but ok...
ill try out the pyGame
Offline