Search Results

Search found 860 results on 35 pages for 'strip'.

Page 5/35 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • extracting files from tar

    - by shantanuo
    tar -xvf company_raw_2012-03-16.tgz --directory=/root/test --strip-components=4 I am using the following tar option to remove the leading directories and it is working as expected. --strip-components NUMBER strip NUMBER of leading components from file names before extraction It works only when I know that there are going to be 4 sub-directories. I have tar files and I do not know if there will be 2, 3 or 4 folders inside. How do I strip the entire path and extract files in the given "directory" path.

    Read the article

  • Breaking the loop in Jython

    - by kdev
    Hi everyone, I have a written a loop for and if condition and I want to break to loop completely when if gets satisfied. while count: i=0 for line in read_record: #print str.strip(count[1:28]) #print str.strip(read_record[i]) if string.find(str.strip(read_record[i]),str.strip(count[1:28]))>0: code=str.strip(read_record[i+19])+str.strip(read_record[i+20]) print code[25:] break i=i+1 So here if the if string.find condition gets satisfied I want to go to while loop flow. Please tell me what will be the best place to break and how should I modify the program so that once the if condition is satisfied I am out of the loop and start again with while loop.

    Read the article

  • (Django) Trim whitespaces from charField

    - by zardon
    How do I strip whitespaces (trim) from the end of a charField in Django? Here is my Model, as you can see I've tried putting in clean methods but these never get run. I've also tried doing name.strip(), models.charField().strip() but these do not work either. Is there a way to force the charField to trim automatically for me? Thanks. class Employee(models.Model): """(Workers, Staff, etc)""" name = models.CharField(blank=True, null=True, max_length=100) # This never gets run def clean_variable(self): data = self.cleaned_data['variable'].strip() return data def __unicode__(self): return self.name class Meta: verbose_name_plural = 'Employees' # This never gets run either class EmployeesForm(forms.ModelForm): class Meta: model = Employee def clean_description(self): #if not self.cleaned_data['description'].strip(): # raise forms.ValidationError('Your error message here') self.cleaned_data['name'].strip()

    Read the article

  • breaking the look in jython

    - by kdev
    Hi everyone , I have a written a loop for and if condition and i want to break to loop completely when if gets satisfied. while count: i=0 for line in read_record: #print str.strip(count[1:28]) #print str.strip(read_record[i]) if string.find(str.strip(read_record[i]),str.strip(count[1:28]))>0: code=str.strip(read_record[i+19])+str.strip(read_record[i+20]) print code[25:] break i=i+1 so here if the if string.find condition gets satified i want to go to while loop flow. Please tell me what will be the best place to break and how should i modify the program so that once the if condition is satified iam out of the loop and start again with while loop .

    Read the article

  • How would I strip an '&' symbol out of an ESRI dropdown before any of it's default control logic is

    - by Carter
    I have an ESRI dropdown control inside of an ESRI toolbar. One of the items in the dropdown needs to have an '&' symbol in it. As it turns out ESRI stuff builds it's callback strings as & delimited strings, so when an item is selected the parent toolbar immediately builds and handles the callback string. At one point it splits strings based on the '&' crashing the app. In effect, having an ampersand in an esri dropdown causes nasty stuff to happen when you select the item. What I need to do is find out how I can hop in before the callback stuff starts happening and strip that & out. I was thinking that perhaps I'd have to create a custom esri toolbar control, but I'm not sure and that'd be pretty undesirable. Any ideas?

    Read the article

  • Fastest way of converting a quad to a triangle strip?

    - by Tina Brooks
    What is the fastest way of converting a quadrilateral (made up of foyr x,y points) to a triangle strip? I'm well aware of the general triangulation algorithms that exist, but I need a short, well optimized algorithm that deals with quadrilaterals only. My current algorithm does this, which works for most quads but still gets the points mixed up for some: #define fp(f) bounds.p##f /* Sort four points in ascending order by their Y values */ point_sort4_y(&fp(1), &fp(2), &fp(3), &fp(4)); /* Bottom two */ if (fminf(-fp(1).x, -fp(2).x) == -fp(2).x) { out_quad.p1 = fp(2); out_quad.p2 = fp(1); } else { out_quad.p1 = fp(1); out_quad.p2 = fp(2); } /* Top two */ if (fminf(-fp(3).x, -fp(4).x) == -fp(3).x) { out_quad.p3 = fp(3); out_quad.p4 = fp(4); } else { out_quad.p3 = fp(4); out_quad.p4 = fp(3); }

    Read the article

  • Is it possible to change the border color of the strip wrapper from the jQuery plugin GalleryView?

    - by janoChen
    I found a very nice jquery plugin: http://spaceforaname.com/gallery-light.html I want to change the border color of the strip wrapper (default is white) position: absolute; z-index: 1000; cursor: pointer; top: 304px; left: 74px; height: 98px; width: 98px; border: 2px solid white; The problem is that the border color seems to be generated via javascript any suggestions?

    Read the article

  • How can I strip line breaks from my XML with XSLT?

    - by Eric
    I have this XSLT: <xsl:strip-space elements="*" /> <xsl:template match="math"> <img class="math"> <xsl:attribute name="src">http://latex.codecogs.com/gif.latex?<xsl:value-of select="text()" /></xsl:attribute> </img> </xsl:template> Which is being applied to this XML (notice the line break): <math>\text{average} = \alpha \times \text{data} + (1-\alpha) \times \text{average}</math> Unfortunately, the transform creates this: <img class="math" src="http://latex.codecogs.com/gif.latex?\text{average} = \alpha \times \text{data} + (1-\alpha) \times&#10;&#9;&#9;&#9;&#9;&#9;\text{average}" /> Notice the whitespace character literals. Although it works, it's awfully messy. How can I prevent this?

    Read the article

  • How to strip debug code during compile time in C++?

    - by juvenis
    Say I have a C++ function debugPrint(int foo). How can I most conveniently strip that from release builds? I do not want to surround every call to debugPrint with #ifdefs as it would be really time consuming. On the other hand, I want to be 100% sure that the compiler strips all the calls to that function, and the function itself from release builds. The stripping should happen also, if it's called with a parameter that results from a function call. E.g., debugPrint(getFoo());. In that case I want also the getFoo() call to be stripped. I understand that function inlining could be an option, but inlining is not guaranteed to be supported.

    Read the article

  • Drawing multiple objects from one Vertex Buffer Object in OpenGL/OpenTK

    - by stoney78us
    I am trying to experimenting drawing method using VBO in OpenGL. Many people normally use 1 vbo to store one object data array. I was trying to do something quite opposite which is storing multiple object data into 1 vbo then drawing it. There is story behind why i want to do this. I want to group many of objects as a single object sometime. However my code doesn't do the justice. Following is my pseudo code: //Data double[] vertices = {line strip 1, line strip 2, line strip 3}; //series of vertices int linestrip1offset = index of the first vertex in line strip 1; int linestrip2offset = index of the first vertex in line strip 2; int linestrip3offset = index of the first vertex in line strip 3; int linestrip1VertexNum = number of vertices in linestrip 1; int linestrip2VertexNum = number of vertices in linestrip 2; int linestrip3VertexNum = number of vertices in linestrip 3; //Setting Up void init() { int[] vBO = new int[1]; GL.GenBuffer(1, vBO); GL.BindBuffer(BufferTarget.ArrayBuffer, vBO[0]); GL.BufferData(BufferTarget.ArrayBuffer, new IntPtr(_vertices.Length * sizeof(double)), _vertices, BufferUsageHint.StaticDraw); GL.EnableClientState(Array.VertexArray); } //Drawing void draw() { GL.BindBuffer(BufferTarget.ArrayBuffer, vBO[0]); GL.EnableClientState(ArrayCap.VertexArray); GL.VertexPointer(3, VertexPointerType.Double, 0, linestrip1offset); //drawing first linestrip GL.DrawArrays(drawMode, linestrip1offset , linestrip1VertexNum ); GL.VertexPointer(3, VertexPointerType.Double, 0, linestrip2offset); //drawing second linestrip GL.DrawArrays(drawMode, linestrip2offset , linestrip2VertexNum ); GL.VertexPointer(3, VertexPointerType.Double, 0, linestrip3offset); //drawing third linestrip GL.DrawArrays(drawMode, linestrip3offset , linestrip3VertexNum ); GL.DisableClientState(ArrayCap.VertexArray); GL.BindBuffer(BufferTarget.ArrayBuffer, 0); } I don't know what i did wrong but i think technically it should work where we can tell OpenGL which part of the data in the vBO to be drawn.

    Read the article

  • Two graphical entities, smooth blending between them (e.g. asphalt and grass)

    - by Gabriel Conrad
    Supposedly in a scenario there are, among other things, a tarmac strip and a meadow. The tarmac has an asphalt texture and its model is a triangle strip long that might bifurcate at some point into other tinier strips, and suppose that the meadow is covered with grass. What can be done to make the two graphical entities seem less cut out from a photo and just pasted one on top of the other at the edges? To better understand the problem, picture a strip of asphalt and a plane covered with grass. The grass texture should also "enter" the tarmac strip a little bit at the edges (i.e. feathering effect). My ideas involve two approaches: put two textures on the tarmac entity, but that involves a serious restriction in how the strip is modeled and its texture coordinates are mapped or try and apply a post-processing filter that mimics a bloom effect where "grass" is used instead of light. This could be a terrible failure to achieve correct results. So, is there a better or at least a more obvious way that's widely used in the game dev industry?

    Read the article

  • how to use nokogiri methods .xpath & .at_xpath

    - by Radek
    I'm learning how to use nokogiri and few questions came to me based on the code below require 'rubygems' require 'mechanize' post_agent = WWW::Mechanize.new post_page = post_agent.get('http://www.vbulletin.org/forum/showthread.php?t=230708') puts "\nabsolute path with tbody gives nil" puts post_page.parser.xpath('/html/body/div/div/div/div/div/table/tbody/tr/td/div[2]').xpath('text()').to_s.strip.inspect puts "\n.at_xpath gives an empty string" puts post_page.parser.at_xpath("//div[@id='posts']/div/table/tr/td/div[2]").at_xpath('text()').to_s.strip.inspect puts "\ntwo lines solution with .at_xpath gives an empty string" rows = post_page.parser.xpath("//div[@id='posts']/div/table/tr/td/div[2]") puts rows[0].at_xpath('text()').to_s.strip.inspect puts puts "two lines working code" rows = post_page.parser.xpath("//div[@id='posts']/div/table/tr/td/div[2]") puts rows[0].xpath('text()').to_s.strip puts "\none line working code" puts post_page.parser.xpath("//div[@id='posts']/div/table/tr/td/div[2]")[0].xpath('text()').to_s.strip puts "\nanother one line code" puts post_page.parser.at_xpath("//div[@id='posts']/div/table/tr/td/div[2]").xpath('text()').to_s.strip puts "\none line code with full path" puts post_page.parser.xpath("/html/body/div/div/div/div/div/table/tr/td/div[2]")[0].xpath('text()').to_s.strip is it better to use // or / in xpath? @AnthonyWJones says that 'the use of an unprefixed //' is not so good idea I had to remove tbody from any working xpath otherwise I got 'nil' result. How is possible to remove an element from the xpath to get things work? do I have to use .xpath twice to extract data if not using full xpath? why I cannot make .at_xpath working to extract data? it works nicely here what is the difference?

    Read the article

  • Should I strip the XML declaration from suds output before parsing with lxml?

    - by mikl
    I’m trying to implement a SOAP webservice in Python 2.6 using the suds library. That is working well, but I’ve run into a problem when trying to parse the output with lxml. Suds returns a suds.sax.text.Text object with the reply from the SOAP service. The suds.sax.text.Text class is a subclass of the Python built-in Unicode class. In essence, it would be comparable with this Python statement: u'<?xml version="1.0" encoding="utf-8" ?><root><lotsofelements \></root>' Which is incongrous, since if the XML declaration is correct, the contents are UTF-8 encoded, and thus not a Python Unicode object (because those are stored in some internal encoding like UCS4). lxml will refuse to parse this, as documented, since there is no clear answer to what encoding it should be interpreted as. As I see it, there are two ways out of this bind: Strip the <?xml> declaration, including the encoding. Convert the output from Suds into a bytestring, using the specified encoding. Currently, the data I’m receiving from the webservice is within the ASCII-range, so either way will work, but both feels very much like ugly hacks to me, and I’m not quite sure what would happen, if I start to receive data that would need a wider range of Unicode characters. Any good ideas? I can’t imagine I’m the first one in this position…

    Read the article

  • How can I strip Python logging calls without commenting them out?

    - by cdleary
    Today I was thinking about a Python project I wrote about a year back where I used logging pretty extensively. I remember having to comment out a lot of logging calls in inner-loop-like scenarios (the 90% code) because of the overhead (hotshot indicated it was one of my biggest bottlenecks). I wonder now if there's some canonical way to programmatically strip out logging calls in Python applications without commenting and uncommenting all the time. I'd think you could use inspection/recompilation or bytecode manipulation to do something like this and target only the code objects that are causing bottlenecks. This way, you could add a manipulator as a post-compilation step and use a centralized configuration file, like so: [Leave ERROR and above] my_module.SomeClass.method_with_lots_of_warn_calls [Leave WARN and above] my_module.SomeOtherClass.method_with_lots_of_info_calls [Leave INFO and above] my_module.SomeWeirdClass.method_with_lots_of_debug_calls Of course, you'd want to use it sparingly and probably with per-function granularity -- only for code objects that have shown logging to be a bottleneck. Anybody know of anything like this? Note: There are a few things that make this more difficult to do in a performant manner because of dynamic typing and late binding. For example, any calls to a method named debug may have to be wrapped with an if not isinstance(log, Logger). In any case, I'm assuming all of the minor details can be overcome, either by a gentleman's agreement or some run-time checking. :-)

    Read the article

  • How do I strip multiple (optional) parts of a SQL string using .NET Regular Expressions?

    - by Luc
    I've been working on this for a few hours now and can't find any help on it. Basically, I'm trying to strip a SQL string into various parts (fields, from, where, having, groupBy, orderBy). I refuse to believe that I'm the first person to ever try to do this, so I'd like to ask for some advise from the StackOverflow community. :) To understand what I need, assume the following SQL string: select * from table1 inner join table2 on table1.id = table2.id where field1 = 'sam' having table1.field3 > 0 group by table1.field4 order by table1.field5 I created a regular expression to group the parts accordingly: select\s+(?<fields>.+)\s+from\s+(?<from>.+)\s+where\s+(?<where>.+)\s+having\s+(?<having>.+)\s+group\sby\s+(?<groupby>.+)\s+order\sby\s+(?<orderby>.+) This gives me the following results: fields => * from => table1 inner join table2 on table1.id = table2.id where => field1 = 'sam' having => table1.field3 > 0 groupby => table1.field4 orderby => table1.field5 The problem that I'm faced with is that if any part of the SQL string is missing after the 'from' clause, the regular expression doesn't match. To fix that, I've tried putting each optional part in it's own (...)? group but that doesn't work. It simply put all the optional parts (where, having, groupBy, and orderBy) into the 'from' group. Any ideas?

    Read the article

  • How to strip out 0x0a special char from utf8 file using c# and keep file as utf8?

    - by user1013388
    The following is a line from a UTF-8 file from which I am trying to remove the special char (0X0A), which shows up as a black diamond with a question mark below: 2464577 ????? True s6620178 Unspecified <1?1009-672 This is generated when SSIS reads a SQL table then writes out, using a flat file mgr set to code page 65001. When I open the file up in Notepad++, displays as 0X0A. I'm looking for some C# code to definitely strip that char out and replace it with either nothing or a blank space. Here's what I have tried: string fileLocation = "c:\\MyFile.txt"; var content = string.Empty; using (StreamReader reader = new System.IO.StreamReader(fileLocation)) { content = reader.ReadToEnd(); reader.Close(); } content = content.Replace('\u00A0', ' '); //also tried: content.Replace((char)0X0A, ' '); //also tried: content.Replace((char)0X0A, ''); //also tried: content.Replace((char)0X0A, (char)'\0'); Encoding encoding = Encoding.UTF8; using (FileStream stream = new FileStream(fileLocation, FileMode.Create)) { using (BinaryWriter writer = new BinaryWriter(stream, encoding)) { writer.Write(encoding.GetPreamble()); //This is for writing the BOM writer.Write(content); } } I also tried this code to get the actual string value: byte[] bytes = { 0x0A }; string text = Encoding.UTF8.GetString(bytes); And it comes back as "\n". So in the code above I also tried replacing "\n" with " ", both in double quotes and single quotes, but still no change. At this point I'm out of ideas. Anyone got any advice? Thanks.

    Read the article

  • How to strip logfile with grep to remove various dispensable information?

    - by NES
    My logfile has the following format: Dec 26 13:11:48 192.168.1.1 kernel: ACCEPT IN=br0 OUT=vlan1 SRC=192.168.1.2 DST=74.125.43.147 LEN=44 TOS=0x00 PREC=0x00 TTL=63 ID=9312 DF PROTO=TCP SPT=11733 DPT=80 WINDOW=5840 RES=0x00 SYN URGP=0 OPT (020405B4) Now i'm trying to remove some dispensable information to make the output better readable and well arranged and put it into a new file. The result should look like this and should only have the following information: Dec 26 13:11:48 192.168.1.2 74.125.43.147 TCP SPT=11733 DPT=80 How to do it?

    Read the article

  • What Regex can strip e.g. "note:" and "firstName: " from the left of a string?

    - by Edward Tanguay
    I need to strip the "label" off the front of strings, e.g. note: this is a note needs to return: note and this is a note I've produced the following code example but am having trouble with the regexes. What code do I need in the two ???????? areas below so that I get the desired results shown in the comments? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace TestRegex8822 { class Program { static void Main(string[] args) { List<string> lines = new List<string>(); lines.Add("note: this is a note"); lines.Add("test: just a test"); lines.Add("test:\t\t\tjust a test"); lines.Add("firstName: Jim"); //"firstName" IS a label because it does NOT contain a space lines.Add("She said this to him: follow me."); //this is NOT a label since there is a space before the colon lines.Add("description: this is the first description"); lines.Add("description:this is the second description"); //no space after colon lines.Add("this is a line with no label"); foreach (var line in lines) { Console.WriteLine(StringHelpers.GetLabelFromLine(line)); Console.WriteLine(StringHelpers.StripLabelFromLine(line)); Console.WriteLine("--"); //note //this is a note //-- //test //just a test //-- //test //just a test //-- //firstName //Jim //-- // //She said this to him: follow me. //-- //description //this is the first description //-- //description //this is the first description //-- // //this is a line with no label //-- } Console.ReadLine(); } } public static class StringHelpers { public static string GetLabelFromLine(this string line) { string label = line.GetMatch(@"^?:(\s)"); //??????????????? if (!label.IsNullOrEmpty()) return label; else return ""; } public static string StripLabelFromLine(this string line) { return ...//??????????????? } public static bool IsNullOrEmpty(this string line) { return String.IsNullOrEmpty(line); } } public static class RegexHelpers { public static string GetMatch(this string text, string regex) { Match match = Regex.Match(text, regex); if (match.Success) { string theMatch = match.Groups[0].Value; return theMatch; } else { return null; } } } }

    Read the article

  • How to break a loop when inputting unspecified raw_input?

    - by user1874510
    I want to write an interface using a while loop and raw_input. My code looks like this: while True: n = raw_input("'p' = pause, 'u' = unpause, 'p' = play 's' = stop, 'q' = quit) if n.strip() == 'p': mp3.pause() if n.strip() == 'u': mp3.unpause() if n.strip() == 'p': mp3.play() if n.strip() == 's': mp3.stop() if n.strip() == 'q': break But I want it to break if I input anything that isn't specified in the raw_input. if not raw_input: break Returns and IndentationError: unindent does not match any outer indentation level. if not raw_input: break Does not return any error but doesn't work as I want it to. As far as I know, it does nothing at all. Also, if there's a cleaner way to write my loop, I love to hear it.

    Read the article

  • Tiff Analyzer

    - by Kevin
    I am writing a program to convert some data, mainly a bunch of Tiff images. Some of the Tiffs seems to have a minor problem with them. They show up fine in some viewers (Irfanview, client's old system) but not in others (Client's new system, Window's picture and fax viewer). I have manually looked at the binary data and all the tags seem ok. Can anyone recommend an app that can analyze it and tell me what, if anything, is wrong with it? Also, for clarity sake, I'm only converting the data about the images which is stored seperately in a database and copying the images, I'm not editting the images myself, so I'm pretty sure I'm not messing them up. UDPATE: For anyone interested, here are the tags from a good and bad file: BAD Tag Type Length Value 256 Image Width SHORT 1 1652 257 Image Length SHORT 1 704 258 Bits Per Sample SHORT 1 1 259 Compression SHORT 1 4 262 Photometric SHORT 1 0 266 Fill Order SHORT 1 1 273 Strip Offsets LONG 1 210 (d2 Hex) 274 Orientation SHORT 1 3 277 Samples Per Pixel SHORT 1 1 278 Rows Per Strip SHORT 1 450 279 Strip Byte Counts LONG 1 7264 (1c60 Hex) 282 X Resolution RATIONAL 1 <194 200 / 1 = 200.000 283 Y Resolution RATIONAL 1 <202 200 / 1 = 200.000 284 Planar Configuration SHORT 1 1 296 Resolution Unit SHORT 1 2 Good Tag Type Length Value 254 New Subfile Type LONG 1 0 (0 Hex) 256 Image Width SHORT 1 1193 257 Image Length SHORT 1 788 258 Bits Per Sample SHORT 1 1 259 Compression SHORT 1 4 262 Photometric SHORT 1 0 266 Fill Order SHORT 1 1 270 Image Description ASCII 45 256 273 Strip Offsets LONG 1 1118 (45e Hex) 274 Orientation SHORT 1 1 277 Samples Per Pixel SHORT 1 1 278 Rows Per Strip LONG 1 788 (314 Hex) 279 Strip Byte Counts LONG 1 496 (1f0 Hex) 280 Min Sample Value SHORT 1 0 281 Max Sample Value SHORT 1 1 282 X Resolution RATIONAL 1 <301 200 / 1 = 200.000 283 Y Resolution RATIONAL 1 <309 200 / 1 = 200.000 284 Planar Configuration SHORT 1 1 293 Group 4 Options LONG 1 0 (0 Hex) 296 Resolution Unit SHORT 1 2

    Read the article

  • Does jQuery strip some html elements from a string when using .html()?

    - by Nic Hubbard
    I have a var that contains a full html page, including the head, html, body, etc. When I pass that string into the .html() function, jQuery strips out all those elements, such as body, html, head, etc, which I don't want. My data var contains: <html> <head> <title>Untitled Document</title> </head> <body> </body> </html> // data is a full html document string data = $('<div/>').html(data); // jQuery stips my document string! alert(data.find('head').html()); I am needing to manipulate a full html page string, so that I can return what is in the element. I would like to do this with jQuery, but it seems all of the methods, append(), prepend() and html() all try to convert the string to dom elements, which remove all the other parts of a full html page. Is there another way that I could do this? I would be fine using another method. My final goal is to find certain elements inside my string, so I figured jQuery would be best, since I am so used to it. But, if it is going to trim and remove parts of my string, I am going to have to look for another method. Ideas?

    Read the article

  • python thread prob after build

    - by Apache
    hi expert, i'm having task to scan wifi at specific interval and send it to the server, i've it in python and its works fine when i run manually, then build it to package and when run there is no progress at all, i already ask this question before at http://stackoverflow.com/questions/2735410/python-scritp-problem-once-build-and-package-it, then, i re-modify my code as below, then i found that thread is not functioning once i build, #!/usr/bin/env python import subprocess,threading,... configFile = open('/opt/Jemapoh_Wifi/config.txt', 'r') url = configFile.readline().strip() intervalTime = configFile.readline().strip() status = configFile.readline().strip() print "url "+url print "intervalTime "+intervalTime print "Status "+status.strip() def getMacAddress(): proc = subprocess.Popen('ifconfig -a wlan0 | grep HWaddr | sed \'/^.*HWaddr */!d; s///;q\'', shell=True, stdout=subprocess.PIPE, ) macAddress = proc.communicate()[0].strip() return macAddress def getTimestamp(): from time import strftime timeStamp = strftime("%Y-%m-%d %H:%M:%S") return timeStamp def scanWifi(): try: print "Scanning..." proc = subprocess.Popen('iwlist scan 2>/dev/null', shell=True, stdout=subprocess.PIPE, ) stdout_str = proc.communicate()[0] stdout_list=stdout_str.split('\n') essid=[] rssi=[] preQuality=[] for line in stdout_list: line=line.strip() match=re.search('ESSID:"(\S+)"',line) if match: essid.append(match.group(1)) match=re.search('Quality=(\S+)',line) if match: preQuality.append(match.group(1)) for qualityConversion in preQuality: qualityConversion = qualityConversion.split()[0].split('/') temp = str(int(round(float(qualityConversion[0]) / float(qualityConversion[1]) * 100))).rjust(2) rssi.append(temp) dataToPost = '{"userId":"' + getMacAddress() + '","timestamp":"' + getTimestamp() + '","wifi":[' for no in range(len(essid)): dataToPost += '{"ssid":"' + essid[no] + '","rssi":"' + rssi[no] + '"}' if no+1 == len(essid): pass else: dataToPost += ',' dataToPost += ']}' query_args = {"data":dataToPost} request = urllib2.Request(url) request.add_data(urllib.urlencode(query_args)) request.add_header('Content-Type', 'application/x-www-form-urlencoded') print "Waiting for server response..." print urllib2.urlopen(request).read() print "Data Sent @ " + getTimestamp() print "------------------------------------------------------" t = threading.Timer(int(intervalTime), scanWifi).start() except Exception, e: print e t = threading.Timer(int(intervalTime), scanWifi) t.start() once build, its not reaching the thread, do can anyone help, why the thread is not working after build thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >