import question on wx ?

2006-07-27 Thread diffuser78
I have installed wx and everything looks fine. I have written a small app that uses wx. When I run my program from the console like ubuntu $ python PROGRAM_NAME.py it gives error Traceback (most recent call last): File "Project.py", line 6, in ? import wx ImportError: No module named wx B

Re: import question on wx ?

2006-07-27 Thread diffuser78
I think what you say makes perfect sense I am using 2.4.2 python (I typed pthon -V on console to get) How can I find what my SPE editor is using ? John Salerno wrote: > [EMAIL PROTECTED] wrote: > > I have installed wx and everything looks fine. I have written a small > > app that uses wx. > >

Re: import question on wx ?

2006-07-27 Thread diffuser78
That right..on my console it shows python 2.4.2 and on SPE it shows 2.4.3. The wxPython is working fine in SPE i.e with Python 2.4.3. How can I make sure that when I type python on console I get the 2.4.3 ? Every help is greatly appreciated. Thanks John Salerno wrote: > [EMAIL PROTECTED] wrote

Python Path

2006-07-27 Thread diffuser78
I have two python 2.4s on my Ubuntu Linux box. One is Python 2.4.2 and other is Python 2.4.3. I use SPE as an IDE for coding. I have written a small app in wxPython. If I run it from SPE it just works fine, but if I run it from console it gives me import wx eror. Following is the log which you mi

Re: Python Path

2006-07-27 Thread diffuser78
In my .basrc file I commented the line of ActivePyton and after reboot everything is fine now. I can use Python 2.4.3 even on console and SPE both. thanks [EMAIL PROTECTED] wrote: > I have two python 2.4s on my Ubuntu Linux box. One is Python 2.4.2 and > other is Python 2.4.3. I use SPE as an

Client/Server Question

2006-07-28 Thread diffuser78
My server.py looks like this -CODE-- #!/usr/bin/env python import socket import sys import os s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '' port = 2000 s.bind((host,port)) s.listen(1) conn, addr = s.acc

Re: Client/Server Question

2006-07-28 Thread diffuser78
Is os.system() going to be deprecated in future ?.I read somewhere. Dennis Benzinger wrote: > [EMAIL PROTECTED] wrote: > > My server.py looks like this > > > > -CODE-- > > #!/usr/bin/env python > > import socket > > im

Math package

2006-07-29 Thread diffuser78
I want to write a program which would have a 2 dimensional array of 1 billion by 1 billion. This is for computational purposes and evaluating a mathematical concept similar to Erdos number. Which is the best package for such programs (that would be fast enough). Every help is appreciated. Thank

Re: Math package

2006-07-29 Thread diffuser78
I will write the problem a little more clearer so that you guys can recommend me better. In a graphs of size N ( where, N = 1e9), each node has a degree D=1000. i.e There are overall (D*N)/2 edges in the graph. This graph needs to be generated randomly using the program. Now my task is to find th

Re: Windows vs. Linux

2006-07-31 Thread diffuser78
Linux can let you do more in Python and this comes from my personal exprience. Ubuntu Dapper should let you install drivers easily for wireless...a little bit tweaking might be required but its worth the effort. Python and Ubuntu rock...go fot it. [EMAIL PROTECTED] wrote: > Okay, once-upon-a-time

Re: Windows vs. Linux

2006-07-31 Thread diffuser78
> I'd never recommend dual-boot for anything! > Hardware is cheap, time and trouble is expensive. Dual-booting if so easy and helpful, I have always found it to be extremely useful. You might have a bad experience but I have my laptop and desktop both running dual boot successfully for 4 and a ha

Network Game in Python

2006-08-01 Thread diffuser78
I have to create a small and simple GUI app in Python which is similar to a netwrok game. Let me expalain you. I need some suggestions. I might use wxPython for GUI because that is the only GUI oolkit I know. There are 6 players in the game. They are all connected though a LAN (possible an interna

paramter passing question

2006-08-04 Thread diffuser78
I wrote a small app in wxPython using wxGlade as designer tool. wxGlade brings and writes a lot of code by itself and thats where my confusion started. Its about parameter passing. Here is my little confusion. ***CODE BEGINS class MyFrame1(wx.Frame):

Re: paramter passing question

2006-08-09 Thread diffuser78
It partly works but I get error printed out on the console. Traceback (most recent call last): File "NewProject.py", line 87, in OnEdit win = MyFrame4(self, -1, "",sim_name=sim_name) File "NewProject.py", line 1098, in __init__ wx.Frame.__init__(self, *args, **kwds) File "/usr/lib/py

Re: Client/Server Question

2006-08-10 Thread diffuser78
The subprocess module didn't work here. I tried using os.popen(), that won't help it either. What I am trying to achieve is that the server daemon is sitting and listening to command from the client. As client send "MaxSim" it launches MaxSim.exe and then again waits for subsequent commands. Supp

Re: Client/Server Question

2006-08-10 Thread diffuser78
> The recv() might return "MaxiSimDriving Sim". It could return > "MaxiS" on one call, and "im" on the next. If the remote side > closes the connection, recv() will keep returning the empty > string, and your program will be stuck in an infinite loop. How to overcome this problem ? > Did you und

Re: Client/Server Question

2006-08-10 Thread diffuser78
I apologize. subprocess did work for me like a charm I made a mistake in my code. Appreciate your help. Dennis Benzinger wrote: > os.system() blocks until the called program has finished. Use the > subprocess module : > > > > import subprocess >

How to write a Installer for a Python App in Linux

2006-08-10 Thread diffuser78
Hi, I have known python for about 3-4 months now. My knowledge is still very limited. I wrote a small app using wxPython. Now, I want to create an installer for it (on Linux platform.) for the people I developed this small utility. These people use some customized variant of Red Hat Linux. I fou

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread diffuser78
I saw some examples and understood for most part how to write a setpu.py. Since I want to bundle python and wxPython along with my application...how can I do that. Any code gurus can throw some pointers. Every help is appreciated. Bruno Desthuilliers wrote: > Look for distutil and EasyInstall

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread diffuser78
Hi, How can we freeze the python program and how will it ensure that all the python files are packages with the programs (including python and wxPython). Can anybody give me some pointers on this. Every help is appreciated. Thanks. > You could freeze the Python program. That'll ensure all the re

Including python and wxPython in distutils

2006-08-11 Thread diffuser78
I wrote a small app in python and used wxPython in it. Now, I am trying to create an .rpm file for linux RedHat Distro. I want the ability in my installer to install python2.4 and wxPython too along with the .py files which are in the project. I am trying to use distutils. Can anybody give some po

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread diffuser78
Has anybody written a file for cx_freeze. I am running Ubuntu Linux and downloaded version for Python2.4. When I run it I get an error saying that I dont have GLIBC_2.4. I couldnt find this in Synaptic too. Any clues ? -- http://mail.python.org/mailman/listinfo/python-list

Help with cx_freeze module

2006-08-11 Thread diffuser78
Has anybody written a file for cx_freeze. I am running Ubuntu Linux and downloaded version for Python2.4. When I run it I get an error saying that I dont have GLIBC_2.4. I searched around but couldn't find a .deb for Ubuntu, I couldnt find this in Synaptic too. Any clues or pointers as to how to g

Graph Theory

2006-10-05 Thread diffuser78
Is there any library in Python which has implementation of graph theoretic algorithms and models ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Graph Theory

2006-10-05 Thread diffuser78
Thanks for your quick reply. Since I have not read the documentation, I was wondering if you can generate random graph and analyze some peroperties of it like clustering coefficient or graph density. I am a graph theory student and want to use python for development. Somebody told me that Python ha

Re: Graph Theory

2006-10-06 Thread diffuser78
Thanks for all your responses. -- http://mail.python.org/mailman/listinfo/python-list

Re: Graph Theory

2006-10-06 Thread diffuser78
Is there any documentation avaialbe for networkx ? I want to have an implementation of random graphs including watts and strogatz graph. [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > Thanks for your quick reply. Since I have not read the documentation, I > > was wondering if you can gene

shortest mean path length

2006-10-06 Thread diffuser78
Is there any function in networkx which can compute the shortest mean path length. (Shortest length between all pairs of the nodes in the graph). Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Customized Boot Manager in Python

2006-06-13 Thread diffuser78
I have to create a small visual interface program called as Boot Manager which is customized accoring to the needs. I have around 8 pc's and 2 linux boxes. One Linux box is always on and all other are closed in sleep state. I have to perform the following things: 1. Boot up all of them. I used W

GUI in Python using wxGlade

2006-06-15 Thread diffuser78
I recently tried a hand at wxGlade and was happy to see it designs a GUI for you in minutes. I am a newbie Python coder. I am not completely aware of GUI programming. I can easily make menubars etc but I am not too sure sure how to get more windows poppping to get more information. I mean when you

Re: GUI in Python using wxGlade

2006-06-15 Thread diffuser78
I am pasting my code. I created a small little GUI without any functionality as of yet. I wanted to ask few questions on that. [code] #!/usr/bin/env python # -*- coding: UTF-8 -*- # generated by wxGlade 0.4cvs on Thu Jun 15 10:51:12 2006 import wx class MyFrame(wx.Frame): def __init__(self,

Re: GUI in Python using wxGlade

2006-06-15 Thread diffuser78
I am a newbie. I was looking for some code where I could a list of different items from a file and display it in a list box. Then give a user the capability to select some. Basically, reading and writing to a file and displaying them in different widgets...thats something I am looking for. If anyb

Re: GUI in Python using wxGlade

2006-06-16 Thread diffuser78
Did you paste any code ? Also the link for the next message is not working . John Salerno wrote: > [EMAIL PROTECTED] wrote: > > I am a newbie. I was looking for some code where I could a list of > > different items from a file and display it in a list box. Then give a > > user the capability

wxPython question

2006-06-16 Thread diffuser78
I tried to follow wxPython Demo examples to understand it better. I used wxGlade to generate my code from the GUI builder. When I try to see the code for Menu and Menubar I see a little mismatch in the way functions are being used. For example, wxGlade produces code like this self.Action = wx.Me

wxPython GUI designer

2006-06-18 Thread diffuser78
I am newbie learning wxPython. I tried using GUI designer called wxGlade. When it generated code I couldnt get the same level of flexibility as writing the code by oneself. Any view on what you think about using GUI designer tools. Every help is appreciated. -- http://mail.python.org/mailman/li

Re: wxPython GUI designer

2006-06-18 Thread diffuser78
Are there any good commercial project built with wx ? I am a newbie and a have to write a small application in Python. I was wondering which optin would be best for me in terms of least learning curve and getting the final product ASAP. Thanks DH wrote: > In my opinion none of the wx* or gtk* re

OS specific command in Python

2006-06-19 Thread diffuser78
I want to write a python program and call OS specific commands in it. So basically, instead of typing in on the command line argument I want to have it in a python program and let it do the action. for example. in my program I would want to call the ssh feature like one does on the command line s

Re: OS specific command in Python

2006-06-20 Thread diffuser78
When you connect (via ssh or telnet) to a remote machine, you need to > type (manually) > your username and your password. Programming that is never easy. I have setup the public keys to AUTO LOGIN so that it doesn't ask the password. -- http://mail.python.org/mailman/listinfo/python-list

Re: OS specific command in Python

2006-06-20 Thread diffuser78
I tried the following and it seemed to work import os os.system('') Any comments -- http://mail.python.org/mailman/listinfo/python-list

Re: OS specific command in Python

2006-06-21 Thread diffuser78
I have a question on getpass. Since I am a newbie you might find it a little dumb. By using the getpass, are u trying to retrieve the username and password of remote mahcine or local ? Avell Diroll wrote: > [EMAIL PROTECTED] wrote: > > When you connect (via ssh or telnet) to a remote machine, y

Re: OS specific command in Python

2006-06-21 Thread diffuser78
Hi Avell, I want to communicate using subprocess module but my task is a little different. May be you can guide me. I have a linux box, from where I remotely execute all the commands. The remote machine is windows machine. I installed an OpenSSH server for windows to send the shutdown command. I

Remote Boot Manager Scripting (Python)

2006-06-21 Thread diffuser78
I just started to write a small project in Python. I was wondering if there can be something like remote boot manager. I have to remotely start a computer. It has dual boot (WinXP and Linux). My remote computer is Linux which will send command to remotely boot the other computer. Can we write pyt

Network Programming in Python

2006-06-22 Thread diffuser78
I am a newbie in python. I want to learn and implement a small networking concept. Please help me. Every help is appreciated. I have one Linux Box and one Windows PC. I want to have a daemon running on Windows PC which listens on some specicif port number. I want to send a TCP/IP or UDP/IP packet

Re: Network Programming in Python

2006-06-22 Thread diffuser78
Thanks...I will read that up...could you give me some more headstart or if you any sample code which I can study. Thanks for your help, every help is appreciated Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > I am a newbie in python. I want to learn and implement a small > > networking co

Re: Network Programming in Python

2006-06-22 Thread diffuser78
I have Python 2.4.2 on windows and Linux both. I got an import error. how can we obtain the twisted libraries ? When I try to run your code Jean-Paul Calderone wrote: > On 22 Jun 2006 12:02:14 -0700, [EMAIL PROTECTED] wrote: > >I am a newbie in python. I want to learn and implement a small > >ne

Re: Network Programming in Python

2006-06-22 Thread diffuser78
I got it ...initially sourceforge page linked all old libraries..later then got this link to twistedmatrix. Thanks. Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > I have Python 2.4.2 on windows and Linux both. I got an import error. > > how can we obtain the twisted libraries ? > > I

Re: Network Programming in Python

2006-06-22 Thread diffuser78
I just realized that you are the author of Pyro. Will it be of any help to me ?? Irmen de Jong wrote: > [EMAIL PROTECTED] wrote: > > > > Really, was that so hard? > > > > Python makes sockets a total breeze. You can write an 80's style HTTP > > server in less than a page of code. > > But making a

Re: Network Programming in Python

2006-06-23 Thread diffuser78
How will Pyon help my cause ? Bill Maxwell wrote: > On 22 Jun 2006 12:02:14 -0700, [EMAIL PROTECTED] wrote: > > >I am a newbie in python. I want to learn and implement a small > >networking concept. Please help me. Every help is appreciated. > > > >I have one Linux Box and one Windows PC. I want t

Re: Python taught in schools?

2006-06-25 Thread diffuser78
I think there is a Python club at UCF, Orlandomight help you indirectly. MilkmanDan wrote: > I'll be a college freshman this fall, attending Florida Institute of > Tech studying electrical engineering. > > I was considering taking some classes in programming and computer > science, and I happe

Re: Python taught in schools?

2006-06-25 Thread diffuser78
I replied to a wrong post. My bad.I know for sure that there is some kinda Python Club at UCF Orlando. There is Prof called Michael Johnson who teaches Physics gives you an intro to Python. http://www.physics.ucf.edu/~mdj/MinimalPython.html Good Luck -- http://mail.python.org/mailman/listin

file writing question

2006-06-27 Thread diffuser78
Hi, I am a newbie so not very confident in file handling. I want to write to a file atrributes in this fashion #NameOfComputer:MAC_Address:IP_Address --computer_details.txt begins- IG1:8f00142a123c:192.168.2.101 IG2:8f00142a124d:192.168.2.102 IG3:8f0014

Re: file writing question

2006-06-27 Thread diffuser78
Thanks BrunoThis helps me. Bruno Desthuilliers wrote: > [EMAIL PROTECTED] wrote: > > Hi, I am a newbie so not very confident in file handling. > > > > I want to write to a file atrributes in this fashion > > #NameOfComputer:MAC_Address:IP_Address > > > > --computer_details.txt > > begins--

String Question

2006-06-28 Thread diffuser78
mac_string = '001485e55503' (This is the mac address of a computer.) I am using wake on LAN python script to start computer remote.It uses format like this s.sendto('\xff'*6 + '\x00\x014\x85\xe5\x55\x03'*16, ('192.168.1.255', 80)) where '\x00\x14\x85\xe5\x55\x03' is the MAC address to be u

Re: String Question

2006-06-28 Thread diffuser78
Many Thanks!! It worked like a charm. Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > mac_string = '001485e55503' (This is the mac address of a computer.) > > > > I am using wake on LAN python script to start computer remote.It uses > > format like this > > > > s.sendto('\xff'*6 + '\x0

Re: String Question

2006-06-28 Thread diffuser78
I will try this one too...thanks for your response. Iain King wrote: > [EMAIL PROTECTED] wrote: > > mac_string = '001485e55503' (This is the mac address of a computer.) > > > > I am using wake on LAN python script to start computer remote.It uses > > format like this > > > > s.sendto('\xff'*6

Re: efficiency question

2006-06-30 Thread diffuser78
So nice to know this that you can compare your own code using this methodology. I was completely unaware of this. Thank you so much. Fredrik Lundh wrote: > David Harvey wrote: > > > Suppose I write > > > > if x in ("abc", "def", "xyz"): > > doStuff() > > > > elif x in ("pqr", "tuv", "123"): > >

Re: Py2exe make wxPython window looks bad

2006-06-30 Thread diffuser78
My question is not exactly related. In windows you create exe using py2exe. What is the Linux equivalent of it ? I am assuming you just make your .py file executable by doint this. Please correct me if I am wrong. *** chmoad a+c file_name.py

Re: efficiency question

2006-06-30 Thread diffuser78
can you please explain how to read these output...I mean how to understand them. A quick glance tells you that the latter approach has less number of instructions and thats why its better. Any more insight would help a lot. MTD wrote: > For the sake of comparison: > > >>> def cod(x): > ... tuppl

Re: efficiency question

2006-07-01 Thread diffuser78
Thanks for this thing. http://www.python.org/doc/current/lib/module-dis.html made it more clear. Fredrik Lundh wrote: > David Harvey wrote: > > > Suppose I write > > > > if x in ("abc", "def", "xyz"): > > doStuff() > > > > elif x in ("pqr", "tuv", "123"): > > doOtherStuff() > > > > elif ... >

Client Server Connection Program

2006-07-04 Thread diffuser78
Hi, I have the following code for a cline and server which I got from a small tutorial on the web. #!/ usr/bin/env python # tms.py (SERVER) import socket import sys s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '' port = int(sys.argv[1]) s.bind((host,port)) s.listen(1) conn, add

Re: Client Server Connection Program

2006-07-04 Thread diffuser78
removing int frrom host = int(sys.argv[1]) fixed the problem. Thanks Fred!!! Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > #/ usr/bin/env python > > # filename: tmc.py (CLIENT) > > > > import socket > > import sys > > > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > > > > host

wxPython and Linux dependencies

2006-07-06 Thread diffuser78
Hi, I wrote a small app using wxPython on a Linux distro called Ubuntu (it is a debain derivative). I ran it on windows and it just worked perfectly. Now, when I am trying to install the same app on a different Linux Distro (Red Hat Linux) I cannot get it to work. This Red Hat variant is a customi

Re: wxPython and Linux dependencies

2006-07-06 Thread diffuser78
Error message "cannot find wx" infact I have wxpython in /usr/lib/ I installed it using the rpms given on the wxPython website. Do I need to set some path or something. Nick Vatamaniuc wrote: > "cannot get it to work." is pretty broad, you are more likely to get > help if you post an error messa

Re: wxPython and Linux dependencies

2006-07-06 Thread diffuser78
How can we find that it is not using the right version of Python ? John Salerno wrote: > [EMAIL PROTECTED] wrote: > > Error message "cannot find wx" > > > > infact I have wxpython in /usr/lib/ > > > > I installed it using the rpms given on the wxPython website. Do I need > > to set some path or so

Re: wxPython and Linux dependencies

2006-07-07 Thread diffuser78
Let me explain and give you some more details. When I type "python" at the command prompt it shows the following info. python 2.3.4 (#Feb 01 2005), GCC 3.4.3 20041212 Red Hat 3.4.3-9.EL4 on linux2 In /usr/lib/ there are two directories called python 2.3 and python 2.4 In /usr/lib/python2.3/sit

matplotlib

2006-09-14 Thread diffuser78
Hi, I am a python newbie. I was looking for a plotting tool and somebody told me matplotlib. But I couldnt find on google some good starting tutorial on it. Can somebody give some quick pointers to start off with matplotlib. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: matplotlib

2006-09-14 Thread diffuser78
This site and webpage in particular doesn't open. I tried that too before posting my question. Maciej Dziardziel wrote: > [EMAIL PROTECTED] wrote: > > > Can somebody give some quick pointers to start off with matplotlib. > > > > Thanks > > http://matplotlib.sourceforge.net/tutorial.html > > -- > M

Is python very slow compared to C

2006-02-11 Thread diffuser78
I have just started to learn python. Some said that its slow. Can somebody pin point the issue. Thans -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python very slow compared to C

2006-02-12 Thread diffuser78
Thnaks everybody for their comments. I am an average programmer in C and wanted to make a hop to python and was just trying to clear my mind with the confusions. Bit I guess I will go ahead and spend some time with python and do my next project in python. thanks for the feedback -- http://mail.

Poisson Distribution (for a newbie)

2006-02-15 Thread diffuser78
I am simulating an event where users come into the pool randomly starting at time T=0, i.e. For Example, 2 users came at T= 0 into the the pool, 3 users came at T= 1 into the the pool, 5 users came at T=2 ,..,54 users came at T=45 etc. As cumulative number of users goes above 1024, we stop

Python Indentation Problems

2006-02-26 Thread diffuser78
I am a newbie to Python. I am mainly using Eric as the IDE for coding. Also, using VIM and gedit sometimes. I had this wierd problem of indentation. My code was 100% right but it wont run because indentation was not right. I checked time and again but still no success. I rewrote the code over agai

Wake on LAN and Shutdown for Windows and Linux

2006-05-02 Thread diffuser78
I am using 8 computers on a small network. I have one Main computer which should be able to remotely start other computers. I used Wake on LAN to start them all. My Main computer is Linux. Other 4 are Windows and 3 are Linux. How can I shutdown Windows box from my Main (Linux) ? Also, How can I

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-02 Thread diffuser78
Thanks, In fact I checked that. I thought that any other literature would help. David Murmann wrote: > [EMAIL PROTECTED] schrieb: > > How can I shutdown Windows box from my Main (Linux) ? > > Have you seen this? > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/360649 > > it probably w

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-02 Thread diffuser78
because you can write scripts in python so easily as compared to other scripting languages. -- http://mail.python.org/mailman/listinfo/python-list

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-04 Thread diffuser78
Any help is appreciated -- http://mail.python.org/mailman/listinfo/python-list

cross platform libraries

2006-05-04 Thread diffuser78
I am using python on a linux terminal. I want to shutdown a remote windows box. I found a script which does something like this. My question is can we use windows libraries in linux as follows import win32api import win32con import win32netcon import win32security import win32wnet def shutd

Re: cross platform libraries

2006-05-05 Thread diffuser78
Hi Ravi, Do you have any idea how to perform such triigers ? Every help is appreciated. Ravi Teja wrote: > No! That's not the way things work. Such code needs to run locally (in > this case, Windows). You can run this program as a daemon on Windows > with some nice simple remote interface (Eg: x

Re: cross platform libraries

2006-05-05 Thread diffuser78
I went to this webpage http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/360649 Isn't it supposed to run on the network and close the connected machine. Every help is appreciate, Dennis Lee Bieber wrote: > On 4 May 2006 09:57:15 -0700, [EMAIL PROTECTED] declaimed the > following in comp.

Re: cross platform libraries

2006-05-05 Thread diffuser78
Can we have some program in Linux which shuts down the windows computer remotely. Every help is appreciated. Max Erickson wrote: > [EMAIL PROTECTED] wrote in > news:[EMAIL PROTECTED]: > > > I went to this webpage > > > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/360649 > > > > Isn'

Memory leak in Python

2006-05-08 Thread diffuser78
I have a python code which is running on a huge data set. After starting the program the computer becomes unstable and gets very diffucult to even open konsole to kill that process. What I am assuming is that I am running out of memory. What should I do to make sure that my code runs fine without

Re: Memory leak in Python

2006-05-08 Thread diffuser78
Its kinda 65o lines of code...not the best idea to paste the code. [EMAIL PROTECTED] wrote: > Can you paste an example of the code you're using? -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-09 Thread diffuser78
I am using Ubuntu Linux. My program is a simulation program with four classes and it mimics bit torrent file sharing systems on 2000 nodes. Now, each node has lot of attributes and my program kinds of tries to keep tab of everything. As I mentioned its a simulation program, it starts at time T=0 a

Re: Memory leak in Python

2006-05-09 Thread diffuser78
The amount of data I read in is actually small. If you see my algorithm above it deals with 2000 nodes and each node has ot of attributes. When I close the program my computer becomes stable and performs as usual. I check the performance in Performance monitor and using "top" and the total memory

Re: Memory leak in Python

2006-05-10 Thread diffuser78
Sure, are there any available simulators...since i am modifying some stuff i thought of creating one of my own. But if you know some exisiting simlators , those can be of great help to me. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-10 Thread diffuser78
With 1024 nodes it runs fine...but takes around4 hours to run on AMD 3100. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-10 Thread diffuser78
I ran simulation for 128 nodes and used the following oo = gc.get_objects() print len(oo) on every time step the number of objects are increasing. For 128 nodes I had 1058177 objects. I think I need to revisit the code and remove the referencesbut how to do that. I am still a newbie coder an

listener program in Python

2006-05-12 Thread diffuser78
I want to write a simple clinet/server program that does the following. On Windows, the program listens to the request from linux box On Linux Box, client program send server a shutdown request and the program at server i.e windows shuts windows sown, I basically want to remotely shut down windo

Python script for remotely shutting down Windows PC from Linux ?

2006-05-16 Thread diffuser78
I am a newbie in Python and want your help in writing python script. I have to remotely shut the windows px from linux box. I run OpenSSH on windows PC. I remotely connect it from Linux box using ssh [EMAIL PROTECTED]# connects me fine now without problems (LOCAL) Next, I wrote a sc

Re: Python script for remotely shutting down Windows PC from Linux ?

2006-05-16 Thread diffuser78
> ssh [EMAIL PROTECTED] shutdown -s Than indeed workedThanks > use the subprocess module or shellutils to execute the above. I am a python newbie and how easy or difficult it is using the sub process module and shell utils. Thanks, I really appreciate your help. -- http://mail.python.or

python debugging question

2006-03-08 Thread diffuser78
I am a python newbie. I have writen some 500 lines of code. There are 4 classes and in all 5 files. Now, I am trying to run the program. I am getting wrong values for the simulation results. Is there any debugging facilities in python which would let me go step by step and check the values of the

Python and C

2006-03-10 Thread diffuser78
I was a C Programmer for a while. Lately started to learn Python for one small project at school. I joined a small company where they use C++ for development. Can we use Python and C together ? I mean create some classes in Python and some number crunching algorithms coded in C (for speed) and int

python question about classes

2006-03-13 Thread diffuser78
I have following two classes Code: ## file_A.py class A(object): ## a contains is instances of A a= [ ] def __init__(self, node): self.nodes_in_A = [] self.nodes_in_A.append(node) packet_queue = [ ] ...etc ## file_B.py import A class B(object): ## n contains instances of B

GUI in python

2006-03-29 Thread diffuser78
Hi, I am a python newbie and have used it for about a month. I want to make a simple GUI app in Python ( I take input form user and do processing and show results). Which gui package is good for me. I need to do it quick and I would not want a long learning curve. I was taking look at wxPython,

how to comment lot of lines in python

2006-03-30 Thread diffuser78
Like in C we comment like /* Bunch of lines of code */ Should we use docstring """ """ Or there is something else too ?? Every help is appreciated. Thanks -- http://mail.python.org/mailman/listinfo/python-list

specialized GUI

2006-04-04 Thread diffuser78
I am new to python. I got a new project where I have to create a GUI and attch my code to it. The GUI should look like vsTASKER www.virtualsim.com I mean GUI lets user create diagram, and my code should read that diagram and run the algorithm. Do you know any other tool like this where I can

how to convert string

2006-04-05 Thread diffuser78
I want to print number 0 to 9 in one line like this 0 1 2 3 4 5 6 7 8 9 if I do like this, it prints in different lines for i in xrange(10): print i so i tried like this str = "" for i in xrange(10): str = i + " " print str but i want to know how convert int i to string. Every help is

GUI issues in Python

2006-04-06 Thread diffuser78
Hi, I want to create a GUI where a user can select drag and drop kind of boxes, circles and make connections between them. This is basically for depicting states and dependencies. I am writing a program where I let the user input states and dependencies in a certain domain. Based on input given b

Re: GUI issues in Python

2006-04-06 Thread diffuser78
My question basically revolves around... that I dont want to draw circles and boxes for drawing purposes. I want the end user to be able to draw the GUI boxes and circles and makes connection to depict states and dependencies. So its a little unconventional and more like a SIMULATION TOOL. I am p

Re: GUI issues in Python

2006-04-06 Thread diffuser78
Thanks Daniel, I really think that this should be the solution to my problem. A quick Question...is wxPython Operating System dependent or it can be used with anu OS like Linux, Windows and Mac ? -- http://mail.python.org/mailman/listinfo/python-list

wxPython Question

2006-04-07 Thread diffuser78
I am learning wxPython for one of my projects. I was wondering if there is drag and drop in any Python IDE like there is Visual Basic where you select an object like command_button and put onto the frame. Is there any help to make life easier in Python. Every help is greatly appreciated, -- ht

  1   2   >