Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 22nd, 2005, 5:30 PM   #1
Datalisk
Newbie
 
Join Date: Oct 2005
Posts: 4
Rep Power: 0 Datalisk is on a distinguished road
Anyone ever see an assembly program that could run python scripts?

*Insert what title said here*. I'd like to use that to create a command shell for the OS i'm working on. It'd be quite useful to have a high level language to program command line utilities and the command line itself for my operating system... Though unlikely, I figured I'd ask about this...
__________________
DevPortal - My website!
Datalisk is offline   Reply With Quote
Old Oct 22nd, 2005, 5:55 PM   #2
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
Well, the standard Python interpreter is programmed in C, which compiles into machine code. What's preventing you using that?
Arevos is offline   Reply With Quote
Old Oct 22nd, 2005, 6:42 PM   #3
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
An eecutable python file named helloworld (no .py extension or "python" command preceding the name is required) could look like the following and be executed after it was chmod'd to 777 on the bash linux shell:
#!/usr/bin/python -w
print "Hello, this is python!";
__________________

tempest is offline   Reply With Quote
Old Oct 22nd, 2005, 8:43 PM   #4
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
You really have no idea how to get an operating system off the ground do you, Datalisk.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Oct 23rd, 2005, 7:31 AM   #5
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 3 Polyphemus_ is on a distinguished road
when writing an operating system, you don't start with writing a command shell - it's kind of your final program. Writing a python interpreter comes even later. Writing includes more than only the visual stuff. Much more.
Polyphemus_ is offline   Reply With Quote
Old Oct 23rd, 2005, 10:37 AM   #6
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Much much much much much, much much, much much much, much more.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:05 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC