Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Smed

Hi, I am trying to use Regular Expressions to modify text without modifying the wildcard value. Here is an example: [CODE]import re text = 'Reference [14] and Reference [17] are References.' text = re.sub('Reference \[\d+\]','Ref. [\d]',text) print text [/CODE] I want the output to be "Ref. [14] and Ref. [17] …

Member Avatar for TrustyTony
0
137
Member Avatar for Smed

Hi, I'd like to find the maximum value in a list but be able to state certain exceptions. For example: if list A=[1,5,3,4] I want to say [CODE]max(A) except index 1[/CODE] which would return '4' as the maximum value. Is there a way of doing this? Thanks.

Member Avatar for TrustyTony
0
122
Member Avatar for Smed

I'm trying to search a specified range of numbers and I'm currently using regular expressions. The lines I'm searching contain numbers from 00 to 30, but I only want to find the lines containing 02 to 22. I have tried a few different things, but none of them work. this …

Member Avatar for TrustyTony
0
72
Member Avatar for Smed

I'm trying to sort a 3D array and having little success. I have read various methods on how this is done for two dimensions, but I can't seem to scale it up. example array: [CODE]r =[[['steve',1, 40], ['steve',3, 20], ['steve',2, 30]], [['john',5, 50], ['john',6, 40], ['john',4, 30]]][/CODE] I want this …

Member Avatar for TrustyTony
0
203
Member Avatar for Smed

I'm looking for a simple way to modify a 2D list as shown below. Starting with a list such as this: 1,2,3 4,5,6 7,8,9 I want to create a list that looks like this: 1,2 4,5 7,8 1,3 4,6 7,9 Which is just the first and second column with the …

Member Avatar for Gribouillis
0
108
Member Avatar for Smed

I want to print only a specified column of a 2D array. For example I can print a row [4,5,6] by doing: [icode] A=[[1,2,3],[4,5,6],[7,8,9]] Print A[1] [/icode] But I want to print the column [2,5,8] by doing something like: [icode] A=[[1,2,3],[4,5,6],[7,8,9]] Print A[][1] [/icode] Is there a way of doing …

Member Avatar for Gribouillis
0
79
Member Avatar for Smed

I'm currently working on a project that manages multiple notepad windows in a MDI client area. It runs just as I want it to, except that the notepad windows seem to freeze up and become glitchy inside of the parent window. I was told to look into using InvalidateRect, but …

Member Avatar for rdjusr
0
170
Member Avatar for Smed

I'm trying to use the createprocess function to start an xsession, but so far I've been unsuccessful. Here is the code I'm trying to use: [CODE] _tcscpy(tszCommandLine, _T("C:\\Program Files\\Hummingbird\\Connectivity\\12.00\\Exceed\\Xstart.exe C:\\Documents and Settings\\username\\Application Data\\Hummingbird\\Connectivity\\12.00\\Profile\\XSW3.xs")); CreateProcess(NULL, tszCommandLine, NULL, NULL, FALSE, NULL, NULL, NULL, &si, &pi); [/CODE] If I try to make the …

Member Avatar for Smed
0
105
Member Avatar for Smed

Hi, I appologize for a lack of specificity, but i'll try my best to explain what i want to do. I want to write a program that will run other programs within a single window, so that they're neatly organized. For instance; I usually run about 3 Xterminals that i …

Member Avatar for William Hemsworth
0
197