Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~25.6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Ene Uran

More or less a templet database that allows you to load, save, add, list, search, edit and delete data items. I used movies as an example, but you can easily change that to make a database of many other things.

Member Avatar for james.lu.75491856
1
961
Member Avatar for 3e0jUn

Is there any way I can execute a block of code in a loop, like so: [ some code goes here ] Where the delimiters are "[" and "]", and also allowing for nested blocks, i.e.: [the user can create another loop[]] I am creating a parser for a language …

Member Avatar for 3e0jUn
0
138
Member Avatar for 3e0jUn

I've been looking for a way to parse a simple XML-like language for use as a type of data storage. I've been through stuff like JSON, XML, etc but I don't want to use them because they are quite slow. I just need a simple way to parse this: [stuff] …

Member Avatar for james.lu.75491856
0
428
Member Avatar for 3e0jUn

So I have this piece of code in a socket server: def process(self, request, client_address): input_file = request.makefile("rb", 0) output = request.makefile('wb', 0) remote_input = input_file.readline().strip() + b"\n" self.log(remote_input) self.proc.stdin.write(remote_input) self.proc.stdin.flush() self.proc.stdout.flush() while True: line = self.proc.stdout.readline() line = line.decode() if line: line = bytes(line.rstrip() + "\n", 'utf-8') output.write(line) else: …

Member Avatar for Gribouillis
0
508
Member Avatar for hisan
Member Avatar for 3e0jUn
0
1K
Member Avatar for 3e0jUn

So I have a code that prints out the `sys.argv` when the program is ran. How can I parse $ python ./arch.py install * to show `["./arch.py","install","*"]` Instead of `["./arch.py","install",#other files in directory]`?

Member Avatar for deceptikon
0
198
Member Avatar for 3e0jUn

How do you start a SSH server on localhost through executing a shell script? If so, is there any way to restrict the commands performed or use another shell script as it's default console (i.e. Instead of Terminal.app it uses X11)?

Member Avatar for 3e0jUn
0
109
Member Avatar for sandorlev

Hey guys! I've started writing a 2d platformer game some days ago, and I'm really enthusiastic about it, but I already failed to live up to my own expectations: I just cannot possibly think of a way I could make my character jump. I used the MVC desing is why, …

Member Avatar for 3e0jUn
1
339
Member Avatar for 3e0jUn

For some reason , my code keeps returning a false reply even if the string is in the file. Here's my code: def check(self): self = str(self) if self in config_file: print ('Account exists') if self not in config_file: print ('Account doesn't exist')

Member Avatar for Gribouillis
0
162
Member Avatar for 3e0jUn

How could I make the return command in Python return a list AS a list, and not as a 'programmer' list? For example, for line in list: return (line) But for some reason it only returns the first element in the list, for example: myList = ['1','2','a','b'] for line in …

Member Avatar for peterparker
0
254
Member Avatar for victoria.v.hernandez.50

I need help with my facebook page it wont load and my media player wont let me play it

Member Avatar for 3e0jUn
0
59
Member Avatar for 3e0jUn

How do you make Python accept multiple strings and break them down in an input? For example, main = input ('> ') if main == ('ECHO',some_words): print (some_words) But everytime I do that, the some_words string wouldn't be defined. Error Message: Traceback (most recent call last): File "<pyshell#7>", line 1, …

Member Avatar for TrustyTony
0
182
Member Avatar for 3e0jUn

Can someone give a code snippet on how to 'chat' using the XMLRPC library in Python? Here's my server code: from xmlrpc.server import SimpleXMLRPCServer from xmlrpc.server import SimpleXMLRPCRequestHandler import os from os import access, path PATH = 'chatlog.$' class RequestHandler(SimpleXMLRPCRequestHandler): rpc_paths = ('/RPC2',) server = SimpleXMLRPCServer(("localhost", 8000), requestHandler=RequestHandler) server.register_introspection_functions() server.register_function(pow) …

Member Avatar for Gribouillis
0
415
Member Avatar for 3e0jUn

Is it possible (without using any external modules) to make two computers, or Python programs communicate through an Ethernet cable? E.g. Sending messages, numbers, etc. And if so, how?

Member Avatar for 3e0jUn
0
154
Member Avatar for 3e0jUn

How do you make Python set an str from a file? For example, my file would contain these pieces of text: username=Eugene password=eugene How do I get Python to return this? >>> print(username) Eugene >>> print(password) eugene Any help is deeply appreciated. Thanks!

Member Avatar for 3e0jUn
0
243
Member Avatar for 3e0jUn

How do you make Python delete a specific line of text from a file? For example, delete_input = input ('> ') file = open('blahblah.$','w') #delete the variable delete_input file.delete(delete_input from file) Any form of help would be appreciated. Thanks!

Member Avatar for snippsat
0
80
Member Avatar for 3e0jUn

I have a very tough problem- how do you make an icon/character move across a console screen? For example, if I press W, +++++ ++E++ +++++ Then I press D +++++ +++E+ +++++ And I want it to be like the CHOICE command in CMD- Without requiring the user to …

Member Avatar for 3e0jUn
0
92
Member Avatar for 3e0jUn

How do you make Python delete a string or a number (in this case, .0) from a file? Example: #Error Fixing if '.0' in open('ship.$','r'): #Delete the '.0'

Member Avatar for snippsat
0
477
Member Avatar for 3e0jUn

Guys check out http://cx6-dev.blogspot.com/ for an awesome game coded in Python. It's new but still fun. HIGHLY RECOMMENDED! PS: You'll need to have Python 3.2 or above to install/play it.

0
75
Member Avatar for 3e0jUn

I have a code for a game. money_file = open ('money.$','r').read() money_file = str(money_file) money = int(money_file) But everytime I run it, it returns an error: Traceback (most recent call last): File "C:\Users\eeo.j\Desktop\CX6 SDK\CX6 Normal\CX6.py", line 86, in <module> money = int(money_file) ValueError: invalid literal for int() with base 10: …

Member Avatar for HiHe
0
148
Member Avatar for kuchi

I've an web page which reads the data from (server side) database and write into csv file, but as per requirement I need to write the file in client side and asked user to save the file in their local machine with popup window to save the location (client side), …

Member Avatar for kuchi
1
723
Member Avatar for bobstein

OK, so when I use open(<filename>, 'w') the program either writes to the specified file or creates a new one if it doesn't exist, right? Is there a way to create a folder path or something? Like to create D:\My Documents\Folder and create a file in that folder? How would …

Member Avatar for TrustyTony
0
15K
Member Avatar for 3e0jUn

I've been working on Tkinter, and setting a message box. It worked fine, but I didn't really like the fact that the text displayed was in a small position in the window. Take a look at this code and you'll know what I mean. def About(self): text = Message(self, text=''' …

Member Avatar for 3e0jUn
0
178
Member Avatar for HTMLperson5

Hi, all. I am trying to clear the console window without using the "os" library. This seems like the only way to do it: from os import system import time print "I will clear the screen in 2 seconds" time.sleep(2) system("cls") print "*Cleared Screen*" SystemExit() But the problem is, this …

Member Avatar for 3e0jUn
2
3K
Member Avatar for 3e0jUn

Is there any way to host several txt files on a computer without having to dive deep into socket programming? I have a few requirements, though: * People could connect when the app is running * No inteference of Windows * Instructions on how to create a client side software …

Member Avatar for 3e0jUn
0
123