Forum: Python Jan 3rd, 2008 |
| Replies: 2 Views: 505 Re: File Sharing System Fixed:
#!bin/python
import socket
import sys
import os
import threading
from utils import serialize, deserialize, PeerInfo
import random as rnd |
Forum: Python Jan 2nd, 2008 |
| Replies: 2 Views: 505 Re: File Sharing System terribly sorry, peer.py totally sucks!
modified peer
#!bin/python
import socket
import sys
import os
import threading
from utils import serialize, deserialize, PeerInfo |
Forum: Python Jan 2nd, 2008 |
| Replies: 2 Views: 505 File Sharing System Hi,
I've been trying to code a simple file sharing system in python by using Discovery server -indexer- model
Server:
#!bin/python
import socket
import sys
import os
import threading |
Forum: Python Oct 17th, 2007 |
| Replies: 3 Views: 455 |
Forum: Python Oct 17th, 2007 |
| Replies: 3 Views: 1,635 |
Forum: Python Oct 7th, 2007 |
| Replies: 1 Views: 938 |
Forum: Python Oct 7th, 2007 |
| Replies: 11 Views: 1,254 Re: Working with lists >>> LIST = ["CANADA", "HELLO", "I TOLD YOU SO"]
>>> conv_list=[]
>>> for el in LIST:
conv_list +=[el.lower()]
>>> conv_list
['canada', 'hello', 'i told you so'] |
Forum: Python Sep 16th, 2007 |
| Replies: 2 Views: 697 Re: quick question >>> l=[1, 2, 3, 4, 5]
>>> l2=[number for number in range(1, 10) if not number in l]
>>> l2
[6, 7, 8, 9]
or something like this :
>>> l3=[]
>>> for number in range(1, 10): |
Forum: C Sep 15th, 2007 |
| Replies: 6 Views: 1,372 |
Forum: Python Sep 13th, 2007 |
| Replies: 1 Views: 530 |
Forum: Python Sep 13th, 2007 |
| Replies: 4 Views: 2,337 Re: newbee: simple python for loop question test = [random.randint(1,10) for i in range(20)]
equals
>>> import random
>>> test=[]
>>> for i in range(20):
#test.append(random.randint(1, 10))
random_int=random.randint(1, 10)
... |
Forum: Python Sep 9th, 2007 |
| Replies: 6 Views: 719 |
Forum: Python Sep 8th, 2007 |
| Replies: 6 Views: 719 Creating a ref to a string ? Hi,
How can i create a ref to a string ? it doesn't work like lists :S
List : (IDs are the same!)
>>> li=[1, 2, 3, 4, 5]
>>> li_ref=li
>>> id(li)
13545800
>>> id(li_ref) |
Forum: Python Aug 7th, 2007 |
| Replies: 9 Views: 1,030 Re: Python tutorials? A good start
http://www.daniweb.com/forums/thread20774.html
Google-> Python Tutorials -Monty -Snake |
Forum: C# Jul 20th, 2007 |
| Replies: 2 Views: 712 |
Forum: Python Jul 20th, 2007 |
| Replies: 2 Views: 693 |
Forum: C# Jul 15th, 2007 |
| Replies: 0 Views: 642 SharpOS Hi,
What do you think of this OS ?
http://sharpos.sourceforge.net |
Forum: Python Jul 13th, 2007 |
| Replies: 6 Views: 3,913 |
Forum: Python Jul 12th, 2007 |
| Replies: 6 Views: 3,913 |
Forum: Python Jul 8th, 2007 |
| Replies: 16 Views: 9,197 |
Forum: Python Jun 28th, 2007 |
| Replies: 5 Views: 1,814 Re: Python noob needs random help I'll give you a hint
1- Count the letters of the input string
2- populate an array of integers with random numbers in range(0, count)
3- Happy ending (Avril lavigne) :) |
Forum: PHP Jun 25th, 2007 |
| Replies: 4 Views: 2,218 |
Forum: C# Jun 24th, 2007 |
| Replies: 4 Views: 733 |
Forum: VB.NET Jun 24th, 2007 |
| Replies: 5 Views: 1,055 |
Forum: VB.NET Jun 24th, 2007 |
| Replies: 4 Views: 1,527 Re: interger Well, parsing from double to integer may cause a loss on the data (OverflowException).
Assume we have a button on the form called btnDisplay
and TextBox called txtBox1 .
Private Sub... |
Forum: Python Jun 15th, 2007 |
| Replies: 7 Views: 1,146 |
Forum: C# Jun 14th, 2007 |
| Replies: 2 Views: 4,176 |