User Profile

Collapse

Profile Sidebar

Collapse
fahadqureshi
fahadqureshi
Last Activity: Aug 20 '09, 10:20 PM
Joined: Oct 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • fahadqureshi
    started a topic working with .xlsm

    working with .xlsm

    I have a program that works perfectly with opening/modifying .xlsx (basic excel file) extension excel file but when i try to work with a .xlsm(macro enabled excel file) extension it just hangs.

    Does python command:

    Code:
    from win32com.client import Dispatch
        xlApp = Dispatch ("Excel.Application")
        xlWb = xlApp.Workbooks.Open ("c:/loads_r1.xlsm")
    not support macro enabled...
    See more | Go to post

  • fahadqureshi
    replied to setting font using wx.
    AHHHHHHHHHHh i see. Thanks for your help. That was really stupid of me to not see that. Anyways I got it to work it needed to go after the button definition.
    Thanks again. :)
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    replied to setting font using wx.
    ok i tried that but now i am getting this

    AttributeError: 'Frame2' object has no attribute 'B1'

    Code:
            self.B1.SetFont(wx.Font(12, wx.SWITSS, wx.NORMAL, wx.NORMAL))
            self.B1 = wx.Button(id=wxID_FRAME2B1, label='Ratings/RXB',
                  name='B1', parent=self, pos=wx.Point(100, 375), size=wx.Size(90,25), style=0)
            self.B1.Bind(wx.EVT_BUTTON, self.OnB1Button, id=wxID_FRAME2B1)
    ...
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    replied to setting font using wx.
    Okay i added it to the code like so:

    Code:
    self.B1 = wx.Button(id=wxID_FRAME2B1, label='Ratings/RXB',
               name='B1', parent=self, pos=wx.Point(100, 375), 
               size=wx.Size(90,25), style=0, 
               font=wx.Font(12, wx.SWISS, wx.NORMAL, wx.NORMAL))
    self.B1.Bind(wx.EVT_BUTTON, self.OnB1Button, id=wxID_FRAME2B1)
    the error i am getting is
    TypeError: 'font' is an invalid keyword...
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    started a topic setting font using wx.

    setting font using wx.

    I have the following code snippet from a larger program which is working perfectly for making a gui and adding buttons to it:
    Code:
            
    self.B0 = wx.Button(id=wxID_FRAME2B0, label='Choose Cases', 
             name='B0', parent=self, pos=wx.Point(300, 50), 
             size=wx.Size(400, 50),style=0)
    self.B0.Bind(wx.EVT_BUTTON, self.OnB0Button, id=wxID_FRAME2B0)
    I have no problems setting up the buttons but...
    See more | Go to post

  • fahadqureshi
    started a topic extracting data from tuples

    extracting data from tuples

    I have a tuple that prints from a program somewhat like this:
    tuple1(0, [ [1, 2, 3, 4,] ])
    when i do a len(tuple1) command it says the length of the tuple is 2 which i guess it is looking at it because its treating the 1 2 3 4 as one entry.

    however i am trying to extract the 1 2 3 and 4 from it. i have tried various combinations of multidimension array commands mainly things like print tuple1[1][0] etc.. but cant for...
    See more | Go to post

  • fahadqureshi
    replied to remove whitespace from directory path
    Thanks a bunch

    Thanks a lot man it worked, you are incredible at this.
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    replied to remove whitespace from directory path
    what if i was trying to use the string as a path name. is it even possible to store a pathname as a string. for example if i wanted to assign C:\fahad\test.t xt as a string and then call on it.

    an overall picture of what i am trying to do is ask the user for a file name at which the user will enter for example "test.txt" . it may not be .txt everytime could be other file names whatever the user enters.

    now i...
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    started a topic remove whitespace from directory path

    remove whitespace from directory path

    i am trying to get a user input and use that input as part of a directory path. i have tried many way of doing this but cant get rid of the space.

    Code:
    accfile1 = raw_input("Enter file name:")
    print "C:\Fahad\ACC\Output\ ".replace(' ', ''),accfile1
    My output looks like this
    C:\Fahad\ACC\Ou tput\ test.txt

    notice the white space before test.txt. I want it to look like this ...
    See more | Go to post

  • fahadqureshi
    replied to Excel instance won't close
    I tried that and it's closing only one of the EXCEL.EXE 's while one remains open.

    Also, is this the correct command or am I doing this incorrectly?

    Set myExcelAppWorks heets = Nothing
    Set myExcelAppWorkB ooks = Nothing
    Set myExcelApp = Nothing

    Instead of YourWorkSheet and YourWorkBook I would use myExcelApp.
    See more | Go to post
    Last edited by Killer42; Dec 20 '07, 10:52 PM.

    Leave a comment:


  • fahadqureshi
    started a topic Excel instance won't close

    Excel instance won't close

    I am running two visual basic modules in Access and keep coming across an annoying problem.
    Both the vb modules transfer an excel spreadsheet to an access database but for some reason after the module has executed the excel spread sheets remain open in memory.
    So if for some reason i try to go open the spreadsheets in excel i get a message saying that the spreadsheet is locked and can only be open in read-only mode.
    When i...
    See more | Go to post

  • fahadqureshi
    replied to CSV to Array
    ok i did figure out how to store it in an array but how do i store it as a number. it looks like python is just treating it like a character instead of a number.
    also i want the array size to be equal to the number of columns in the csv file what would be the correct way to define that?
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    started a topic CSV to Array

    CSV to Array

    i have a csv file that has a number in one column and a corresponding number in the second column. i am trying to store both of these numbers in an array. i have done this before with an excel file but how would i go about doing this with a csv file since the command xlsht wont work in csv. here is my code so far to print everything but how do i store them in an array and what would be the correct way to define the array.

    Code:
    import
    ...
    See more | Go to post

  • fahadqureshi
    started a topic what does the <> operator do

    what does the <> operator do

    does anybody know what the <> does in python
    i was looking at some code and i saw this operand used in different places, mainly in if else satements.

    example

    Code:
    if(typevali <> 4 and busi == 0):
    See more | Go to post

  • fahadqureshi
    replied to Help with Tkinter
    I have tried self.quit() and self.master.qui t() and it just freezes on the screen. What's odd is that it closes when i click on the x in the windows menu bar. Oh well, thanks for all the help i have decided to just not inculde the quit button and just tell the users to use the x to close it.
    Thanks again.
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    replied to Help with Tkinter
    Disregard the previous post. i got the program to do what i wanted to do. now i am almost done with my project. the last and final problem i am having is that the gui wont close when i click on the quit button. I am sure there is a simple and quick fix to this but being a newbie i dont know what it is. when i click on quit the gui just freezes on the screen. here is the code

    Code:
    from Tkinter import *
    import tkMessageBox
    ...
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    replied to Help with Tkinter
    ok i went back and redid a lot of the code and decided to go a simpler route. now all i need the program to do is, upon the user pressing enter i want the program to take the 6 digit number in the entry field and use it for further calculations. the program runs ok as far as the gui showing up and all but when i press enter after entering the number in the entry field i get the folloing error.

    Exception in Tkinter callback
    Traceback...
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    started a topic Help with Tkinter

    Help with Tkinter

    i am trying to make a gui and need some help on how to link buttons to certain commands. here is my code:

    Code:
    from Tkinter import *
    root =Tk()
    root.geometry('300x200')
    root.title('EXAM')
    Label (text='Enter a Bus Number').pack(side=TOP,padx=10,pady=10)
    Entry(root, width=6).pack(side=TOP,padx=10,pady=10)
    Button(root, text='EXAM').pack(side= TOP, padx=10, pady=10)
    Button(root, text='Quit').pack(side=
    ...
    See more | Go to post

  • fahadqureshi
    replied to Help With Writing A Word Macro
    ohhhh ok. well in that case i am still getting an error because i have many ....... in a row in various places.

    this is what my document looks like and i want to highlight the number in the middle that are less then .95000 aditionally i want to highlight the number to the right of it and the numbers and text to the left of it as well but that might be too complicated.

    42062 ALTA_L98 69.000 0.95212 0.98269
    ...
    See more | Go to post

    Leave a comment:


  • fahadqureshi
    replied to Help With Writing A Word Macro
    i am getting a type mismatch at the
    Code:
    Dou1 = Selection.Text
    The file does contain letters and numbers and different characters in it. Could there be a mismatch because i, j, Dou1 are all defined as numbers. Also, i am sure there is a good reason for it, but why is this line in the code and what does it do:

    Code:
    If (j >= 48 And j <= 57) Or j = 46 Then
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...