Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #3K
~40.0K People Reached

14 Posted Topics

Member Avatar for a1eio

Is there any way (non platform-depended) to close the tray using python 3. I couldn't find any function in the api of pygame.cdrom module. The best result so far is for Windows. [url]http://code.activestate.com/recipes/180919/[/url]

Member Avatar for Mahmoud_16
0
5K
Member Avatar for fallopiano

Have a look at: [url]http://docs.python.org/library/os.path.html[/url] You probably need some of the following: os.getcwd() os.path.join() os.path.listdir() os.path.isdir() os.path.isfile() Try to use these functions and not the literal path. This way, your program will be cross-platform and you will avoid such errors about / and \

Member Avatar for fallopiano
0
225
Member Avatar for myle

Hi! I would like to build a minimalistic program which finds the tokens from a text. Its output should ideally be identical to the result of: [CODE]gposttl input_file | awk '{print $1}'[/CODE] which are just the tokens. An example: [CODE]That's a word and this is a number 123.456. I would …

0
83
Member Avatar for princessotes

[QUOTE=princessotes;1015567]Hi, I have a list of positive digits in a file. All I want to do is to add the negative sign (-) to each digit. Is there a code for this. eg list of digits 1 correspond -1 2 correspond-2 3 correspond -3 etc[/QUOTE] What about trying something similar …

Member Avatar for vegaseat
0
28K
Member Avatar for myle

The meaning of parallel is not that of parallel processing. I simply mean that if algorithms A and B are represented by the two sequence of operations (a_1, a_2, ...) and (b_1, b_2, ...), then the executed sequence of operations is (a_1, b_1, a_2, b_2, ...). It is not compulsory …

Member Avatar for myle
0
199
Member Avatar for SoulMazer

[QUOTE=SoulMazer;978554]Hi, I have written a simple chat server and a client that can connect to it. To make it more secure, I would like to add SSL to the connection process. How would I go about doing this? Thanks in advance.[/QUOTE] [url]http://www.heikkitoivonen.net/blog/2008/10/14/ssl-in-python-26/[/url] [url]http://docs.python.org/dev/library/ssl.html[/url]

Member Avatar for SoulMazer
0
165
Member Avatar for jcmeyer

[QUOTE=jcmeyer;966832]I want to copy a file to the clipboard. So if the user of my program goes into a directory or want to send the file attached in an email, they can just paste the file into the directory or email. I understand how to copy the file to another …

Member Avatar for jcmeyer
0
3K
Member Avatar for kaustubh00

In python 3: [CODE=python]import os import shutil with open('../l.list') as f: for line in f: line = line.strip() print(line) os.mkdir(line) shutil.copy('../' + line, line + '/' + line + '.txt') [/CODE] It is pretty much the same as your shell script. @Gribouillis: Nice library.

Member Avatar for myle
0
200
Member Avatar for TheNNS

I didn't find in the options Debian. I think it's one of the most stable distributions, having the greatest variety of packages.

Member Avatar for krnekhelesh
0
838
Member Avatar for jam7cacci

Probably, the most efficient and easy way is to use std::sort. An example is here: [url]http://msdn.microsoft.com/en-us/library/ecdecxh1(VS.80).aspx[/url] My best guess is that, for the time being, useless information follows: There is a very short (but recursive version) of quicksort if you are interested in, or you are completely indifferent about the …

Member Avatar for jam7cacci
0
192
Member Avatar for sommanatt

Is there a OS independent way of getting these statistics? AFAIK, LEDA can do it, but I need a non proprietary solution.

Member Avatar for myle
0
3K
Member Avatar for kartik14
Member Avatar for myle
0
277
Member Avatar for madankumar

It helps if you have already upload your public ssh-rsa key to the remote machine. Then you don't have to enter the password each time the scp is executed.

Member Avatar for madankumar
-1
99
Member Avatar for myle

I have just begun to learn python, so my question is probably silly. Just for practice I want to write a function which calculates the first n primes. prime computes some prime numbers and keeps them in a list. Then tries another number and if it's not even divisible by …

Member Avatar for myle
0
153

The End.