No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- Interests
- like to play computer games, to watch discovery chanel
Re:
Hi Pythonist, I write the code in Python for search and replace the text in all XML files at current directory. But I'm unable to find and replace the text `<tex>` as empty in all XML files. Here I want to remove the text: <tex>z_{1 - \alpha }^2 \,\sigma _{{\rm … |
|
Re:
Hi, I have a class [inlinecode]SubDevice[/inlinecode] with a function [inlinecode]action[/inlinecode]. For each instance of SubDevice I want to define another action, so it's a parameter of SubDevice's class constructor. Now some of the action functions need additional parameters, but that's normally not a problem because I can write something like … |
|
Re:
I am at a real loss for what to do. My boss wants me to devise a way to extract user data from a Plone installation and I don't know how to do it. The best option I've found so far is the following piece of Python code. Below it … |
|
Hi, i am a newbie in python, can any one tell me about synchrinization in python, i have googled about it, but could not get much clear idea.. Thanks in advance..... :) |
|
Re:
I want to see if a certain word is in a text file, how do I go about that? |
|
Re:
Hello all, Is there any algorithm to convert a python tuple to MySql query. Ex: [B] ('*','name','sliver')[/B] should convert to [B] select [Pri_Key] from [All Tables] where 'name' = 'sliver';[/B] I have been able to do so ... but my algorithm looks very ugly and have to process everything bit … |
|
code: you can change this code as you like [code] import wx import os from wxPython.wx import * import wx.html class MyHtmlFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title) html = wx.html.HtmlWindow(self) html.SetPage( "This is test implementation of Simple <b>Notepad</b> using <font color=\"red\">wxPython</font> !!!! " "<br>View is created using … |
|
[code]#Auther : vivek sharma #date : 06-11-2006 #Description : This script is used to get the list of week in given year, user have to input the year , def WeekFinderFromYear(year): """ will return all the week from selected year """ import datetime WEEK = {'MONDAY':0,'TUESDAY':1,'WEDNESDAY':2,'THURSDAY':3,'FRIDAY':4,'SATURDAY':5,'SUNDAY':6} MONTH = {'JANUARY':1,'FEBRUARY':2,'MARCH':3,'APRIL':4,'MAY':5,'JUNE':6,'JULY':7,'AUGUST':8,'SEPTEMBER':9,'OCTOBER':10,'NOVEMBER':11,'DECEMBER':12} year=int(year) … |
|
import wx import os from wxPython.wx import * import wx.html class MyHtmlFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title) html = wx.html.HtmlWindow(self) html.SetPage( "This is test implementation of Simple <b>Notepad</b> using <font color=\"red\">wxPython</font> !!!! " "<br>View is created using <font color=\"red\">wxGlade</font>") class MyFrame(wx.Frame): def __init__(self, *args, **kwds): # begin … |
|
def WeekFinderFromYear(year): """ will return all the week from selected year """ import datetime WEEK = {'MONDAY':0,'TUESDAY':1,'WEDNESDAY':2,'THURSDAY':3,'FRIDAY':4,'SATURDAY':5,'SUNDAY':6} MONTH = {'JANUARY':1,'FEBRUARY':2,'MARCH':3,'APRIL':4,'MAY':5,'JUNE':6,'JULY':7,'AUGUST':8,'SEPTEMBER':9,'OCTOBER':10,'NOVEMBER':11,'DECEMBER':12} year=int(year) month= MONTH['JANUARY'] day=WEEK['MONDAY'] dt = datetime.date(year,month,1) dow_lst = [] while dt.weekday() != day: dt = dt + datetime.timedelta(days=1) lst_month = MONTH.values() lst_month.sort() for mont in lst_month: while dt.month == … |
|
result=[] list = int(raw_input("enter the length of list:")) size_of_batch=int(raw_input("enter the size of batch:")) def createBatch(lst): lenLst = len(lst) if lenLst > size_of_batch: no_of_batch=lenLst/size_of_batch last_entry_batch=lenLst%size_of_batch first_index=0 last_index=size_of_batch else: no_of_batch=0 first_index=0 last_entry_batch=lenLst newList = lst[0:last_entry_batch] runChangeState(result,newList) return while no_of_batch != 0: newList = lst[first_index:last_index] runChangeState(result,newList) first_index=first_index+size_of_batch last_index=last_index+size_of_batch no_of_batch = no_of_batch-1 if no_of_batch==0: … |
|
[code]import posix import string uid = `posix.getuid()` passwd = open('/etc/passwd') for line in passwd.readlines(): rec = string.splitfields(line, ':') if rec[2] == uid: print 'hello', rec[0], print 'mind if we call you bruce?' break else: print "I can't find you in /etc/passwd" :) [/code] |
|
Re:
Hello to all, I am trying to create a script that will go through certain directorys in Windows and pull out the files I stated by extentions. Which will then later copy to a location either on the local machine or an external HD. Any assistence will be greatly appricated. … |
|
import urllib f = urllib.urlopen("http://www.mahiti.in") word = "Software" for line in f: if word in line: print line :cheesy: |
|
Re:
I alredy know hoe to send e-mail by python but is possible to receive e-mail?? thanks for all post |
|
hi, i am very new in python. can anyone tell me that how to create dynamic dropdown box in python scripting.(triple dropdown box) |