User Profile

Collapse

Profile Sidebar

Collapse
plomon
plomon
Last Activity: Jul 3 '13, 04:14 AM
Joined: Mar 22 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How to define metaclass for a class that extends from sqlalchemy declarative base

    I use: Python 2.6 and sqlalchemy 0.6.1

    This is what I am trying to do:

    Code:
    from sqlalchemy.types import (
    	    Integer,
    	    String,
    	    Boolean
    	)
    	from sqlalchemy.ext.declarative import declarative_base
    
        Base = declarative_base()
    
    	class SampleMeta(type):
            def __new__(cls, name, bases, attrs):
                attrs.update({   'id': Column('Id',
    ...
    See more | Go to post

  • Item Checking not possible with UltimateListCtrl in ULC_VIRTUAL mode

    Following is the system and software info

    Platforms: Windows XP and OSX Lion
    Activestate Python 2.7.2
    wxPython2.9-osx-cocoa-py2.7 (for OSX)
    wxPython2.9-win32-py27 (for Windows XP)


    I am trying to create a UltimateListCtr l using ULC_VIRTUAL and ULC_REPORT mode. I would like to know how can I put a checkbox beside the first column of every row and catch the event when a user checks the box. I was able...
    See more | Go to post

  • plomon
    started a topic Sort items in UltimateListCtrl

    Sort items in UltimateListCtrl

    I want to create an ultimate list ctrl based table where the user can sort the columns by clicking on the column header. Here's the code I attempted:

    Code:
    import wx
    import wx.lib.mixins.listctrl as listmix
    from wx.lib.agw import ultimatelistctrl as ULC
    
    APPNAME='Sortable Ultimate List Ctrl'
    APPVERSION='1.0'
    MAIN_WIDTH=300
    MAIN_HEIGHT=300
     
    musicdata = {
    0 : ("Bad
    ...
    See more | Go to post

  • plomon
    started a topic Button Label change on EVT_BUTTON in wxpython!!!

    Button Label change on EVT_BUTTON in wxpython!!!

    Some system info before proceeding further:

    Platform: Mac OS X 10.7.1
    Python Version: ActiveState Python 2.7.1
    wxPython Version: wxPython2.9-osx-cocoa-py2.7

    I want the button label to be changed while performing a task

    So, here is what I did/want:

    Code:
    self.run_button=wx.Button(self.panel,ID_RUN_BUTTON,label='Install')
    self.Bind(wx.EVT_BUTTON, self.OnRun,id=ID_RUN_BUTTON)
    ...
    See more | Go to post

  • Sounds like a tough one to do.
    See more | Go to post

    Leave a comment:


  • Calling a matlab gui from python using pymatlab without allowing python to close it

    Before proceeding further, my system configuration is as follows:
    Mac OS X 10.6.6
    MATLAB 2010b
    ActiveState Python 2.7

    I have a gui built using matlab. I wrote the following python script
    to open that matlab gui using pymatlab python module:

    Code:
    from pymatlab.matlab import MatlabSession 
    session = MatlabSession() 
    session.run('cd ~/ratter/ExperPort') 
    session.run('addpath(genpath(pwd))')
    ...
    See more | Go to post

  • plomon
    started a topic wxMessageBox with an auto-close timer in wxPython

    wxMessageBox with an auto-close timer in wxPython

    Platform and Python installation info:

    Platforms: Windows, OS X
    Python: Active State Python 2.7
    wxPython: Version 2.9


    Here is a sample code in which I use a wxMessageBox:

    Code:
    import wx,os
    
    class Frame(wx.Frame):
        def __init__(self, parent, id, title):
            wx.Frame.__init__(self, parent, id, title, size=(100, 100),style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION
    ...
    See more | Go to post

  • Reorder dictionary in pyrhon according to a list of values!!!

    Let us consider a dictionary:
    Code:
    sample_dict={1:'r099',2:'g444',3:'t555',4:'f444',5:'h666'}
    I want to re-order this dictionary in an order specified by a list containing the order of the dictionary keys that I desire. Let us say the desired order list is:
    Code:
    desired_order_list=[5,2,4,3,1]
    So, I want my dictionary to appear like this:
    Code:
    {5:'h666',2:'g444',4:'f444',3:'t555',1:'r099'}
    How do...
    See more | Go to post

  • plomon
    started a topic How to uninstall wxpython 2.8 from Mac OSX 10.6

    How to uninstall wxpython 2.8 from Mac OSX 10.6

    Some details of my machine and installed packages before proceeding further:

    Mac OSX version: 10.6.6
    Python version: Activestate Python 2.7.1
    wxpython version: wxpython 2.8 (uses Carbon API hence limited to 32-bit mode arch only)


    I installed wxPython2.8-osx-unicode-py2.7 from wxpython website using their .dmg installer file. This package uses the Carbon API and hence is limited to 32-bit mode...
    See more | Go to post

  • its working fine in linux....but not working on visual studio 2005. here's the code and the error:

    #include "stdafx.h"
    #include <windows.h>
    #include <sys/stat.h>
    void main()
    {
    FILE *fp;
    mkdir("c:/sample", 0777);
    fp=fopen("c:/sample/sample.txt", "w+");
    fprintf(fp, "Hello World !!!");
    }

    error...
    See more | Go to post

    Leave a comment:


  • can i use the following on linux:

    #include <stdio.h>
    #include<sys/stat.h>
    int main()
    {
    FILE *fp;
    mkdir("sample", 0777);
    fp=fopen("sampl e\sample.txt", "w+");
    fprintf(fp, "Hello World!!!");
    return 0;
    }...
    See more | Go to post

    Leave a comment:


  • Creating directory and writing files in that directory ?

    whenever, i try to open a file for writing using fopen("xyz.txt" , "w"), i am able to create the file only in default C:\ drive. i want to create a directory in the process of running the c code and want to create the file in that directory.

    So, i would like to know:

    1.) How to create a directory in c ? (in linux and windows)
    2.) How to create a file in the directory which has been created...
    See more | Go to post

  • plomon
    replied to C code for multiple servers
    in C
    can u tell me whether i should use threads or not to achieve the goal.....if yes.....please provide details of some good websites or e-books to learn about the following:

    1.) multi-threading in c
    2.) usage of threads in socket programming

    my intention was never to dump my work on somebody else's shoulders.....i 'm trying my best to develop my own code....i'm in the learning phase of this project....sorr y if my...
    See more | Go to post

    Leave a comment:


  • plomon
    replied to C code for multiple servers
    in C
    i don't need a simple client-server c program.....i already have one.....i want to implement the above mentioned service using client-server c programming.... .please read the requirements of the service......in order to implement that kind of service, i think we need socket programming and multi-threading concepts in c......so, please help me with these two concepts....
    See more | Go to post

    Leave a comment:


  • plomon
    started a topic C code for multiple servers
    in C

    C code for multiple servers

    I have this class project which requires me to demonstrate service availability using active and backup servers with the following conditions and requirements:

    A Name Server (say NS) to keep track of all the servers.
    One TCP connection between each client and the server. There will be one active server (say AS) and two backup servers (say BS1 and BS2).
    Heartbeat between the active server and client.
    If AS fails,...
    See more | Go to post
No activity results to display
Show More
Working...